diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/CHANGELOG.md b/sdk/mariadb/azure-resourcemanager-mariadb/CHANGELOG.md index d5dba5ef1f37..01278b7c1389 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/CHANGELOG.md +++ b/sdk/mariadb/azure-resourcemanager-mariadb/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-02-09) +- Azure Resource Manager MariaDB client library for Java. This package contains Microsoft Azure SDK for MariaDB Management SDK. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-2020-01-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-16) diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/README.md b/sdk/mariadb/azure-resourcemanager-mariadb/README.md index 1d32560cb658..504673eac29b 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/README.md +++ b/sdk/mariadb/azure-resourcemanager-mariadb/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-mariadb - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/mariadb/azure-resourcemanager-mariadb/SAMPLE.md) + + ## Troubleshooting ## Next steps diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/SAMPLE.md b/sdk/mariadb/azure-resourcemanager-mariadb/SAMPLE.md new file mode 100644 index 000000000000..203da4c28c70 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/SAMPLE.md @@ -0,0 +1,1581 @@ +# Code snippets and samples + + +## Advisors + +- [Get](#advisors_get) +- [ListByServer](#advisors_listbyserver) + +## CheckNameAvailability + +- [Execute](#checknameavailability_execute) + +## Configurations + +- [CreateOrUpdate](#configurations_createorupdate) +- [Get](#configurations_get) +- [ListByServer](#configurations_listbyserver) + +## Databases + +- [CreateOrUpdate](#databases_createorupdate) +- [Delete](#databases_delete) +- [Get](#databases_get) +- [ListByServer](#databases_listbyserver) + +## FirewallRules + +- [CreateOrUpdate](#firewallrules_createorupdate) +- [Delete](#firewallrules_delete) +- [Get](#firewallrules_get) +- [ListByServer](#firewallrules_listbyserver) + +## LocationBasedPerformanceTier + +- [List](#locationbasedperformancetier_list) + +## LocationBasedRecommendedActionSessionsOperationStatus + +- [Get](#locationbasedrecommendedactionsessionsoperationstatus_get) + +## LocationBasedRecommendedActionSessionsResult + +- [List](#locationbasedrecommendedactionsessionsresult_list) + +## LogFiles + +- [ListByServer](#logfiles_listbyserver) + +## Operations + +- [List](#operations_list) + +## PrivateEndpointConnections + +- [CreateOrUpdate](#privateendpointconnections_createorupdate) +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [ListByServer](#privateendpointconnections_listbyserver) +- [UpdateTags](#privateendpointconnections_updatetags) + +## PrivateLinkResources + +- [Get](#privatelinkresources_get) +- [ListByServer](#privatelinkresources_listbyserver) + +## QueryTexts + +- [Get](#querytexts_get) +- [ListByServer](#querytexts_listbyserver) + +## RecommendedActions + +- [Get](#recommendedactions_get) +- [ListByServer](#recommendedactions_listbyserver) + +## RecoverableServers + +- [Get](#recoverableservers_get) + +## Replicas + +- [ListByServer](#replicas_listbyserver) + +## ResourceProvider + +- [CreateRecommendedActionSession](#resourceprovider_createrecommendedactionsession) +- [ResetQueryPerformanceInsightData](#resourceprovider_resetqueryperformanceinsightdata) + +## ServerBasedPerformanceTier + +- [List](#serverbasedperformancetier_list) + +## ServerParameters + +- [ListUpdateConfigurations](#serverparameters_listupdateconfigurations) + +## ServerSecurityAlertPolicies + +- [CreateOrUpdate](#serversecurityalertpolicies_createorupdate) +- [Get](#serversecurityalertpolicies_get) +- [ListByServer](#serversecurityalertpolicies_listbyserver) + +## Servers + +- [Create](#servers_create) +- [Delete](#servers_delete) +- [GetByResourceGroup](#servers_getbyresourcegroup) +- [List](#servers_list) +- [ListByResourceGroup](#servers_listbyresourcegroup) +- [Restart](#servers_restart) +- [Start](#servers_start) +- [Stop](#servers_stop) +- [Update](#servers_update) + +## TopQueryStatistics + +- [Get](#topquerystatistics_get) +- [ListByServer](#topquerystatistics_listbyserver) + +## VirtualNetworkRules + +- [CreateOrUpdate](#virtualnetworkrules_createorupdate) +- [Delete](#virtualnetworkrules_delete) +- [Get](#virtualnetworkrules_get) +- [ListByServer](#virtualnetworkrules_listbyserver) + +## WaitStatistics + +- [Get](#waitstatistics_get) +- [ListByServer](#waitstatistics_listbyserver) +### Advisors_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Advisors Get. */ +public final class AdvisorsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/AdvisorsGet.json + */ + /** + * Sample code: AdvisorsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void advisorsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.advisors().getWithResponse("testResourceGroupName", "testServerName", "Index", Context.NONE); + } +} +``` + +### Advisors_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for Advisors ListByServer. */ +public final class AdvisorsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/AdvisorsListByServer.json + */ + /** + * Sample code: AdvisorsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void advisorsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.advisors().listByServer("testResourceGroupName", "testServerName", Context.NONE); + } +} +``` + +### CheckNameAvailability_Execute + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.NameAvailabilityRequest; + +/** Samples for CheckNameAvailability Execute. */ +public final class CheckNameAvailabilityExecuteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/CheckNameAvailability.json + */ + /** + * Sample code: NameAvailability. + * + * @param manager Entry point to MariaDBManager. + */ + public static void nameAvailability(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .checkNameAvailabilities() + .executeWithResponse( + new NameAvailabilityRequest().withName("name1").withType("Microsoft.DBforMariaDB"), Context.NONE); + } +} +``` + +### Configurations_CreateOrUpdate + +```java +/** Samples for Configurations CreateOrUpdate. */ +public final class ConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ConfigurationCreateOrUpdate.json + */ + /** + * Sample code: ConfigurationCreateOrUpdate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void configurationCreateOrUpdate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .configurations() + .define("event_scheduler") + .withExistingServer("TestGroup", "testserver") + .withValue("off") + .withSource("user-override") + .create(); + } +} +``` + +### Configurations_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Configurations Get. */ +public final class ConfigurationsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ConfigurationGet.json + */ + /** + * Sample code: ConfigurationGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void configurationGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.configurations().getWithResponse("TestGroup", "testserver", "event_scheduler", Context.NONE); + } +} +``` + +### Configurations_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for Configurations ListByServer. */ +public final class ConfigurationsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ConfigurationListByServer.json + */ + /** + * Sample code: ConfigurationList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void configurationList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.configurations().listByServer("testrg", "mariadbtestsvc1", Context.NONE); + } +} +``` + +### Databases_CreateOrUpdate + +```java +/** Samples for Databases CreateOrUpdate. */ +public final class DatabasesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/DatabaseCreate.json + */ + /** + * Sample code: DatabaseCreate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void databaseCreate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .databases() + .define("db1") + .withExistingServer("TestGroup", "testserver") + .withCharset("utf8") + .withCollation("utf8_general_ci") + .create(); + } +} +``` + +### Databases_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Databases Delete. */ +public final class DatabasesDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/DatabaseDelete.json + */ + /** + * Sample code: DatabaseDelete. + * + * @param manager Entry point to MariaDBManager. + */ + public static void databaseDelete(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.databases().delete("TestGroup", "testserver", "db1", Context.NONE); + } +} +``` + +### Databases_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Databases Get. */ +public final class DatabasesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/DatabaseGet.json + */ + /** + * Sample code: DatabaseGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void databaseGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.databases().getWithResponse("TestGroup", "testserver", "db1", Context.NONE); + } +} +``` + +### Databases_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for Databases ListByServer. */ +public final class DatabasesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/DatabaseListByServer.json + */ + /** + * Sample code: DatabaseList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void databaseList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.databases().listByServer("TestGroup", "testserver", Context.NONE); + } +} +``` + +### FirewallRules_CreateOrUpdate + +```java +/** Samples for FirewallRules CreateOrUpdate. */ +public final class FirewallRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/FirewallRuleCreate.json + */ + /** + * Sample code: FirewallRuleCreate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void firewallRuleCreate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .firewallRules() + .define("rule1") + .withExistingServer("TestGroup", "testserver") + .withStartIpAddress("0.0.0.0") + .withEndIpAddress("255.255.255.255") + .create(); + } +} +``` + +### FirewallRules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for FirewallRules Delete. */ +public final class FirewallRulesDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/FirewallRuleDelete.json + */ + /** + * Sample code: FirewallRuleDelete. + * + * @param manager Entry point to MariaDBManager. + */ + public static void firewallRuleDelete(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.firewallRules().delete("TestGroup", "testserver", "rule1", Context.NONE); + } +} +``` + +### FirewallRules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for FirewallRules Get. */ +public final class FirewallRulesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/FirewallRuleGet.json + */ + /** + * Sample code: FirewallRuleGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void firewallRuleGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.firewallRules().getWithResponse("TestGroup", "testserver", "rule1", Context.NONE); + } +} +``` + +### FirewallRules_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for FirewallRules ListByServer. */ +public final class FirewallRulesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/FirewallRuleListByServer.json + */ + /** + * Sample code: FirewallRuleList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void firewallRuleList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.firewallRules().listByServer("TestGroup", "testserver", Context.NONE); + } +} +``` + +### LocationBasedPerformanceTier_List + +```java +import com.azure.core.util.Context; + +/** Samples for LocationBasedPerformanceTier List. */ +public final class LocationBasedPerformanceTierListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PerformanceTiersListByLocation.json + */ + /** + * Sample code: PerformanceTiersList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void performanceTiersList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.locationBasedPerformanceTiers().list("WestUS", Context.NONE); + } +} +``` + +### LocationBasedRecommendedActionSessionsOperationStatus_Get + +```java +import com.azure.core.util.Context; + +/** Samples for LocationBasedRecommendedActionSessionsOperationStatus Get. */ +public final class LocationBasedRecommendedActionSessionsOperationStatusGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionSessionOperationStatus.json + */ + /** + * Sample code: RecommendedActionSessionOperationStatus. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionSessionOperationStatus( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .locationBasedRecommendedActionSessionsOperationStatus() + .getWithResponse("WestUS", "aaaabbbb-cccc-dddd-0000-111122223333", Context.NONE); + } +} +``` + +### LocationBasedRecommendedActionSessionsResult_List + +```java +import com.azure.core.util.Context; + +/** Samples for LocationBasedRecommendedActionSessionsResult List. */ +public final class LocationBasedRecommendedActionSessionsResultListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionSessionResult.json + */ + /** + * Sample code: RecommendedActionSessionResult. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionSessionResult(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .locationBasedRecommendedActionSessionsResults() + .list("WestUS", "aaaabbbb-cccc-dddd-0000-111122223333", Context.NONE); + } +} +``` + +### LogFiles_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for LogFiles ListByServer. */ +public final class LogFilesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/LogFileListByServer.json + */ + /** + * Sample code: LogFileList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void logFileList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.logFiles().listByServer("TestGroup", "testserver", Context.NONE); + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/OperationList.json + */ + /** + * Sample code: OperationList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void operationList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.operations().listWithResponse(Context.NONE); + } +} +``` + +### PrivateEndpointConnections_CreateOrUpdate + +```java +import com.azure.resourcemanager.mariadb.models.PrivateLinkServiceConnectionStateProperty; + +/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionUpdate.json + */ + /** + * Sample code: Approve or reject a private endpoint connection with a given name. + * + * @param manager Entry point to MariaDBManager. + */ + public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .privateEndpointConnections() + .define("private-endpoint-connection-name") + .withExistingServer("Default", "test-svr") + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty() + .withStatus("Approved") + .withDescription("Approved by johndoe@contoso.com")) + .create(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionDelete.json + */ + /** + * Sample code: Deletes a private endpoint connection with a given name. + * + * @param manager Entry point to MariaDBManager. + */ + public static void deletesAPrivateEndpointConnectionWithAGivenName( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .privateEndpointConnections() + .delete("Default", "test-svr", "private-endpoint-connection-name", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionGet.json + */ + /** + * Sample code: Gets private endpoint connection. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsPrivateEndpointConnection(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .privateEndpointConnections() + .getWithResponse("Default", "test-svr", "private-endpoint-connection-name", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections ListByServer. */ +public final class PrivateEndpointConnectionsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionList.json + */ + /** + * Sample code: Gets list of private endpoint connections on a server. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsListOfPrivateEndpointConnectionsOnAServer( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.privateEndpointConnections().listByServer("Default", "test-svr", Context.NONE); + } +} +``` + +### PrivateEndpointConnections_UpdateTags + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.PrivateEndpointConnection; +import java.util.HashMap; +import java.util.Map; + +/** Samples for PrivateEndpointConnections UpdateTags. */ +public final class PrivateEndpointConnectionsUpdateTagsSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionUpdateTags.json + */ + /** + * Sample code: Update private endpoint connection Tags. + * + * @param manager Entry point to MariaDBManager. + */ + public static void updatePrivateEndpointConnectionTags(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + PrivateEndpointConnection resource = + manager + .privateEndpointConnections() + .getWithResponse("Default", "test-svr", "private-endpoint-connection-name", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key1", "val1", "key2", "val2")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### PrivateLinkResources_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources Get. */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateLinkResourcesGet.json + */ + /** + * Sample code: Gets a private link resource for MariaDB. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsAPrivateLinkResourceForMariaDB(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", Context.NONE); + } +} +``` + +### PrivateLinkResources_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources ListByServer. */ +public final class PrivateLinkResourcesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateLinkResourcesList.json + */ + /** + * Sample code: Gets private link resources for MariaDB. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsPrivateLinkResourcesForMariaDB(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.privateLinkResources().listByServer("Default", "test-svr", Context.NONE); + } +} +``` + +### QueryTexts_Get + +```java +import com.azure.core.util.Context; + +/** Samples for QueryTexts Get. */ +public final class QueryTextsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryTextsGet.json + */ + /** + * Sample code: QueryTextsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void queryTextsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.queryTexts().getWithResponse("testResourceGroupName", "testServerName", "1", Context.NONE); + } +} +``` + +### QueryTexts_ListByServer + +```java +import com.azure.core.util.Context; +import java.util.Arrays; + +/** Samples for QueryTexts ListByServer. */ +public final class QueryTextsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryTextsListByServer.json + */ + /** + * Sample code: QueryTextsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void queryTextsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .queryTexts() + .listByServer("testResourceGroupName", "testServerName", Arrays.asList("1", "2"), Context.NONE); + } +} +``` + +### RecommendedActions_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RecommendedActions Get. */ +public final class RecommendedActionsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionsGet.json + */ + /** + * Sample code: RecommendedActionsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .recommendedActions() + .getWithResponse("testResourceGroupName", "testServerName", "Index", "Index-1", Context.NONE); + } +} +``` + +### RecommendedActions_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for RecommendedActions ListByServer. */ +public final class RecommendedActionsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionsListByServer.json + */ + /** + * Sample code: RecommendedActionsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .recommendedActions() + .listByServer("testResourceGroupName", "testServerName", "Index", null, Context.NONE); + } +} +``` + +### RecoverableServers_Get + +```java +import com.azure.core.util.Context; + +/** Samples for RecoverableServers Get. */ +public final class RecoverableServersGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecoverableServersGet.json + */ + /** + * Sample code: ReplicasListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void replicasListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.recoverableServers().getWithResponse("testrg", "testsvc4", Context.NONE); + } +} +``` + +### Replicas_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for Replicas ListByServer. */ +public final class ReplicasListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ReplicasListByServer.json + */ + /** + * Sample code: ReplicasListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void replicasListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.replicas().listByServer("TestGroup", "testmaster", Context.NONE); + } +} +``` + +### ResourceProvider_CreateRecommendedActionSession + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceProvider CreateRecommendedActionSession. */ +public final class ResourceProviderCreateRecommendedActionSessionSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionSessionCreate.json + */ + /** + * Sample code: RecommendedActionSessionCreate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionSessionCreate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .resourceProviders() + .createRecommendedActionSession( + "testResourceGroupName", "testServerName", "Index", "someDatabaseName", Context.NONE); + } +} +``` + +### ResourceProvider_ResetQueryPerformanceInsightData + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceProvider ResetQueryPerformanceInsightData. */ +public final class ResourceProviderResetQueryPerformanceInsightDataSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json + */ + /** + * Sample code: QueryPerformanceInsightResetData. + * + * @param manager Entry point to MariaDBManager. + */ + public static void queryPerformanceInsightResetData(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .resourceProviders() + .resetQueryPerformanceInsightDataWithResponse("testResourceGroupName", "testServerName", Context.NONE); + } +} +``` + +### ServerBasedPerformanceTier_List + +```java +import com.azure.core.util.Context; + +/** Samples for ServerBasedPerformanceTier List. */ +public final class ServerBasedPerformanceTierListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PerformanceTiersListByServer.json + */ + /** + * Sample code: PerformanceTiersList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void performanceTiersList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.serverBasedPerformanceTiers().list("testrg", "mariadbtestsvc1", Context.NONE); + } +} +``` + +### ServerParameters_ListUpdateConfigurations + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.fluent.models.ConfigurationListResultInner; + +/** Samples for ServerParameters ListUpdateConfigurations. */ +public final class ServerParametersListUpdateConfigurationsSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ConfigurationsUpdateByServer.json + */ + /** + * Sample code: ConfigurationList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void configurationList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .serverParameters() + .listUpdateConfigurations("testrg", "mariadbtestsvc1", new ConfigurationListResultInner(), Context.NONE); + } +} +``` + +### ServerSecurityAlertPolicies_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.SecurityAlertPolicyName; +import com.azure.resourcemanager.mariadb.models.ServerSecurityAlertPolicy; +import com.azure.resourcemanager.mariadb.models.ServerSecurityAlertPolicyState; +import java.util.Arrays; + +/** Samples for ServerSecurityAlertPolicies CreateOrUpdate. */ +public final class ServerSecurityAlertPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerSecurityAlertsCreateMin.json + */ + /** + * Sample code: Update a server's threat detection policy with minimal parameters. + * + * @param manager Entry point to MariaDBManager. + */ + public static void updateAServerSThreatDetectionPolicyWithMinimalParameters( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + ServerSecurityAlertPolicy resource = + manager + .serverSecurityAlertPolicies() + .getWithResponse( + "securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE) + .getValue(); + resource.update().withState(ServerSecurityAlertPolicyState.DISABLED).withEmailAccountAdmins(true).apply(); + } + + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerSecurityAlertsCreateMax.json + */ + /** + * Sample code: Update a server's threat detection policy with all parameters. + * + * @param manager Entry point to MariaDBManager. + */ + public static void updateAServerSThreatDetectionPolicyWithAllParameters( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + ServerSecurityAlertPolicy resource = + manager + .serverSecurityAlertPolicies() + .getWithResponse( + "securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE) + .getValue(); + resource + .update() + .withState(ServerSecurityAlertPolicyState.ENABLED) + .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly")) + .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com")) + .withEmailAccountAdmins(true) + .withStorageEndpoint("https://mystorage.blob.core.windows.net") + .withStorageAccountAccessKey( + "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") + .withRetentionDays(5) + .apply(); + } +} +``` + +### ServerSecurityAlertPolicies_Get + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.SecurityAlertPolicyName; + +/** Samples for ServerSecurityAlertPolicies Get. */ +public final class ServerSecurityAlertPoliciesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerSecurityAlertsGet.json + */ + /** + * Sample code: Get a server's threat detection policy. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getAServerSThreatDetectionPolicy(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .serverSecurityAlertPolicies() + .getWithResponse("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE); + } +} +``` + +### ServerSecurityAlertPolicies_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for ServerSecurityAlertPolicies ListByServer. */ +public final class ServerSecurityAlertPoliciesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerSecurityAlertsListByServer.json + */ + /** + * Sample code: List the server's threat detection policies. + * + * @param manager Entry point to MariaDBManager. + */ + public static void listTheServerSThreatDetectionPolicies(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.serverSecurityAlertPolicies().listByServer("securityalert-4799", "securityalert-6440", Context.NONE); + } +} +``` + +### Servers_Create + +```java +import com.azure.resourcemanager.mariadb.models.GeoRedundantBackup; +import com.azure.resourcemanager.mariadb.models.MinimalTlsVersionEnum; +import com.azure.resourcemanager.mariadb.models.ServerPropertiesForDefaultCreate; +import com.azure.resourcemanager.mariadb.models.ServerPropertiesForGeoRestore; +import com.azure.resourcemanager.mariadb.models.ServerPropertiesForReplica; +import com.azure.resourcemanager.mariadb.models.ServerPropertiesForRestore; +import com.azure.resourcemanager.mariadb.models.Sku; +import com.azure.resourcemanager.mariadb.models.SkuTier; +import com.azure.resourcemanager.mariadb.models.SslEnforcementEnum; +import com.azure.resourcemanager.mariadb.models.StorageProfile; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Servers Create. */ +public final class ServersCreateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateReplicaMode.json + */ + /** + * Sample code: Create a replica server. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createAReplicaServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .servers() + .define("targetserver") + .withRegion("westus") + .withExistingResourceGroup("TargetResourceGroup") + .withProperties( + new ServerPropertiesForReplica() + .withSourceServerId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver")) + .create(); + } + + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateGeoRestoreMode.json + */ + /** + * Sample code: Create a server as a geo restore. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createAServerAsAGeoRestore(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .servers() + .define("targetserver") + .withRegion("westus") + .withExistingResourceGroup("TargetResourceGroup") + .withProperties( + new ServerPropertiesForGeoRestore() + .withSourceServerId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver")) + .withTags(mapOf("ElasticServer", "1")) + .withSku( + new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5")) + .create(); + } + + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreate.json + */ + /** + * Sample code: Create a new server. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createANewServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .servers() + .define("mariadbtestsvc4") + .withRegion("westus") + .withExistingResourceGroup("testrg") + .withProperties( + new ServerPropertiesForDefaultCreate() + .withSslEnforcement(SslEnforcementEnum.ENABLED) + .withMinimalTlsVersion(MinimalTlsVersionEnum.TLS1_2) + .withStorageProfile( + new StorageProfile() + .withBackupRetentionDays(7) + .withGeoRedundantBackup(GeoRedundantBackup.ENABLED) + .withStorageMB(128000)) + .withAdministratorLogin("cloudsa") + .withAdministratorLoginPassword("")) + .withTags(mapOf("ElasticServer", "1")) + .withSku( + new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5")) + .create(); + } + + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreatePointInTimeRestore.json + */ + /** + * Sample code: Create a database as a point in time restore. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createADatabaseAsAPointInTimeRestore(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .servers() + .define("targetserver") + .withRegion("brazilsouth") + .withExistingResourceGroup("TargetResourceGroup") + .withProperties( + new ServerPropertiesForRestore() + .withSourceServerId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver") + .withRestorePointInTime(OffsetDateTime.parse("2017-12-14T00:00:37.467Z"))) + .withTags(mapOf("ElasticServer", "1")) + .withSku( + new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Servers_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Servers Delete. */ +public final class ServersDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerDelete.json + */ + /** + * Sample code: ServerDelete. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverDelete(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().delete("TestGroup", "testserver", Context.NONE); + } +} +``` + +### Servers_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Servers GetByResourceGroup. */ +public final class ServersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerGet.json + */ + /** + * Sample code: ServerGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().getByResourceGroupWithResponse("testrg", "mariadbtestsvc4", Context.NONE); + } +} +``` + +### Servers_List + +```java +import com.azure.core.util.Context; + +/** Samples for Servers List. */ +public final class ServersListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerList.json + */ + /** + * Sample code: ServerList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().list(Context.NONE); + } +} +``` + +### Servers_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Servers ListByResourceGroup. */ +public final class ServersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerListByResourceGroup.json + */ + /** + * Sample code: ServerListByResourceGroup. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverListByResourceGroup(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().listByResourceGroup("testrg", Context.NONE); + } +} +``` + +### Servers_Restart + +```java +import com.azure.core.util.Context; + +/** Samples for Servers Restart. */ +public final class ServersRestartSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerRestart.json + */ + /** + * Sample code: ServerRestart. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverRestart(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().restart("TestGroup", "testserver", Context.NONE); + } +} +``` + +### Servers_Start + +```java +import com.azure.core.util.Context; + +/** Samples for Servers Start. */ +public final class ServersStartSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2020-01-01/examples/ServerStart.json + */ + /** + * Sample code: ServerStart. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverStart(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().start("TestGroup", "testserver", Context.NONE); + } +} +``` + +### Servers_Stop + +```java +import com.azure.core.util.Context; + +/** Samples for Servers Stop. */ +public final class ServersStopSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2020-01-01/examples/ServerStop.json + */ + /** + * Sample code: ServerStop. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverStop(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().stop("TestGroup", "testserver", Context.NONE); + } +} +``` + +### Servers_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.Server; +import com.azure.resourcemanager.mariadb.models.SslEnforcementEnum; + +/** Samples for Servers Update. */ +public final class ServersUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerUpdate.json + */ + /** + * Sample code: ServerUpdate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverUpdate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + Server resource = + manager.servers().getByResourceGroupWithResponse("testrg", "mariadbtestsvc4", Context.NONE).getValue(); + resource + .update() + .withAdministratorLoginPassword("") + .withSslEnforcement(SslEnforcementEnum.DISABLED) + .apply(); + } +} +``` + +### TopQueryStatistics_Get + +```java +import com.azure.core.util.Context; + +/** Samples for TopQueryStatistics Get. */ +public final class TopQueryStatisticsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/TopQueryStatisticsGet.json + */ + /** + * Sample code: TopQueryStatisticsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void topQueryStatisticsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .topQueryStatistics() + .getWithResponse( + "testResourceGroupName", + "testServerName", + "66-636923268000000000-636923277000000000-avg-duration", + Context.NONE); + } +} +``` + +### TopQueryStatistics_ListByServer + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.TopQueryStatisticsInput; +import java.time.OffsetDateTime; + +/** Samples for TopQueryStatistics ListByServer. */ +public final class TopQueryStatisticsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/TopQueryStatisticsListByServer.json + */ + /** + * Sample code: TopQueryStatisticsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void topQueryStatisticsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .topQueryStatistics() + .listByServer( + "testResourceGroupName", + "testServerName", + new TopQueryStatisticsInput() + .withNumberOfTopQueries(5) + .withAggregationFunction("avg") + .withObservedMetric("duration") + .withObservationStartTime(OffsetDateTime.parse("2019-05-01T20:00:00.000Z")) + .withObservationEndTime(OffsetDateTime.parse("2019-05-07T20:00:00.000Z")) + .withAggregationWindow("PT15M"), + Context.NONE); + } +} +``` + +### VirtualNetworkRules_CreateOrUpdate + +```java +/** Samples for VirtualNetworkRules CreateOrUpdate. */ +public final class VirtualNetworkRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/VirtualNetworkRulesCreateOrUpdate.json + */ + /** + * Sample code: Create or update a virtual network rule. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createOrUpdateAVirtualNetworkRule(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .virtualNetworkRules() + .define("vnet-firewall-rule") + .withExistingServer("TestGroup", "vnet-test-svr") + .withVirtualNetworkSubnetId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet") + .withIgnoreMissingVnetServiceEndpoint(false) + .create(); + } +} +``` + +### VirtualNetworkRules_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules Delete. */ +public final class VirtualNetworkRulesDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/VirtualNetworkRulesDelete.json + */ + /** + * Sample code: Delete a virtual network rule. + * + * @param manager Entry point to MariaDBManager. + */ + public static void deleteAVirtualNetworkRule(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.virtualNetworkRules().delete("TestGroup", "vnet-test-svr", "vnet-firewall-rule", Context.NONE); + } +} +``` + +### VirtualNetworkRules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules Get. */ +public final class VirtualNetworkRulesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/VirtualNetworkRulesGet.json + */ + /** + * Sample code: Gets a virtual network rule. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsAVirtualNetworkRule(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.virtualNetworkRules().getWithResponse("TestGroup", "vnet-test-svr", "vnet-firewall-rule", Context.NONE); + } +} +``` + +### VirtualNetworkRules_ListByServer + +```java +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules ListByServer. */ +public final class VirtualNetworkRulesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/VirtualNetworkRulesList.json + */ + /** + * Sample code: List virtual network rules. + * + * @param manager Entry point to MariaDBManager. + */ + public static void listVirtualNetworkRules(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.virtualNetworkRules().listByServer("TestGroup", "vnet-test-svr", Context.NONE); + } +} +``` + +### WaitStatistics_Get + +```java +import com.azure.core.util.Context; + +/** Samples for WaitStatistics Get. */ +public final class WaitStatisticsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/WaitStatisticsGet.json + */ + /** + * Sample code: WaitStatisticsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void waitStatisticsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .waitStatistics() + .getWithResponse( + "testResourceGroupName", + "testServerName", + "636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", + Context.NONE); + } +} +``` + +### WaitStatistics_ListByServer + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.WaitStatisticsInput; +import java.time.OffsetDateTime; + +/** Samples for WaitStatistics ListByServer. */ +public final class WaitStatisticsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/WaitStatisticsListByServer.json + */ + /** + * Sample code: WaitStatisticsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void waitStatisticsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .waitStatistics() + .listByServer( + "testResourceGroupName", + "testServerName", + new WaitStatisticsInput() + .withObservationStartTime(OffsetDateTime.parse("2019-05-01T20:00:00.000Z")) + .withObservationEndTime(OffsetDateTime.parse("2019-05-07T20:00:00.000Z")) + .withAggregationWindow("PT15M"), + Context.NONE); + } +} +``` + diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/pom.xml b/sdk/mariadb/azure-resourcemanager-mariadb/pom.xml index f032e1a1fb58..1280a80e29f7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/pom.xml +++ b/sdk/mariadb/azure-resourcemanager-mariadb/pom.xml @@ -1,55 +1,55 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-mariadb - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-mariadb + 1.0.0-beta.2 + jar - Microsoft Azure SDK for MariaDB Management - This package contains Microsoft Azure SDK for MariaDB Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-2020-01-01. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for MariaDB Management + This package contains Microsoft Azure SDK for MariaDB Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MariaDB resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-2020-01-01. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - true - - - - com.azure - azure-core - 1.25.0 - - - com.azure - azure-core-management - 1.5.2 - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.25.0 + + + com.azure + azure-core-management + 1.5.2 + + diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/MariaDBManager.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/MariaDBManager.java index e4ae398e1f86..970d52a2949e 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/MariaDBManager.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/MariaDBManager.java @@ -8,8 +8,8 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,6 +17,7 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -75,6 +76,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** * Entry point to MariaDBManager. The Microsoft Azure management API provides create, read, update, and delete @@ -173,6 +175,7 @@ public static final class Configurable { private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -212,6 +215,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -268,20 +282,33 @@ public MariaDBManager authenticate(TokenCredential credential, AzureProfile prof userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/AdvisorsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/AdvisorsClient.java index 1093dae306ab..10111810be3d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/AdvisorsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/AdvisorsClient.java @@ -37,7 +37,7 @@ public interface AdvisorsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recommendation action advisor. + * @return a recommendation action advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/CheckNameAvailabilitiesClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/CheckNameAvailabilitiesClient.java index 0c7d979a5a56..5f6bcda672a6 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/CheckNameAvailabilitiesClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/CheckNameAvailabilitiesClient.java @@ -33,7 +33,7 @@ public interface CheckNameAvailabilitiesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. + * @return represents a resource name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response executeWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ConfigurationsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ConfigurationsClient.java index 9856aebab4fa..e8064d2751e9 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ConfigurationsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ConfigurationsClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.ConfigurationInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ConfigurationsClient. */ public interface ConfigurationsClient { @@ -25,9 +26,9 @@ public interface ConfigurationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters); @@ -42,9 +43,9 @@ SyncPoller, ConfigurationInner> beginCreateOrUpda * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -113,7 +114,7 @@ ConfigurationInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a configuration of server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/DatabasesClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/DatabasesClient.java index 517a87f63cb4..998b0b5e2e22 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/DatabasesClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/DatabasesClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.DatabaseInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in DatabasesClient. */ public interface DatabasesClient { @@ -25,9 +26,9 @@ public interface DatabasesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); @@ -42,9 +43,9 @@ SyncPoller, DatabaseInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context); @@ -90,9 +91,9 @@ DatabaseInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName); /** @@ -105,9 +106,9 @@ DatabaseInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String databaseName, Context context); @@ -162,7 +163,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/FirewallRulesClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/FirewallRulesClient.java index 43d28326ca3b..24553a0a1da1 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/FirewallRulesClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/FirewallRulesClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.FirewallRuleInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in FirewallRulesClient. */ public interface FirewallRulesClient { @@ -25,9 +26,9 @@ public interface FirewallRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters); @@ -42,9 +43,9 @@ SyncPoller, FirewallRuleInner> beginCreateOrUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -98,9 +99,9 @@ FirewallRuleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String firewallRuleName); @@ -114,9 +115,9 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String firewallRuleName, Context context); @@ -171,7 +172,7 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server firewall rule. + * @return information about a server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedRecommendedActionSessionsOperationStatusClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedRecommendedActionSessionsOperationStatusClient.java index 433c045661ee..408014d72ff7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedRecommendedActionSessionsOperationStatusClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedRecommendedActionSessionsOperationStatusClient.java @@ -37,7 +37,7 @@ public interface LocationBasedRecommendedActionSessionsOperationStatusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recommendation action session operation status. + * @return recommendation action session operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/OperationsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/OperationsClient.java index 6f08ab233906..80b622e34477 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/OperationsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/OperationsClient.java @@ -29,7 +29,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations. + * @return a list of resource provider operations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse(Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/PrivateEndpointConnectionsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/PrivateEndpointConnectionsClient.java index 70f6cec419a4..6debae5de532 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/PrivateEndpointConnectionsClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.mariadb.models.TagsObject; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { @@ -41,7 +42,7 @@ PrivateEndpointConnectionInner 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 private endpoint connection. + * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -57,9 +58,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -77,9 +78,9 @@ SyncPoller, PrivateEndpointConnection * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -136,9 +137,9 @@ PrivateEndpointConnectionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String privateEndpointConnectionName); @@ -152,9 +153,9 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); @@ -195,9 +196,9 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags( String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters); @@ -212,9 +213,9 @@ SyncPoller, PrivateEndpointConnection * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags( String resourceGroupName, String serverName, diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/PrivateLinkResourcesClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/PrivateLinkResourcesClient.java index bd47e7fd131d..bb2be76c1b11 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/PrivateLinkResourcesClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/PrivateLinkResourcesClient.java @@ -64,7 +64,7 @@ public interface PrivateLinkResourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 MariaDB server. + * @return a private link resource for MariaDB server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/QueryTextsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/QueryTextsClient.java index aa583343c951..c81e37c95e65 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/QueryTextsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/QueryTextsClient.java @@ -38,7 +38,7 @@ public interface QueryTextsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Text. + * @return represents a Query Text along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/RecommendedActionsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/RecommendedActionsClient.java index 5b1b89ba3206..a060a089acc5 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/RecommendedActionsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/RecommendedActionsClient.java @@ -40,7 +40,7 @@ RecommendationActionInner 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 represents a Recommendation Action. + * @return represents a Recommendation Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/RecoverableServersClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/RecoverableServersClient.java index e7387f5929a4..0c17e3565a2b 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/RecoverableServersClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/RecoverableServersClient.java @@ -34,7 +34,7 @@ public interface RecoverableServersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 MariaDB Server. + * @return a recoverable MariaDB Server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ResourceProvidersClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ResourceProvidersClient.java index badc0650866c..6222fe2446d5 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ResourceProvidersClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ResourceProvidersClient.java @@ -11,6 +11,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.QueryPerformanceInsightResetDataResultInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ public interface ResourceProvidersClient { @@ -37,7 +38,7 @@ QueryPerformanceInsightResetDataResultInner resetQueryPerformanceInsightData( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Query Performance Insight data reset. + * @return result of Query Performance Insight data reset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response resetQueryPerformanceInsightDataWithResponse( @@ -53,9 +54,9 @@ Response resetQueryPerformanceInsig * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginCreateRecommendedActionSession( String resourceGroupName, String serverName, String advisorName, String databaseName); @@ -70,9 +71,9 @@ SyncPoller, Void> beginCreateRecommendedActionSession( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginCreateRecommendedActionSession( String resourceGroupName, String serverName, String advisorName, String databaseName, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerParametersClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerParametersClient.java index e8993687377a..a58723bbd5b8 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerParametersClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerParametersClient.java @@ -6,10 +6,12 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.ConfigurationListResultInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ServerParametersClient. */ public interface ServerParametersClient { @@ -22,9 +24,9 @@ public interface ServerParametersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations( String resourceGroupName, String serverName, ConfigurationListResultInner value); @@ -38,9 +40,9 @@ SyncPoller, ConfigurationListResultInne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations( String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerSecurityAlertPoliciesClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerSecurityAlertPoliciesClient.java index a9019b58e368..58b5bbd28f7e 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerSecurityAlertPoliciesClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerSecurityAlertPoliciesClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner; import com.azure.resourcemanager.mariadb.models.SecurityAlertPolicyName; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. */ public interface ServerSecurityAlertPoliciesClient { @@ -41,7 +42,7 @@ ServerSecurityAlertPolicyInner 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's security alert policy. + * @return a server's security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -57,9 +58,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server security alert policy. + * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -77,9 +78,9 @@ SyncPoller, ServerSecurityAlertPolicy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 security alert policy. + * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServersClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServersClient.java index 69cba03c1aaa..de84457e6782 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServersClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServersClient.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.mariadb.fluent.models.ServerInner; import com.azure.resourcemanager.mariadb.models.ServerForCreate; import com.azure.resourcemanager.mariadb.models.ServerUpdateParameters; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in ServersClient. */ public interface ServersClient { @@ -26,9 +27,9 @@ public interface ServersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginCreate( String resourceGroupName, String serverName, ServerForCreate parameters); @@ -42,9 +43,9 @@ SyncPoller, ServerInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginCreate( String resourceGroupName, String serverName, ServerForCreate parameters, Context context); @@ -87,9 +88,9 @@ SyncPoller, ServerInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate( String resourceGroupName, String serverName, ServerUpdateParameters parameters); @@ -104,9 +105,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate( String resourceGroupName, String serverName, ServerUpdateParameters parameters, Context context); @@ -149,9 +150,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String serverName); /** @@ -163,9 +164,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context); /** @@ -215,7 +216,7 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); @@ -275,9 +276,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String serverName); /** @@ -289,9 +290,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String serverName, Context context); /** @@ -327,9 +328,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String serverName); /** @@ -341,9 +342,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context); /** @@ -379,9 +380,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop(String resourceGroupName, String serverName); /** @@ -393,9 +394,9 @@ SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop(String resourceGroupName, String serverName, Context context); /** diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/TopQueryStatisticsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/TopQueryStatisticsClient.java index 7f3b90aa0674..a2e49076b3a9 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/TopQueryStatisticsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/TopQueryStatisticsClient.java @@ -38,7 +38,7 @@ public interface TopQueryStatisticsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Statistic. + * @return represents a Query Statistic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/VirtualNetworkRulesClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/VirtualNetworkRulesClient.java index 12246f47698b..a5fd8f3e2849 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/VirtualNetworkRulesClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/VirtualNetworkRulesClient.java @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.VirtualNetworkRuleInner; +import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. */ public interface VirtualNetworkRulesClient { @@ -39,7 +40,7 @@ public interface VirtualNetworkRulesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -55,9 +56,9 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters); @@ -72,9 +73,9 @@ SyncPoller, VirtualNetworkRuleInner> beginCr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -128,9 +129,9 @@ VirtualNetworkRuleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String virtualNetworkRuleName); @@ -144,9 +145,9 @@ SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/WaitStatisticsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/WaitStatisticsClient.java index 8e964679696e..aeed94a82a4d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/WaitStatisticsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/WaitStatisticsClient.java @@ -38,7 +38,7 @@ public interface WaitStatisticsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Wait Statistic. + * @return represents a Wait Statistic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationInner.java index 4bfe0f597718..bd0d3dee463f 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationInner.java @@ -5,53 +5,30 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a Configuration. */ -@JsonFlatten @Fluent -public class ConfigurationInner extends ProxyResource { +public final class ConfigurationInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationInner.class); /* - * Value of the configuration. + * The properties of a configuration. */ - @JsonProperty(value = "properties.value") - private String value; + @JsonProperty(value = "properties") + private ConfigurationProperties innerProperties; - /* - * Description of the configuration. - */ - @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * Default value of the configuration. - */ - @JsonProperty(value = "properties.defaultValue", access = JsonProperty.Access.WRITE_ONLY) - private String defaultValue; - - /* - * Data type of the configuration. - */ - @JsonProperty(value = "properties.dataType", access = JsonProperty.Access.WRITE_ONLY) - private String dataType; - - /* - * Allowed values of the configuration. - */ - @JsonProperty(value = "properties.allowedValues", access = JsonProperty.Access.WRITE_ONLY) - private String allowedValues; - - /* - * Source of the configuration. + /** + * Get the innerProperties property: The properties of a configuration. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.source") - private String source; + private ConfigurationProperties innerProperties() { + return this.innerProperties; + } /** * Get the value property: Value of the configuration. @@ -59,7 +36,7 @@ public class ConfigurationInner extends ProxyResource { * @return the value value. */ public String value() { - return this.value; + return this.innerProperties() == null ? null : this.innerProperties().value(); } /** @@ -69,7 +46,10 @@ public String value() { * @return the ConfigurationInner object itself. */ public ConfigurationInner withValue(String value) { - this.value = value; + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationProperties(); + } + this.innerProperties().withValue(value); return this; } @@ -79,7 +59,7 @@ public ConfigurationInner withValue(String value) { * @return the description value. */ public String description() { - return this.description; + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** @@ -88,7 +68,7 @@ public String description() { * @return the defaultValue value. */ public String defaultValue() { - return this.defaultValue; + return this.innerProperties() == null ? null : this.innerProperties().defaultValue(); } /** @@ -97,7 +77,7 @@ public String defaultValue() { * @return the dataType value. */ public String dataType() { - return this.dataType; + return this.innerProperties() == null ? null : this.innerProperties().dataType(); } /** @@ -106,7 +86,7 @@ public String dataType() { * @return the allowedValues value. */ public String allowedValues() { - return this.allowedValues; + return this.innerProperties() == null ? null : this.innerProperties().allowedValues(); } /** @@ -115,7 +95,7 @@ public String allowedValues() { * @return the source value. */ public String source() { - return this.source; + return this.innerProperties() == null ? null : this.innerProperties().source(); } /** @@ -125,7 +105,10 @@ public String source() { * @return the ConfigurationInner object itself. */ public ConfigurationInner withSource(String source) { - this.source = source; + if (this.innerProperties() == null) { + this.innerProperties = new ConfigurationProperties(); + } + this.innerProperties().withSource(source); return this; } @@ -135,5 +118,8 @@ public ConfigurationInner withSource(String source) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationProperties.java new file mode 100644 index 000000000000..8f53533583ae --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of a configuration. */ +@Fluent +public final class ConfigurationProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationProperties.class); + + /* + * Value of the configuration. + */ + @JsonProperty(value = "value") + private String value; + + /* + * Description of the configuration. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Default value of the configuration. + */ + @JsonProperty(value = "defaultValue", access = JsonProperty.Access.WRITE_ONLY) + private String defaultValue; + + /* + * Data type of the configuration. + */ + @JsonProperty(value = "dataType", access = JsonProperty.Access.WRITE_ONLY) + private String dataType; + + /* + * Allowed values of the configuration. + */ + @JsonProperty(value = "allowedValues", access = JsonProperty.Access.WRITE_ONLY) + private String allowedValues; + + /* + * Source of the configuration. + */ + @JsonProperty(value = "source") + private String source; + + /** + * Get the value property: Value of the configuration. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Value of the configuration. + * + * @param value the value value to set. + * @return the ConfigurationProperties object itself. + */ + public ConfigurationProperties withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the description property: Description of the configuration. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the defaultValue property: Default value of the configuration. + * + * @return the defaultValue value. + */ + public String defaultValue() { + return this.defaultValue; + } + + /** + * Get the dataType property: Data type of the configuration. + * + * @return the dataType value. + */ + public String dataType() { + return this.dataType; + } + + /** + * Get the allowedValues property: Allowed values of the configuration. + * + * @return the allowedValues value. + */ + public String allowedValues() { + return this.allowedValues; + } + + /** + * Get the source property: Source of the configuration. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Source of the configuration. + * + * @param source the source value to set. + * @return the ConfigurationProperties object itself. + */ + public ConfigurationProperties withSource(String source) { + this.source = source; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseInner.java index af70d9b6c363..2cf51ab77f8f 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseInner.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a Database. */ -@JsonFlatten @Fluent -public class DatabaseInner extends ProxyResource { +public final class DatabaseInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class); /* - * The charset of the database. + * The properties of a database. */ - @JsonProperty(value = "properties.charset") - private String charset; + @JsonProperty(value = "properties") + private DatabaseProperties innerProperties; - /* - * The collation of the database. + /** + * Get the innerProperties property: The properties of a database. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.collation") - private String collation; + private DatabaseProperties innerProperties() { + return this.innerProperties; + } /** * Get the charset property: The charset of the database. @@ -35,7 +36,7 @@ public class DatabaseInner extends ProxyResource { * @return the charset value. */ public String charset() { - return this.charset; + return this.innerProperties() == null ? null : this.innerProperties().charset(); } /** @@ -45,7 +46,10 @@ public String charset() { * @return the DatabaseInner object itself. */ public DatabaseInner withCharset(String charset) { - this.charset = charset; + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseProperties(); + } + this.innerProperties().withCharset(charset); return this; } @@ -55,7 +59,7 @@ public DatabaseInner withCharset(String charset) { * @return the collation value. */ public String collation() { - return this.collation; + return this.innerProperties() == null ? null : this.innerProperties().collation(); } /** @@ -65,7 +69,10 @@ public String collation() { * @return the DatabaseInner object itself. */ public DatabaseInner withCollation(String collation) { - this.collation = collation; + if (this.innerProperties() == null) { + this.innerProperties = new DatabaseProperties(); + } + this.innerProperties().withCollation(collation); return this; } @@ -75,5 +82,8 @@ public DatabaseInner withCollation(String collation) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseProperties.java new file mode 100644 index 000000000000..b7cc6e5ed282 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of a database. */ +@Fluent +public final class DatabaseProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseProperties.class); + + /* + * The charset of the database. + */ + @JsonProperty(value = "charset") + private String charset; + + /* + * The collation of the database. + */ + @JsonProperty(value = "collation") + private String collation; + + /** + * Get the charset property: The charset of the database. + * + * @return the charset value. + */ + public String charset() { + return this.charset; + } + + /** + * Set the charset property: The charset of the database. + * + * @param charset the charset value to set. + * @return the DatabaseProperties object itself. + */ + public DatabaseProperties withCharset(String charset) { + this.charset = charset; + return this; + } + + /** + * Get the collation property: The collation of the database. + * + * @return the collation value. + */ + public String collation() { + return this.collation; + } + + /** + * Set the collation property: The collation of the database. + * + * @param collation the collation value to set. + * @return the DatabaseProperties object itself. + */ + public DatabaseProperties withCollation(String collation) { + this.collation = collation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleInner.java index 56e68a42d7af..bc28afac0278 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleInner.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a server firewall rule. */ -@JsonFlatten @Fluent -public class FirewallRuleInner extends ProxyResource { +public final class FirewallRuleInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleInner.class); /* - * The start IP address of the server firewall rule. Must be IPv4 format. + * The properties of a firewall rule. */ - @JsonProperty(value = "properties.startIpAddress", required = true) - private String startIpAddress; + @JsonProperty(value = "properties", required = true) + private FirewallRuleProperties innerProperties = new FirewallRuleProperties(); - /* - * The end IP address of the server firewall rule. Must be IPv4 format. + /** + * Get the innerProperties property: The properties of a firewall rule. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.endIpAddress", required = true) - private String endIpAddress; + private FirewallRuleProperties innerProperties() { + return this.innerProperties; + } /** * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. @@ -35,7 +36,7 @@ public class FirewallRuleInner extends ProxyResource { * @return the startIpAddress value. */ public String startIpAddress() { - return this.startIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().startIpAddress(); } /** @@ -45,7 +46,10 @@ public String startIpAddress() { * @return the FirewallRuleInner object itself. */ public FirewallRuleInner withStartIpAddress(String startIpAddress) { - this.startIpAddress = startIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new FirewallRuleProperties(); + } + this.innerProperties().withStartIpAddress(startIpAddress); return this; } @@ -55,7 +59,7 @@ public FirewallRuleInner withStartIpAddress(String startIpAddress) { * @return the endIpAddress value. */ public String endIpAddress() { - return this.endIpAddress; + return this.innerProperties() == null ? null : this.innerProperties().endIpAddress(); } /** @@ -65,7 +69,10 @@ public String endIpAddress() { * @return the FirewallRuleInner object itself. */ public FirewallRuleInner withEndIpAddress(String endIpAddress) { - this.endIpAddress = endIpAddress; + if (this.innerProperties() == null) { + this.innerProperties = new FirewallRuleProperties(); + } + this.innerProperties().withEndIpAddress(endIpAddress); return this; } @@ -75,16 +82,13 @@ public FirewallRuleInner withEndIpAddress(String endIpAddress) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (startIpAddress() == null) { + if (innerProperties() == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - "Missing required property startIpAddress in model FirewallRuleInner")); - } - if (endIpAddress() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property endIpAddress in model FirewallRuleInner")); + "Missing required property innerProperties in model FirewallRuleInner")); + } else { + innerProperties().validate(); } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleProperties.java new file mode 100644 index 000000000000..6d138ffedbf6 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleProperties.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of a server firewall rule. */ +@Fluent +public final class FirewallRuleProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleProperties.class); + + /* + * The start IP address of the server firewall rule. Must be IPv4 format. + */ + @JsonProperty(value = "startIpAddress", required = true) + private String startIpAddress; + + /* + * The end IP address of the server firewall rule. Must be IPv4 format. + */ + @JsonProperty(value = "endIpAddress", required = true) + private String endIpAddress; + + /** + * Get the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * + * @return the startIpAddress value. + */ + public String startIpAddress() { + return this.startIpAddress; + } + + /** + * Set the startIpAddress property: The start IP address of the server firewall rule. Must be IPv4 format. + * + * @param startIpAddress the startIpAddress value to set. + * @return the FirewallRuleProperties object itself. + */ + public FirewallRuleProperties withStartIpAddress(String startIpAddress) { + this.startIpAddress = startIpAddress; + return this; + } + + /** + * Get the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * + * @return the endIpAddress value. + */ + public String endIpAddress() { + return this.endIpAddress; + } + + /** + * Set the endIpAddress property: The end IP address of the server firewall rule. Must be IPv4 format. + * + * @param endIpAddress the endIpAddress value to set. + * @return the FirewallRuleProperties object itself. + */ + public FirewallRuleProperties withEndIpAddress(String endIpAddress) { + this.endIpAddress = endIpAddress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (startIpAddress() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property startIpAddress in model FirewallRuleProperties")); + } + if (endIpAddress() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property endIpAddress in model FirewallRuleProperties")); + } + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileInner.java index 804a63f60f13..24c05dcd4221 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -13,40 +12,24 @@ import java.time.OffsetDateTime; /** Represents a log file. */ -@JsonFlatten @Fluent -public class LogFileInner extends ProxyResource { +public final class LogFileInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(LogFileInner.class); /* - * Size of the log file. + * The properties of the log file. */ - @JsonProperty(value = "properties.sizeInKB") - private Long sizeInKB; + @JsonProperty(value = "properties") + private LogFileProperties innerProperties; - /* - * Creation timestamp of the log file. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTime; - - /* - * Last modified timestamp of the log file. - */ - @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTime; - - /* - * Type of the log file. - */ - @JsonProperty(value = "properties.type") - private String typePropertiesType; - - /* - * The url to download the log file from. + /** + * Get the innerProperties property: The properties of the log file. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.url", access = JsonProperty.Access.WRITE_ONLY) - private String url; + private LogFileProperties innerProperties() { + return this.innerProperties; + } /** * Get the sizeInKB property: Size of the log file. @@ -54,7 +37,7 @@ public class LogFileInner extends ProxyResource { * @return the sizeInKB value. */ public Long sizeInKB() { - return this.sizeInKB; + return this.innerProperties() == null ? null : this.innerProperties().sizeInKB(); } /** @@ -64,7 +47,10 @@ public Long sizeInKB() { * @return the LogFileInner object itself. */ public LogFileInner withSizeInKB(Long sizeInKB) { - this.sizeInKB = sizeInKB; + if (this.innerProperties() == null) { + this.innerProperties = new LogFileProperties(); + } + this.innerProperties().withSizeInKB(sizeInKB); return this; } @@ -74,7 +60,7 @@ public LogFileInner withSizeInKB(Long sizeInKB) { * @return the createdTime value. */ public OffsetDateTime createdTime() { - return this.createdTime; + return this.innerProperties() == null ? null : this.innerProperties().createdTime(); } /** @@ -83,26 +69,29 @@ public OffsetDateTime createdTime() { * @return the lastModifiedTime value. */ public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTime(); } /** - * Get the typePropertiesType property: Type of the log file. + * Get the type property: Type of the log file. * - * @return the typePropertiesType value. + * @return the type value. */ public String typePropertiesType() { - return this.typePropertiesType; + return this.innerProperties() == null ? null : this.innerProperties().type(); } /** - * Set the typePropertiesType property: Type of the log file. + * Set the type property: Type of the log file. * - * @param typePropertiesType the typePropertiesType value to set. + * @param type the type value to set. * @return the LogFileInner object itself. */ - public LogFileInner withTypePropertiesType(String typePropertiesType) { - this.typePropertiesType = typePropertiesType; + public LogFileInner withTypePropertiesType(String type) { + if (this.innerProperties() == null) { + this.innerProperties = new LogFileProperties(); + } + this.innerProperties().withType(type); return this; } @@ -112,7 +101,7 @@ public LogFileInner withTypePropertiesType(String typePropertiesType) { * @return the url value. */ public String url() { - return this.url; + return this.innerProperties() == null ? null : this.innerProperties().url(); } /** @@ -121,5 +110,8 @@ public String url() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileProperties.java new file mode 100644 index 000000000000..0fe086e529dc --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileProperties.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties of a log file. */ +@Fluent +public final class LogFileProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LogFileProperties.class); + + /* + * Size of the log file. + */ + @JsonProperty(value = "sizeInKB") + private Long sizeInKB; + + /* + * Creation timestamp of the log file. + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTime; + + /* + * Last modified timestamp of the log file. + */ + @JsonProperty(value = "lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedTime; + + /* + * Type of the log file. + */ + @JsonProperty(value = "type") + private String type; + + /* + * The url to download the log file from. + */ + @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) + private String url; + + /** + * Get the sizeInKB property: Size of the log file. + * + * @return the sizeInKB value. + */ + public Long sizeInKB() { + return this.sizeInKB; + } + + /** + * Set the sizeInKB property: Size of the log file. + * + * @param sizeInKB the sizeInKB value to set. + * @return the LogFileProperties object itself. + */ + public LogFileProperties withSizeInKB(Long sizeInKB) { + this.sizeInKB = sizeInKB; + return this; + } + + /** + * Get the createdTime property: Creation timestamp of the log file. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.createdTime; + } + + /** + * Get the lastModifiedTime property: Last modified timestamp of the log file. + * + * @return the lastModifiedTime value. + */ + public OffsetDateTime lastModifiedTime() { + return this.lastModifiedTime; + } + + /** + * Get the type property: Type of the log file. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Type of the log file. + * + * @param type the type value to set. + * @return the LogFileProperties object itself. + */ + public LogFileProperties withType(String type) { + this.type = type; + return this; + } + + /** + * Get the url property: The url to download the log file from. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionInner.java index 6e908201b18f..fa5b2ac73153 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.models.PrivateEndpointProperty; @@ -14,28 +13,24 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A private endpoint connection. */ -@JsonFlatten @Fluent -public class PrivateEndpointConnectionInner extends ProxyResource { +public final class PrivateEndpointConnectionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); /* - * Private endpoint which the connection belongs to. + * Resource properties. */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpointProperty privateEndpoint; + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; - /* - * Connection state of the private endpoint connection. - */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState; - - /* - * State of the private endpoint connection. + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } /** * Get the privateEndpoint property: Private endpoint which the connection belongs to. @@ -43,7 +38,7 @@ public class PrivateEndpointConnectionInner extends ProxyResource { * @return the privateEndpoint value. */ public PrivateEndpointProperty privateEndpoint() { - return this.privateEndpoint; + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); } /** @@ -53,7 +48,10 @@ public PrivateEndpointProperty privateEndpoint() { * @return the PrivateEndpointConnectionInner object itself. */ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) { - this.privateEndpoint = privateEndpoint; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); return this; } @@ -63,7 +61,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpointPropert * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); } /** @@ -74,7 +72,10 @@ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionSta */ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } @@ -84,7 +85,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -93,11 +94,8 @@ public String provisioningState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..c247e7a6dd59 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mariadb.models.PrivateEndpointProperty; +import com.azure.resourcemanager.mariadb.models.PrivateLinkServiceConnectionStateProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a private endpoint connection. */ +@Fluent +public final class PrivateEndpointConnectionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); + + /* + * Private endpoint which the connection belongs to. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpointProperty privateEndpoint; + + /* + * 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 String provisioningState; + + /** + * Get the privateEndpoint property: Private endpoint which the connection belongs to. + * + * @return the privateEndpoint value. + */ + public PrivateEndpointProperty privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: Private endpoint which the connection belongs to. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpointProperty privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioningState property: State of the private endpoint connection. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticInner.java index 0898f2f39b47..035c8d252e55 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -14,70 +13,24 @@ import java.util.List; /** Represents a Query Statistic. */ -@JsonFlatten @Fluent -public class QueryStatisticInner extends ProxyResource { +public final class QueryStatisticInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryStatisticInner.class); /* - * Database query identifier. + * The properties of a query statistic. */ - @JsonProperty(value = "properties.queryId") - private String queryId; + @JsonProperty(value = "properties") + private QueryStatisticProperties innerProperties; - /* - * Observation start time. - */ - @JsonProperty(value = "properties.startTime") - private OffsetDateTime startTime; - - /* - * Observation end time. - */ - @JsonProperty(value = "properties.endTime") - private OffsetDateTime endTime; - - /* - * Aggregation function name. - */ - @JsonProperty(value = "properties.aggregationFunction") - private String aggregationFunction; - - /* - * The list of database names. - */ - @JsonProperty(value = "properties.databaseNames") - private List databaseNames; - - /* - * Number of query executions in this time interval. - */ - @JsonProperty(value = "properties.queryExecutionCount") - private Long queryExecutionCount; - - /* - * Metric name. - */ - @JsonProperty(value = "properties.metricName") - private String metricName; - - /* - * Metric display name. - */ - @JsonProperty(value = "properties.metricDisplayName") - private String metricDisplayName; - - /* - * Metric value. - */ - @JsonProperty(value = "properties.metricValue") - private Double metricValue; - - /* - * Metric value unit. + /** + * Get the innerProperties property: The properties of a query statistic. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.metricValueUnit") - private String metricValueUnit; + private QueryStatisticProperties innerProperties() { + return this.innerProperties; + } /** * Get the queryId property: Database query identifier. @@ -85,7 +38,7 @@ public class QueryStatisticInner extends ProxyResource { * @return the queryId value. */ public String queryId() { - return this.queryId; + return this.innerProperties() == null ? null : this.innerProperties().queryId(); } /** @@ -95,7 +48,10 @@ public String queryId() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withQueryId(String queryId) { - this.queryId = queryId; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withQueryId(queryId); return this; } @@ -105,7 +61,7 @@ public QueryStatisticInner withQueryId(String queryId) { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.startTime; + return this.innerProperties() == null ? null : this.innerProperties().startTime(); } /** @@ -115,7 +71,10 @@ public OffsetDateTime startTime() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withStartTime(startTime); return this; } @@ -125,7 +84,7 @@ public QueryStatisticInner withStartTime(OffsetDateTime startTime) { * @return the endTime value. */ public OffsetDateTime endTime() { - return this.endTime; + return this.innerProperties() == null ? null : this.innerProperties().endTime(); } /** @@ -135,7 +94,10 @@ public OffsetDateTime endTime() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withEndTime(endTime); return this; } @@ -145,7 +107,7 @@ public QueryStatisticInner withEndTime(OffsetDateTime endTime) { * @return the aggregationFunction value. */ public String aggregationFunction() { - return this.aggregationFunction; + return this.innerProperties() == null ? null : this.innerProperties().aggregationFunction(); } /** @@ -155,7 +117,10 @@ public String aggregationFunction() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withAggregationFunction(String aggregationFunction) { - this.aggregationFunction = aggregationFunction; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withAggregationFunction(aggregationFunction); return this; } @@ -165,7 +130,7 @@ public QueryStatisticInner withAggregationFunction(String aggregationFunction) { * @return the databaseNames value. */ public List databaseNames() { - return this.databaseNames; + return this.innerProperties() == null ? null : this.innerProperties().databaseNames(); } /** @@ -175,7 +140,10 @@ public List databaseNames() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withDatabaseNames(List databaseNames) { - this.databaseNames = databaseNames; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withDatabaseNames(databaseNames); return this; } @@ -185,7 +153,7 @@ public QueryStatisticInner withDatabaseNames(List databaseNames) { * @return the queryExecutionCount value. */ public Long queryExecutionCount() { - return this.queryExecutionCount; + return this.innerProperties() == null ? null : this.innerProperties().queryExecutionCount(); } /** @@ -195,7 +163,10 @@ public Long queryExecutionCount() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withQueryExecutionCount(Long queryExecutionCount) { - this.queryExecutionCount = queryExecutionCount; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withQueryExecutionCount(queryExecutionCount); return this; } @@ -205,7 +176,7 @@ public QueryStatisticInner withQueryExecutionCount(Long queryExecutionCount) { * @return the metricName value. */ public String metricName() { - return this.metricName; + return this.innerProperties() == null ? null : this.innerProperties().metricName(); } /** @@ -215,7 +186,10 @@ public String metricName() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withMetricName(String metricName) { - this.metricName = metricName; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withMetricName(metricName); return this; } @@ -225,7 +199,7 @@ public QueryStatisticInner withMetricName(String metricName) { * @return the metricDisplayName value. */ public String metricDisplayName() { - return this.metricDisplayName; + return this.innerProperties() == null ? null : this.innerProperties().metricDisplayName(); } /** @@ -235,7 +209,10 @@ public String metricDisplayName() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withMetricDisplayName(String metricDisplayName) { - this.metricDisplayName = metricDisplayName; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withMetricDisplayName(metricDisplayName); return this; } @@ -245,7 +222,7 @@ public QueryStatisticInner withMetricDisplayName(String metricDisplayName) { * @return the metricValue value. */ public Double metricValue() { - return this.metricValue; + return this.innerProperties() == null ? null : this.innerProperties().metricValue(); } /** @@ -255,7 +232,10 @@ public Double metricValue() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withMetricValue(Double metricValue) { - this.metricValue = metricValue; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withMetricValue(metricValue); return this; } @@ -265,7 +245,7 @@ public QueryStatisticInner withMetricValue(Double metricValue) { * @return the metricValueUnit value. */ public String metricValueUnit() { - return this.metricValueUnit; + return this.innerProperties() == null ? null : this.innerProperties().metricValueUnit(); } /** @@ -275,7 +255,10 @@ public String metricValueUnit() { * @return the QueryStatisticInner object itself. */ public QueryStatisticInner withMetricValueUnit(String metricValueUnit) { - this.metricValueUnit = metricValueUnit; + if (this.innerProperties() == null) { + this.innerProperties = new QueryStatisticProperties(); + } + this.innerProperties().withMetricValueUnit(metricValueUnit); return this; } @@ -285,5 +268,8 @@ public QueryStatisticInner withMetricValueUnit(String metricValueUnit) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticProperties.java new file mode 100644 index 000000000000..02f9f10f2e40 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticProperties.java @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The properties of a query statistic. */ +@Fluent +public final class QueryStatisticProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryStatisticProperties.class); + + /* + * Database query identifier. + */ + @JsonProperty(value = "queryId") + private String queryId; + + /* + * Observation start time. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * Observation end time. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Aggregation function name. + */ + @JsonProperty(value = "aggregationFunction") + private String aggregationFunction; + + /* + * The list of database names. + */ + @JsonProperty(value = "databaseNames") + private List databaseNames; + + /* + * Number of query executions in this time interval. + */ + @JsonProperty(value = "queryExecutionCount") + private Long queryExecutionCount; + + /* + * Metric name. + */ + @JsonProperty(value = "metricName") + private String metricName; + + /* + * Metric display name. + */ + @JsonProperty(value = "metricDisplayName") + private String metricDisplayName; + + /* + * Metric value. + */ + @JsonProperty(value = "metricValue") + private Double metricValue; + + /* + * Metric value unit. + */ + @JsonProperty(value = "metricValueUnit") + private String metricValueUnit; + + /** + * Get the queryId property: Database query identifier. + * + * @return the queryId value. + */ + public String queryId() { + return this.queryId; + } + + /** + * Set the queryId property: Database query identifier. + * + * @param queryId the queryId value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withQueryId(String queryId) { + this.queryId = queryId; + return this; + } + + /** + * Get the startTime property: Observation start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Observation start time. + * + * @param startTime the startTime value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: Observation end time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Observation end time. + * + * @param endTime the endTime value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the aggregationFunction property: Aggregation function name. + * + * @return the aggregationFunction value. + */ + public String aggregationFunction() { + return this.aggregationFunction; + } + + /** + * Set the aggregationFunction property: Aggregation function name. + * + * @param aggregationFunction the aggregationFunction value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withAggregationFunction(String aggregationFunction) { + this.aggregationFunction = aggregationFunction; + return this; + } + + /** + * Get the databaseNames property: The list of database names. + * + * @return the databaseNames value. + */ + public List databaseNames() { + return this.databaseNames; + } + + /** + * Set the databaseNames property: The list of database names. + * + * @param databaseNames the databaseNames value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withDatabaseNames(List databaseNames) { + this.databaseNames = databaseNames; + return this; + } + + /** + * Get the queryExecutionCount property: Number of query executions in this time interval. + * + * @return the queryExecutionCount value. + */ + public Long queryExecutionCount() { + return this.queryExecutionCount; + } + + /** + * Set the queryExecutionCount property: Number of query executions in this time interval. + * + * @param queryExecutionCount the queryExecutionCount value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withQueryExecutionCount(Long queryExecutionCount) { + this.queryExecutionCount = queryExecutionCount; + return this; + } + + /** + * Get the metricName property: Metric name. + * + * @return the metricName value. + */ + public String metricName() { + return this.metricName; + } + + /** + * Set the metricName property: Metric name. + * + * @param metricName the metricName value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withMetricName(String metricName) { + this.metricName = metricName; + return this; + } + + /** + * Get the metricDisplayName property: Metric display name. + * + * @return the metricDisplayName value. + */ + public String metricDisplayName() { + return this.metricDisplayName; + } + + /** + * Set the metricDisplayName property: Metric display name. + * + * @param metricDisplayName the metricDisplayName value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withMetricDisplayName(String metricDisplayName) { + this.metricDisplayName = metricDisplayName; + return this; + } + + /** + * Get the metricValue property: Metric value. + * + * @return the metricValue value. + */ + public Double metricValue() { + return this.metricValue; + } + + /** + * Set the metricValue property: Metric value. + * + * @param metricValue the metricValue value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withMetricValue(Double metricValue) { + this.metricValue = metricValue; + return this; + } + + /** + * Get the metricValueUnit property: Metric value unit. + * + * @return the metricValueUnit value. + */ + public String metricValueUnit() { + return this.metricValueUnit; + } + + /** + * Set the metricValueUnit property: Metric value unit. + * + * @param metricValueUnit the metricValueUnit value to set. + * @return the QueryStatisticProperties object itself. + */ + public QueryStatisticProperties withMetricValueUnit(String metricValueUnit) { + this.metricValueUnit = metricValueUnit; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextInner.java index ec8383391676..1fa9e160e6fc 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextInner.java @@ -5,29 +5,30 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a Query Text. */ -@JsonFlatten @Fluent -public class QueryTextInner extends ProxyResource { +public final class QueryTextInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryTextInner.class); /* - * Query identifier unique to the server. + * The properties of a query text. */ - @JsonProperty(value = "properties.queryId") - private String queryId; + @JsonProperty(value = "properties") + private QueryTextProperties innerProperties; - /* - * Query text. + /** + * Get the innerProperties property: The properties of a query text. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.queryText") - private String queryText; + private QueryTextProperties innerProperties() { + return this.innerProperties; + } /** * Get the queryId property: Query identifier unique to the server. @@ -35,7 +36,7 @@ public class QueryTextInner extends ProxyResource { * @return the queryId value. */ public String queryId() { - return this.queryId; + return this.innerProperties() == null ? null : this.innerProperties().queryId(); } /** @@ -45,7 +46,10 @@ public String queryId() { * @return the QueryTextInner object itself. */ public QueryTextInner withQueryId(String queryId) { - this.queryId = queryId; + if (this.innerProperties() == null) { + this.innerProperties = new QueryTextProperties(); + } + this.innerProperties().withQueryId(queryId); return this; } @@ -55,7 +59,7 @@ public QueryTextInner withQueryId(String queryId) { * @return the queryText value. */ public String queryText() { - return this.queryText; + return this.innerProperties() == null ? null : this.innerProperties().queryText(); } /** @@ -65,7 +69,10 @@ public String queryText() { * @return the QueryTextInner object itself. */ public QueryTextInner withQueryText(String queryText) { - this.queryText = queryText; + if (this.innerProperties() == null) { + this.innerProperties = new QueryTextProperties(); + } + this.innerProperties().withQueryText(queryText); return this; } @@ -75,5 +82,8 @@ public QueryTextInner withQueryText(String queryText) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextProperties.java new file mode 100644 index 000000000000..0895ad0fc599 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of a query text. */ +@Fluent +public final class QueryTextProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryTextProperties.class); + + /* + * Query identifier unique to the server. + */ + @JsonProperty(value = "queryId") + private String queryId; + + /* + * Query text. + */ + @JsonProperty(value = "queryText") + private String queryText; + + /** + * Get the queryId property: Query identifier unique to the server. + * + * @return the queryId value. + */ + public String queryId() { + return this.queryId; + } + + /** + * Set the queryId property: Query identifier unique to the server. + * + * @param queryId the queryId value to set. + * @return the QueryTextProperties object itself. + */ + public QueryTextProperties withQueryId(String queryId) { + this.queryId = queryId; + return this; + } + + /** + * Get the queryText property: Query text. + * + * @return the queryText value. + */ + public String queryText() { + return this.queryText; + } + + /** + * Set the queryText property: Query text. + * + * @param queryText the queryText value to set. + * @return the QueryTextProperties object itself. + */ + public QueryTextProperties withQueryText(String queryText) { + this.queryText = queryText; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionInner.java index 5896f4072a3d..e2a2ce1d202f 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -14,58 +13,24 @@ import java.util.Map; /** Represents a Recommendation Action. */ -@JsonFlatten @Fluent -public class RecommendationActionInner extends ProxyResource { +public final class RecommendationActionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationActionInner.class); /* - * Advisor name. + * The properties of a recommendation action. */ - @JsonProperty(value = "properties.advisorName") - private String advisorName; + @JsonProperty(value = "properties") + private RecommendationActionProperties innerProperties; - /* - * Recommendation action session identifier. - */ - @JsonProperty(value = "properties.sessionId") - private String sessionId; - - /* - * Recommendation action identifier. - */ - @JsonProperty(value = "properties.actionId") - private Integer actionId; - - /* - * Recommendation action creation time. - */ - @JsonProperty(value = "properties.createdTime") - private OffsetDateTime createdTime; - - /* - * Recommendation action expiration time. - */ - @JsonProperty(value = "properties.expirationTime") - private OffsetDateTime expirationTime; - - /* - * Recommendation action reason. - */ - @JsonProperty(value = "properties.reason") - private String reason; - - /* - * Recommendation action type. - */ - @JsonProperty(value = "properties.recommendationType") - private String recommendationType; - - /* - * Recommendation action details. + /** + * Get the innerProperties property: The properties of a recommendation action. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.details") - private Map details; + private RecommendationActionProperties innerProperties() { + return this.innerProperties; + } /** * Get the advisorName property: Advisor name. @@ -73,7 +38,7 @@ public class RecommendationActionInner extends ProxyResource { * @return the advisorName value. */ public String advisorName() { - return this.advisorName; + return this.innerProperties() == null ? null : this.innerProperties().advisorName(); } /** @@ -83,7 +48,10 @@ public String advisorName() { * @return the RecommendationActionInner object itself. */ public RecommendationActionInner withAdvisorName(String advisorName) { - this.advisorName = advisorName; + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationActionProperties(); + } + this.innerProperties().withAdvisorName(advisorName); return this; } @@ -93,7 +61,7 @@ public RecommendationActionInner withAdvisorName(String advisorName) { * @return the sessionId value. */ public String sessionId() { - return this.sessionId; + return this.innerProperties() == null ? null : this.innerProperties().sessionId(); } /** @@ -103,7 +71,10 @@ public String sessionId() { * @return the RecommendationActionInner object itself. */ public RecommendationActionInner withSessionId(String sessionId) { - this.sessionId = sessionId; + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationActionProperties(); + } + this.innerProperties().withSessionId(sessionId); return this; } @@ -113,7 +84,7 @@ public RecommendationActionInner withSessionId(String sessionId) { * @return the actionId value. */ public Integer actionId() { - return this.actionId; + return this.innerProperties() == null ? null : this.innerProperties().actionId(); } /** @@ -123,7 +94,10 @@ public Integer actionId() { * @return the RecommendationActionInner object itself. */ public RecommendationActionInner withActionId(Integer actionId) { - this.actionId = actionId; + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationActionProperties(); + } + this.innerProperties().withActionId(actionId); return this; } @@ -133,7 +107,7 @@ public RecommendationActionInner withActionId(Integer actionId) { * @return the createdTime value. */ public OffsetDateTime createdTime() { - return this.createdTime; + return this.innerProperties() == null ? null : this.innerProperties().createdTime(); } /** @@ -143,7 +117,10 @@ public OffsetDateTime createdTime() { * @return the RecommendationActionInner object itself. */ public RecommendationActionInner withCreatedTime(OffsetDateTime createdTime) { - this.createdTime = createdTime; + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationActionProperties(); + } + this.innerProperties().withCreatedTime(createdTime); return this; } @@ -153,7 +130,7 @@ public RecommendationActionInner withCreatedTime(OffsetDateTime createdTime) { * @return the expirationTime value. */ public OffsetDateTime expirationTime() { - return this.expirationTime; + return this.innerProperties() == null ? null : this.innerProperties().expirationTime(); } /** @@ -163,7 +140,10 @@ public OffsetDateTime expirationTime() { * @return the RecommendationActionInner object itself. */ public RecommendationActionInner withExpirationTime(OffsetDateTime expirationTime) { - this.expirationTime = expirationTime; + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationActionProperties(); + } + this.innerProperties().withExpirationTime(expirationTime); return this; } @@ -173,7 +153,7 @@ public RecommendationActionInner withExpirationTime(OffsetDateTime expirationTim * @return the reason value. */ public String reason() { - return this.reason; + return this.innerProperties() == null ? null : this.innerProperties().reason(); } /** @@ -183,7 +163,10 @@ public String reason() { * @return the RecommendationActionInner object itself. */ public RecommendationActionInner withReason(String reason) { - this.reason = reason; + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationActionProperties(); + } + this.innerProperties().withReason(reason); return this; } @@ -193,7 +176,7 @@ public RecommendationActionInner withReason(String reason) { * @return the recommendationType value. */ public String recommendationType() { - return this.recommendationType; + return this.innerProperties() == null ? null : this.innerProperties().recommendationType(); } /** @@ -203,7 +186,10 @@ public String recommendationType() { * @return the RecommendationActionInner object itself. */ public RecommendationActionInner withRecommendationType(String recommendationType) { - this.recommendationType = recommendationType; + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationActionProperties(); + } + this.innerProperties().withRecommendationType(recommendationType); return this; } @@ -213,7 +199,7 @@ public RecommendationActionInner withRecommendationType(String recommendationTyp * @return the details value. */ public Map details() { - return this.details; + return this.innerProperties() == null ? null : this.innerProperties().details(); } /** @@ -223,7 +209,10 @@ public Map details() { * @return the RecommendationActionInner object itself. */ public RecommendationActionInner withDetails(Map details) { - this.details = details; + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationActionProperties(); + } + this.innerProperties().withDetails(details); return this; } @@ -233,5 +222,8 @@ public RecommendationActionInner withDetails(Map details) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionProperties.java new file mode 100644 index 000000000000..485970f7461b --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionProperties.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** The properties of a recommendation action. */ +@Fluent +public final class RecommendationActionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationActionProperties.class); + + /* + * Advisor name. + */ + @JsonProperty(value = "advisorName") + private String advisorName; + + /* + * Recommendation action session identifier. + */ + @JsonProperty(value = "sessionId") + private String sessionId; + + /* + * Recommendation action identifier. + */ + @JsonProperty(value = "actionId") + private Integer actionId; + + /* + * Recommendation action creation time. + */ + @JsonProperty(value = "createdTime") + private OffsetDateTime createdTime; + + /* + * Recommendation action expiration time. + */ + @JsonProperty(value = "expirationTime") + private OffsetDateTime expirationTime; + + /* + * Recommendation action reason. + */ + @JsonProperty(value = "reason") + private String reason; + + /* + * Recommendation action type. + */ + @JsonProperty(value = "recommendationType") + private String recommendationType; + + /* + * Recommendation action details. + */ + @JsonProperty(value = "details") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map details; + + /** + * Get the advisorName property: Advisor name. + * + * @return the advisorName value. + */ + public String advisorName() { + return this.advisorName; + } + + /** + * Set the advisorName property: Advisor name. + * + * @param advisorName the advisorName value to set. + * @return the RecommendationActionProperties object itself. + */ + public RecommendationActionProperties withAdvisorName(String advisorName) { + this.advisorName = advisorName; + return this; + } + + /** + * Get the sessionId property: Recommendation action session identifier. + * + * @return the sessionId value. + */ + public String sessionId() { + return this.sessionId; + } + + /** + * Set the sessionId property: Recommendation action session identifier. + * + * @param sessionId the sessionId value to set. + * @return the RecommendationActionProperties object itself. + */ + public RecommendationActionProperties withSessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Get the actionId property: Recommendation action identifier. + * + * @return the actionId value. + */ + public Integer actionId() { + return this.actionId; + } + + /** + * Set the actionId property: Recommendation action identifier. + * + * @param actionId the actionId value to set. + * @return the RecommendationActionProperties object itself. + */ + public RecommendationActionProperties withActionId(Integer actionId) { + this.actionId = actionId; + return this; + } + + /** + * Get the createdTime property: Recommendation action creation time. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.createdTime; + } + + /** + * Set the createdTime property: Recommendation action creation time. + * + * @param createdTime the createdTime value to set. + * @return the RecommendationActionProperties object itself. + */ + public RecommendationActionProperties withCreatedTime(OffsetDateTime createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Get the expirationTime property: Recommendation action expiration time. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.expirationTime; + } + + /** + * Set the expirationTime property: Recommendation action expiration time. + * + * @param expirationTime the expirationTime value to set. + * @return the RecommendationActionProperties object itself. + */ + public RecommendationActionProperties withExpirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + /** + * Get the reason property: Recommendation action reason. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Set the reason property: Recommendation action reason. + * + * @param reason the reason value to set. + * @return the RecommendationActionProperties object itself. + */ + public RecommendationActionProperties withReason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get the recommendationType property: Recommendation action type. + * + * @return the recommendationType value. + */ + public String recommendationType() { + return this.recommendationType; + } + + /** + * Set the recommendationType property: Recommendation action type. + * + * @param recommendationType the recommendationType value to set. + * @return the RecommendationActionProperties object itself. + */ + public RecommendationActionProperties withRecommendationType(String recommendationType) { + this.recommendationType = recommendationType; + return this; + } + + /** + * Get the details property: Recommendation action details. + * + * @return the details value. + */ + public Map details() { + return this.details; + } + + /** + * Set the details property: Recommendation action details. + * + * @param details the details value to set. + * @return the RecommendationActionProperties object itself. + */ + public RecommendationActionProperties withDetails(Map details) { + this.details = details; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerProperties.java new file mode 100644 index 000000000000..4eb0832b0e62 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The recoverable server's properties. */ +@Immutable +public final class RecoverableServerProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableServerProperties.class); + + /* + * The last available backup date time. + */ + @JsonProperty(value = "lastAvailableBackupDateTime", access = JsonProperty.Access.WRITE_ONLY) + private String lastAvailableBackupDateTime; + + /* + * The service level objective + */ + @JsonProperty(value = "serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) + private String serviceLevelObjective; + + /* + * Edition of the performance tier. + */ + @JsonProperty(value = "edition", access = JsonProperty.Access.WRITE_ONLY) + private String edition; + + /* + * vCore associated with the service level objective + */ + @JsonProperty(value = "vCore", access = JsonProperty.Access.WRITE_ONLY) + private Integer vCore; + + /* + * Hardware generation associated with the service level objective + */ + @JsonProperty(value = "hardwareGeneration", access = JsonProperty.Access.WRITE_ONLY) + private String hardwareGeneration; + + /* + * The MariaDB version + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** + * Get the lastAvailableBackupDateTime property: The last available backup date time. + * + * @return the lastAvailableBackupDateTime value. + */ + public String lastAvailableBackupDateTime() { + return this.lastAvailableBackupDateTime; + } + + /** + * Get the serviceLevelObjective property: The service level objective. + * + * @return the serviceLevelObjective value. + */ + public String serviceLevelObjective() { + return this.serviceLevelObjective; + } + + /** + * Get the edition property: Edition of the performance tier. + * + * @return the edition value. + */ + public String edition() { + return this.edition; + } + + /** + * Get the vCore property: vCore associated with the service level objective. + * + * @return the vCore value. + */ + public Integer vCore() { + return this.vCore; + } + + /** + * Get the hardwareGeneration property: Hardware generation associated with the service level objective. + * + * @return the hardwareGeneration value. + */ + public String hardwareGeneration() { + return this.hardwareGeneration; + } + + /** + * Get the version property: The MariaDB version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerResourceInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerResourceInner.java index e8b6dffa0737..5249d5ad19aa 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerResourceInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerResourceInner.java @@ -4,54 +4,31 @@ package com.azure.resourcemanager.mariadb.fluent.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.annotation.JsonFlatten; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A recoverable server resource. */ -@JsonFlatten -@Immutable -public class RecoverableServerResourceInner extends ProxyResource { +@Fluent +public final class RecoverableServerResourceInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableServerResourceInner.class); /* - * The last available backup date time. + * Resource properties. */ - @JsonProperty(value = "properties.lastAvailableBackupDateTime", access = JsonProperty.Access.WRITE_ONLY) - private String lastAvailableBackupDateTime; + @JsonProperty(value = "properties") + private RecoverableServerProperties innerProperties; - /* - * The service level objective - */ - @JsonProperty(value = "properties.serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) - private String serviceLevelObjective; - - /* - * Edition of the performance tier. - */ - @JsonProperty(value = "properties.edition", access = JsonProperty.Access.WRITE_ONLY) - private String edition; - - /* - * vCore associated with the service level objective - */ - @JsonProperty(value = "properties.vCore", access = JsonProperty.Access.WRITE_ONLY) - private Integer vCore; - - /* - * Hardware generation associated with the service level objective - */ - @JsonProperty(value = "properties.hardwareGeneration", access = JsonProperty.Access.WRITE_ONLY) - private String hardwareGeneration; - - /* - * The MariaDB version + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.version", access = JsonProperty.Access.WRITE_ONLY) - private String version; + private RecoverableServerProperties innerProperties() { + return this.innerProperties; + } /** * Get the lastAvailableBackupDateTime property: The last available backup date time. @@ -59,7 +36,7 @@ public class RecoverableServerResourceInner extends ProxyResource { * @return the lastAvailableBackupDateTime value. */ public String lastAvailableBackupDateTime() { - return this.lastAvailableBackupDateTime; + return this.innerProperties() == null ? null : this.innerProperties().lastAvailableBackupDateTime(); } /** @@ -68,7 +45,7 @@ public String lastAvailableBackupDateTime() { * @return the serviceLevelObjective value. */ public String serviceLevelObjective() { - return this.serviceLevelObjective; + return this.innerProperties() == null ? null : this.innerProperties().serviceLevelObjective(); } /** @@ -77,7 +54,7 @@ public String serviceLevelObjective() { * @return the edition value. */ public String edition() { - return this.edition; + return this.innerProperties() == null ? null : this.innerProperties().edition(); } /** @@ -86,7 +63,7 @@ public String edition() { * @return the vCore value. */ public Integer vCore() { - return this.vCore; + return this.innerProperties() == null ? null : this.innerProperties().vCore(); } /** @@ -95,7 +72,7 @@ public Integer vCore() { * @return the hardwareGeneration value. */ public String hardwareGeneration() { - return this.hardwareGeneration; + return this.innerProperties() == null ? null : this.innerProperties().hardwareGeneration(); } /** @@ -104,7 +81,7 @@ public String hardwareGeneration() { * @return the version value. */ public String version() { - return this.version; + return this.innerProperties() == null ? null : this.innerProperties().version(); } /** @@ -113,5 +90,8 @@ public String version() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/SecurityAlertPolicyProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/SecurityAlertPolicyProperties.java new file mode 100644 index 000000000000..ea3777359568 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/SecurityAlertPolicyProperties.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mariadb.models.ServerSecurityAlertPolicyState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of a security alert policy. */ +@Fluent +public final class SecurityAlertPolicyProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityAlertPolicyProperties.class); + + /* + * Specifies the state of the policy, whether it is enabled or disabled. + */ + @JsonProperty(value = "state", required = true) + private ServerSecurityAlertPolicyState state; + + /* + * Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly + */ + @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; + + /** + * Get the state property: Specifies the state of the policy, whether it is enabled or disabled. + * + * @return the state value. + */ + public ServerSecurityAlertPolicyState state() { + return this.state; + } + + /** + * Set the state property: Specifies the state of the policy, whether it is enabled or disabled. + * + * @param state the state value to set. + * @return the SecurityAlertPolicyProperties object itself. + */ + public SecurityAlertPolicyProperties withState(ServerSecurityAlertPolicyState 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. + * + * @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. + * + * @param disabledAlerts the disabledAlerts value to set. + * @return the SecurityAlertPolicyProperties object itself. + */ + public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself. + */ + public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself. + */ + public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself. + */ + public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself. + */ + public SecurityAlertPolicyProperties 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 SecurityAlertPolicyProperties object itself. + */ + public SecurityAlertPolicyProperties withRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + 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 SecurityAlertPolicyProperties")); + } + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerInner.java index dd0fa5700e36..a333d884278f 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.models.MinimalTlsVersionEnum; @@ -23,9 +22,8 @@ import java.util.Map; /** Represents a server. */ -@JsonFlatten @Fluent -public class ServerInner extends Resource { +public final class ServerInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerInner.class); /* @@ -35,84 +33,10 @@ public class ServerInner extends Resource { private Sku sku; /* - * The administrator's login name of a server. Can only be specified when - * the server is being created (and is required for creation). + * Properties of the server. */ - @JsonProperty(value = "properties.administratorLogin") - private String administratorLogin; - - /* - * Server version. - */ - @JsonProperty(value = "properties.version") - private ServerVersion version; - - /* - * Enable ssl enforcement or not when connect to server. - */ - @JsonProperty(value = "properties.sslEnforcement") - private SslEnforcementEnum sslEnforcement; - - /* - * Enforce a minimal Tls version for the server. - */ - @JsonProperty(value = "properties.minimalTlsVersion") - private MinimalTlsVersionEnum minimalTlsVersion; - - /* - * A state of a server that is visible to user. - */ - @JsonProperty(value = "properties.userVisibleState") - private ServerState userVisibleState; - - /* - * The fully qualified domain name of a server. - */ - @JsonProperty(value = "properties.fullyQualifiedDomainName") - private String fullyQualifiedDomainName; - - /* - * Earliest restore point creation time (ISO8601 format) - */ - @JsonProperty(value = "properties.earliestRestoreDate") - private OffsetDateTime earliestRestoreDate; - - /* - * Storage profile of a server. - */ - @JsonProperty(value = "properties.storageProfile") - private StorageProfile storageProfile; - - /* - * The replication role of the server. - */ - @JsonProperty(value = "properties.replicationRole") - private String replicationRole; - - /* - * The master server id of a replica server. - */ - @JsonProperty(value = "properties.masterServerId") - private String masterServerId; - - /* - * The maximum number of replicas that a master server can have. - */ - @JsonProperty(value = "properties.replicaCapacity") - private Integer replicaCapacity; - - /* - * Whether or not public network access is allowed for this server. Value - * is optional but if passed in, must be 'Enabled' or 'Disabled' - */ - @JsonProperty(value = "properties.publicNetworkAccess") - private PublicNetworkAccessEnum publicNetworkAccess; - - /* - * List of private endpoint connections on a server - */ - @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; + @JsonProperty(value = "properties") + private ServerProperties innerProperties; /** * Get the sku property: The SKU (pricing tier) of the server. @@ -134,6 +58,29 @@ public ServerInner withSku(Sku sku) { return this; } + /** + * Get the innerProperties property: Properties of the server. + * + * @return the innerProperties value. + */ + private ServerProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ServerInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServerInner withTags(Map tags) { + super.withTags(tags); + return this; + } + /** * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the * server is being created (and is required for creation). @@ -141,7 +88,7 @@ public ServerInner withSku(Sku sku) { * @return the administratorLogin value. */ public String administratorLogin() { - return this.administratorLogin; + return this.innerProperties() == null ? null : this.innerProperties().administratorLogin(); } /** @@ -152,7 +99,10 @@ public String administratorLogin() { * @return the ServerInner object itself. */ public ServerInner withAdministratorLogin(String administratorLogin) { - this.administratorLogin = administratorLogin; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withAdministratorLogin(administratorLogin); return this; } @@ -162,7 +112,7 @@ public ServerInner withAdministratorLogin(String administratorLogin) { * @return the version value. */ public ServerVersion version() { - return this.version; + return this.innerProperties() == null ? null : this.innerProperties().version(); } /** @@ -172,7 +122,10 @@ public ServerVersion version() { * @return the ServerInner object itself. */ public ServerInner withVersion(ServerVersion version) { - this.version = version; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withVersion(version); return this; } @@ -182,7 +135,7 @@ public ServerInner withVersion(ServerVersion version) { * @return the sslEnforcement value. */ public SslEnforcementEnum sslEnforcement() { - return this.sslEnforcement; + return this.innerProperties() == null ? null : this.innerProperties().sslEnforcement(); } /** @@ -192,7 +145,10 @@ public SslEnforcementEnum sslEnforcement() { * @return the ServerInner object itself. */ public ServerInner withSslEnforcement(SslEnforcementEnum sslEnforcement) { - this.sslEnforcement = sslEnforcement; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withSslEnforcement(sslEnforcement); return this; } @@ -202,7 +158,7 @@ public ServerInner withSslEnforcement(SslEnforcementEnum sslEnforcement) { * @return the minimalTlsVersion value. */ public MinimalTlsVersionEnum minimalTlsVersion() { - return this.minimalTlsVersion; + return this.innerProperties() == null ? null : this.innerProperties().minimalTlsVersion(); } /** @@ -212,7 +168,10 @@ public MinimalTlsVersionEnum minimalTlsVersion() { * @return the ServerInner object itself. */ public ServerInner withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) { - this.minimalTlsVersion = minimalTlsVersion; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withMinimalTlsVersion(minimalTlsVersion); return this; } @@ -222,7 +181,7 @@ public ServerInner withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion * @return the userVisibleState value. */ public ServerState userVisibleState() { - return this.userVisibleState; + return this.innerProperties() == null ? null : this.innerProperties().userVisibleState(); } /** @@ -232,7 +191,10 @@ public ServerState userVisibleState() { * @return the ServerInner object itself. */ public ServerInner withUserVisibleState(ServerState userVisibleState) { - this.userVisibleState = userVisibleState; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withUserVisibleState(userVisibleState); return this; } @@ -242,7 +204,7 @@ public ServerInner withUserVisibleState(ServerState userVisibleState) { * @return the fullyQualifiedDomainName value. */ public String fullyQualifiedDomainName() { - return this.fullyQualifiedDomainName; + return this.innerProperties() == null ? null : this.innerProperties().fullyQualifiedDomainName(); } /** @@ -252,7 +214,10 @@ public String fullyQualifiedDomainName() { * @return the ServerInner object itself. */ public ServerInner withFullyQualifiedDomainName(String fullyQualifiedDomainName) { - this.fullyQualifiedDomainName = fullyQualifiedDomainName; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withFullyQualifiedDomainName(fullyQualifiedDomainName); return this; } @@ -262,7 +227,7 @@ public ServerInner withFullyQualifiedDomainName(String fullyQualifiedDomainName) * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { - return this.earliestRestoreDate; + return this.innerProperties() == null ? null : this.innerProperties().earliestRestoreDate(); } /** @@ -272,7 +237,10 @@ public OffsetDateTime earliestRestoreDate() { * @return the ServerInner object itself. */ public ServerInner withEarliestRestoreDate(OffsetDateTime earliestRestoreDate) { - this.earliestRestoreDate = earliestRestoreDate; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withEarliestRestoreDate(earliestRestoreDate); return this; } @@ -282,7 +250,7 @@ public ServerInner withEarliestRestoreDate(OffsetDateTime earliestRestoreDate) { * @return the storageProfile value. */ public StorageProfile storageProfile() { - return this.storageProfile; + return this.innerProperties() == null ? null : this.innerProperties().storageProfile(); } /** @@ -292,7 +260,10 @@ public StorageProfile storageProfile() { * @return the ServerInner object itself. */ public ServerInner withStorageProfile(StorageProfile storageProfile) { - this.storageProfile = storageProfile; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withStorageProfile(storageProfile); return this; } @@ -302,7 +273,7 @@ public ServerInner withStorageProfile(StorageProfile storageProfile) { * @return the replicationRole value. */ public String replicationRole() { - return this.replicationRole; + return this.innerProperties() == null ? null : this.innerProperties().replicationRole(); } /** @@ -312,7 +283,10 @@ public String replicationRole() { * @return the ServerInner object itself. */ public ServerInner withReplicationRole(String replicationRole) { - this.replicationRole = replicationRole; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withReplicationRole(replicationRole); return this; } @@ -322,7 +296,7 @@ public ServerInner withReplicationRole(String replicationRole) { * @return the masterServerId value. */ public String masterServerId() { - return this.masterServerId; + return this.innerProperties() == null ? null : this.innerProperties().masterServerId(); } /** @@ -332,7 +306,10 @@ public String masterServerId() { * @return the ServerInner object itself. */ public ServerInner withMasterServerId(String masterServerId) { - this.masterServerId = masterServerId; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withMasterServerId(masterServerId); return this; } @@ -342,7 +319,7 @@ public ServerInner withMasterServerId(String masterServerId) { * @return the replicaCapacity value. */ public Integer replicaCapacity() { - return this.replicaCapacity; + return this.innerProperties() == null ? null : this.innerProperties().replicaCapacity(); } /** @@ -352,7 +329,10 @@ public Integer replicaCapacity() { * @return the ServerInner object itself. */ public ServerInner withReplicaCapacity(Integer replicaCapacity) { - this.replicaCapacity = replicaCapacity; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withReplicaCapacity(replicaCapacity); return this; } @@ -363,7 +343,7 @@ public ServerInner withReplicaCapacity(Integer replicaCapacity) { * @return the publicNetworkAccess value. */ public PublicNetworkAccessEnum publicNetworkAccess() { - return this.publicNetworkAccess; + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** @@ -374,7 +354,10 @@ public PublicNetworkAccessEnum publicNetworkAccess() { * @return the ServerInner object itself. */ public ServerInner withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + if (this.innerProperties() == null) { + this.innerProperties = new ServerProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } @@ -384,21 +367,7 @@ public ServerInner withPublicNetworkAccess(PublicNetworkAccessEnum publicNetwork * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** {@inheritDoc} */ - @Override - public ServerInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServerInner withTags(Map tags) { - super.withTags(tags); - return this; + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); } /** @@ -410,11 +379,8 @@ public void validate() { if (sku() != null) { sku().validate(); } - if (storageProfile() != null) { - storageProfile().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerProperties.java new file mode 100644 index 000000000000..2b71ff69c401 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerProperties.java @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mariadb.models.MinimalTlsVersionEnum; +import com.azure.resourcemanager.mariadb.models.PublicNetworkAccessEnum; +import com.azure.resourcemanager.mariadb.models.ServerPrivateEndpointConnection; +import com.azure.resourcemanager.mariadb.models.ServerState; +import com.azure.resourcemanager.mariadb.models.ServerVersion; +import com.azure.resourcemanager.mariadb.models.SslEnforcementEnum; +import com.azure.resourcemanager.mariadb.models.StorageProfile; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The properties of a server. */ +@Fluent +public final class ServerProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerProperties.class); + + /* + * The administrator's login name of a server. Can only be specified when + * the server is being created (and is required for creation). + */ + @JsonProperty(value = "administratorLogin") + private String administratorLogin; + + /* + * Server version. + */ + @JsonProperty(value = "version") + private ServerVersion version; + + /* + * Enable ssl enforcement or not when connect to server. + */ + @JsonProperty(value = "sslEnforcement") + private SslEnforcementEnum sslEnforcement; + + /* + * Enforce a minimal Tls version for the server. + */ + @JsonProperty(value = "minimalTlsVersion") + private MinimalTlsVersionEnum minimalTlsVersion; + + /* + * A state of a server that is visible to user. + */ + @JsonProperty(value = "userVisibleState") + private ServerState userVisibleState; + + /* + * The fully qualified domain name of a server. + */ + @JsonProperty(value = "fullyQualifiedDomainName") + private String fullyQualifiedDomainName; + + /* + * Earliest restore point creation time (ISO8601 format) + */ + @JsonProperty(value = "earliestRestoreDate") + private OffsetDateTime earliestRestoreDate; + + /* + * Storage profile of a server. + */ + @JsonProperty(value = "storageProfile") + private StorageProfile storageProfile; + + /* + * The replication role of the server. + */ + @JsonProperty(value = "replicationRole") + private String replicationRole; + + /* + * The master server id of a replica server. + */ + @JsonProperty(value = "masterServerId") + private String masterServerId; + + /* + * The maximum number of replicas that a master server can have. + */ + @JsonProperty(value = "replicaCapacity") + private Integer replicaCapacity; + + /* + * Whether or not public network access is allowed for this server. Value + * is optional but if passed in, must be 'Enabled' or 'Disabled' + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccessEnum publicNetworkAccess; + + /* + * List of private endpoint connections on a server + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /** + * Get the administratorLogin property: The administrator's login name of a server. Can only be specified when the + * server is being created (and is required for creation). + * + * @return the administratorLogin value. + */ + public String administratorLogin() { + return this.administratorLogin; + } + + /** + * Set the administratorLogin property: The administrator's login name of a server. Can only be specified when the + * server is being created (and is required for creation). + * + * @param administratorLogin the administratorLogin value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withAdministratorLogin(String administratorLogin) { + this.administratorLogin = administratorLogin; + return this; + } + + /** + * Get the version property: Server version. + * + * @return the version value. + */ + public ServerVersion version() { + return this.version; + } + + /** + * Set the version property: Server version. + * + * @param version the version value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withVersion(ServerVersion version) { + this.version = version; + return this; + } + + /** + * Get the sslEnforcement property: Enable ssl enforcement or not when connect to server. + * + * @return the sslEnforcement value. + */ + public SslEnforcementEnum sslEnforcement() { + return this.sslEnforcement; + } + + /** + * Set the sslEnforcement property: Enable ssl enforcement or not when connect to server. + * + * @param sslEnforcement the sslEnforcement value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withSslEnforcement(SslEnforcementEnum sslEnforcement) { + this.sslEnforcement = sslEnforcement; + return this; + } + + /** + * Get the minimalTlsVersion property: Enforce a minimal Tls version for the server. + * + * @return the minimalTlsVersion value. + */ + public MinimalTlsVersionEnum minimalTlsVersion() { + return this.minimalTlsVersion; + } + + /** + * Set the minimalTlsVersion property: Enforce a minimal Tls version for the server. + * + * @param minimalTlsVersion the minimalTlsVersion value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) { + this.minimalTlsVersion = minimalTlsVersion; + return this; + } + + /** + * Get the userVisibleState property: A state of a server that is visible to user. + * + * @return the userVisibleState value. + */ + public ServerState userVisibleState() { + return this.userVisibleState; + } + + /** + * Set the userVisibleState property: A state of a server that is visible to user. + * + * @param userVisibleState the userVisibleState value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withUserVisibleState(ServerState userVisibleState) { + this.userVisibleState = userVisibleState; + return this; + } + + /** + * Get the fullyQualifiedDomainName property: The fully qualified domain name of a server. + * + * @return the fullyQualifiedDomainName value. + */ + public String fullyQualifiedDomainName() { + return this.fullyQualifiedDomainName; + } + + /** + * Set the fullyQualifiedDomainName property: The fully qualified domain name of a server. + * + * @param fullyQualifiedDomainName the fullyQualifiedDomainName value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withFullyQualifiedDomainName(String fullyQualifiedDomainName) { + this.fullyQualifiedDomainName = fullyQualifiedDomainName; + return this; + } + + /** + * Get the earliestRestoreDate property: Earliest restore point creation time (ISO8601 format). + * + * @return the earliestRestoreDate value. + */ + public OffsetDateTime earliestRestoreDate() { + return this.earliestRestoreDate; + } + + /** + * Set the earliestRestoreDate property: Earliest restore point creation time (ISO8601 format). + * + * @param earliestRestoreDate the earliestRestoreDate value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withEarliestRestoreDate(OffsetDateTime earliestRestoreDate) { + this.earliestRestoreDate = earliestRestoreDate; + return this; + } + + /** + * Get the storageProfile property: Storage profile of a server. + * + * @return the storageProfile value. + */ + public StorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile property: Storage profile of a server. + * + * @param storageProfile the storageProfile value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withStorageProfile(StorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the replicationRole property: The replication role of the server. + * + * @return the replicationRole value. + */ + public String replicationRole() { + return this.replicationRole; + } + + /** + * Set the replicationRole property: The replication role of the server. + * + * @param replicationRole the replicationRole value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withReplicationRole(String replicationRole) { + this.replicationRole = replicationRole; + return this; + } + + /** + * Get the masterServerId property: The master server id of a replica server. + * + * @return the masterServerId value. + */ + public String masterServerId() { + return this.masterServerId; + } + + /** + * Set the masterServerId property: The master server id of a replica server. + * + * @param masterServerId the masterServerId value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withMasterServerId(String masterServerId) { + this.masterServerId = masterServerId; + return this; + } + + /** + * Get the replicaCapacity property: The maximum number of replicas that a master server can have. + * + * @return the replicaCapacity value. + */ + public Integer replicaCapacity() { + return this.replicaCapacity; + } + + /** + * Set the replicaCapacity property: The maximum number of replicas that a master server can have. + * + * @param replicaCapacity the replicaCapacity value to set. + * @return the ServerProperties object itself. + */ + public ServerProperties withReplicaCapacity(Integer replicaCapacity) { + this.replicaCapacity = replicaCapacity; + return this; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is + * optional but if passed in, must be 'Enabled' or 'Disabled'. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccessEnum publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network 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. + */ + public ServerProperties withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the privateEndpointConnections property: List of private endpoint connections on a server. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageProfile() != null) { + storageProfile().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerSecurityAlertPolicyInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerSecurityAlertPolicyInner.java index 460392e8eeb6..53e501ee6b8f 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerSecurityAlertPolicyInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerSecurityAlertPolicyInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.models.ServerSecurityAlertPolicyState; @@ -14,56 +13,24 @@ import java.util.List; /** A server security alert policy. */ -@JsonFlatten @Fluent -public class ServerSecurityAlertPolicyInner extends ProxyResource { +public final class ServerSecurityAlertPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPolicyInner.class); /* - * Specifies the state of the policy, whether it is enabled or disabled. + * Resource properties. */ - @JsonProperty(value = "properties.state") - private ServerSecurityAlertPolicyState state; + @JsonProperty(value = "properties") + private SecurityAlertPolicyProperties innerProperties; - /* - * Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly - */ - @JsonProperty(value = "properties.disabledAlerts") - private List disabledAlerts; - - /* - * Specifies an array of e-mail addresses to which the alert is sent. - */ - @JsonProperty(value = "properties.emailAddresses") - private List emailAddresses; - - /* - * Specifies that the alert is sent to the account administrators. - */ - @JsonProperty(value = "properties.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 = "properties.storageEndpoint") - private String storageEndpoint; - - /* - * Specifies the identifier key of the Threat Detection audit storage - * account. - */ - @JsonProperty(value = "properties.storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the Threat Detection audit logs. + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.retentionDays") - private Integer retentionDays; + private SecurityAlertPolicyProperties innerProperties() { + return this.innerProperties; + } /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled. @@ -71,7 +38,7 @@ public class ServerSecurityAlertPolicyInner extends ProxyResource { * @return the state value. */ public ServerSecurityAlertPolicyState state() { - return this.state; + return this.innerProperties() == null ? null : this.innerProperties().state(); } /** @@ -81,7 +48,10 @@ public ServerSecurityAlertPolicyState state() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withState(ServerSecurityAlertPolicyState state) { - this.state = state; + if (this.innerProperties() == null) { + this.innerProperties = new SecurityAlertPolicyProperties(); + } + this.innerProperties().withState(state); return this; } @@ -92,7 +62,7 @@ public ServerSecurityAlertPolicyInner withState(ServerSecurityAlertPolicyState s * @return the disabledAlerts value. */ public List disabledAlerts() { - return this.disabledAlerts; + return this.innerProperties() == null ? null : this.innerProperties().disabledAlerts(); } /** @@ -103,7 +73,10 @@ public List disabledAlerts() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) { - this.disabledAlerts = disabledAlerts; + if (this.innerProperties() == null) { + this.innerProperties = new SecurityAlertPolicyProperties(); + } + this.innerProperties().withDisabledAlerts(disabledAlerts); return this; } @@ -113,7 +86,7 @@ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAl * @return the emailAddresses value. */ public List emailAddresses() { - return this.emailAddresses; + return this.innerProperties() == null ? null : this.innerProperties().emailAddresses(); } /** @@ -123,7 +96,10 @@ public List emailAddresses() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) { - this.emailAddresses = emailAddresses; + if (this.innerProperties() == null) { + this.innerProperties = new SecurityAlertPolicyProperties(); + } + this.innerProperties().withEmailAddresses(emailAddresses); return this; } @@ -133,7 +109,7 @@ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddre * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { - return this.emailAccountAdmins; + return this.innerProperties() == null ? null : this.innerProperties().emailAccountAdmins(); } /** @@ -143,7 +119,10 @@ public Boolean emailAccountAdmins() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) { - this.emailAccountAdmins = emailAccountAdmins; + if (this.innerProperties() == null) { + this.innerProperties = new SecurityAlertPolicyProperties(); + } + this.innerProperties().withEmailAccountAdmins(emailAccountAdmins); return this; } @@ -154,7 +133,7 @@ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccoun * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.storageEndpoint; + return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); } /** @@ -165,7 +144,10 @@ public String storageEndpoint() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; + if (this.innerProperties() == null) { + this.innerProperties = new SecurityAlertPolicyProperties(); + } + this.innerProperties().withStorageEndpoint(storageEndpoint); return this; } @@ -176,7 +158,7 @@ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.storageAccountAccessKey; + return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); } /** @@ -187,7 +169,10 @@ public String storageAccountAccessKey() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; + if (this.innerProperties() == null) { + this.innerProperties = new SecurityAlertPolicyProperties(); + } + this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); return this; } @@ -197,7 +182,7 @@ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storage * @return the retentionDays value. */ public Integer retentionDays() { - return this.retentionDays; + return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); } /** @@ -207,7 +192,10 @@ public Integer retentionDays() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; + if (this.innerProperties() == null) { + this.innerProperties = new SecurityAlertPolicyProperties(); + } + this.innerProperties().withRetentionDays(retentionDays); return this; } @@ -217,5 +205,8 @@ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerUpdateParametersProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerUpdateParametersProperties.java new file mode 100644 index 000000000000..f186f92aa99a --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerUpdateParametersProperties.java @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mariadb.models.MinimalTlsVersionEnum; +import com.azure.resourcemanager.mariadb.models.PublicNetworkAccessEnum; +import com.azure.resourcemanager.mariadb.models.ServerVersion; +import com.azure.resourcemanager.mariadb.models.SslEnforcementEnum; +import com.azure.resourcemanager.mariadb.models.StorageProfile; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The properties that can be updated for a server. */ +@Fluent +public final class ServerUpdateParametersProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerUpdateParametersProperties.class); + + /* + * Storage profile of a server. + */ + @JsonProperty(value = "storageProfile") + private StorageProfile storageProfile; + + /* + * The password of the administrator login. + */ + @JsonProperty(value = "administratorLoginPassword") + private String administratorLoginPassword; + + /* + * The version of a server. + */ + @JsonProperty(value = "version") + private ServerVersion version; + + /* + * Enable ssl enforcement or not when connect to server. + */ + @JsonProperty(value = "sslEnforcement") + private SslEnforcementEnum sslEnforcement; + + /* + * Enforce a minimal Tls version for the server. + */ + @JsonProperty(value = "minimalTlsVersion") + private MinimalTlsVersionEnum minimalTlsVersion; + + /* + * Whether or not public network access is allowed for this server. Value + * is optional but if passed in, must be 'Enabled' or 'Disabled' + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccessEnum publicNetworkAccess; + + /* + * The replication role of the server. + */ + @JsonProperty(value = "replicationRole") + private String replicationRole; + + /** + * Get the storageProfile property: Storage profile of a server. + * + * @return the storageProfile value. + */ + public StorageProfile storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile property: Storage profile of a server. + * + * @param storageProfile the storageProfile value to set. + * @return the ServerUpdateParametersProperties object itself. + */ + public ServerUpdateParametersProperties withStorageProfile(StorageProfile storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the administratorLoginPassword property: The password of the administrator login. + * + * @return the administratorLoginPassword value. + */ + public String administratorLoginPassword() { + return this.administratorLoginPassword; + } + + /** + * Set the administratorLoginPassword property: The password of the administrator login. + * + * @param administratorLoginPassword the administratorLoginPassword value to set. + * @return the ServerUpdateParametersProperties object itself. + */ + public ServerUpdateParametersProperties withAdministratorLoginPassword(String administratorLoginPassword) { + this.administratorLoginPassword = administratorLoginPassword; + return this; + } + + /** + * Get the version property: The version of a server. + * + * @return the version value. + */ + public ServerVersion version() { + return this.version; + } + + /** + * Set the version property: The version of a server. + * + * @param version the version value to set. + * @return the ServerUpdateParametersProperties object itself. + */ + public ServerUpdateParametersProperties withVersion(ServerVersion version) { + this.version = version; + return this; + } + + /** + * Get the sslEnforcement property: Enable ssl enforcement or not when connect to server. + * + * @return the sslEnforcement value. + */ + public SslEnforcementEnum sslEnforcement() { + return this.sslEnforcement; + } + + /** + * Set the sslEnforcement property: Enable ssl enforcement or not when connect to server. + * + * @param sslEnforcement the sslEnforcement value to set. + * @return the ServerUpdateParametersProperties object itself. + */ + public ServerUpdateParametersProperties withSslEnforcement(SslEnforcementEnum sslEnforcement) { + this.sslEnforcement = sslEnforcement; + return this; + } + + /** + * Get the minimalTlsVersion property: Enforce a minimal Tls version for the server. + * + * @return the minimalTlsVersion value. + */ + public MinimalTlsVersionEnum minimalTlsVersion() { + return this.minimalTlsVersion; + } + + /** + * Set the minimalTlsVersion property: Enforce a minimal Tls version for the server. + * + * @param minimalTlsVersion the minimalTlsVersion value to set. + * @return the ServerUpdateParametersProperties object itself. + */ + public ServerUpdateParametersProperties withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) { + this.minimalTlsVersion = minimalTlsVersion; + return this; + } + + /** + * Get the publicNetworkAccess property: Whether or not public network access is allowed for this server. Value is + * optional but if passed in, must be 'Enabled' or 'Disabled'. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccessEnum publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether or not public network 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 ServerUpdateParametersProperties object itself. + */ + public ServerUpdateParametersProperties withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the replicationRole property: The replication role of the server. + * + * @return the replicationRole value. + */ + public String replicationRole() { + return this.replicationRole; + } + + /** + * Set the replicationRole property: The replication role of the server. + * + * @param replicationRole the replicationRole value to set. + * @return the ServerUpdateParametersProperties object itself. + */ + public ServerUpdateParametersProperties withReplicationRole(String replicationRole) { + this.replicationRole = replicationRole; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageProfile() != null) { + storageProfile().validate(); + } + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/TopQueryStatisticsInputProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/TopQueryStatisticsInputProperties.java new file mode 100644 index 000000000000..1f9d4cf6f6cf --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/TopQueryStatisticsInputProperties.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties for input to get top query statistics. */ +@Fluent +public final class TopQueryStatisticsInputProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopQueryStatisticsInputProperties.class); + + /* + * Max number of top queries to return. + */ + @JsonProperty(value = "numberOfTopQueries", required = true) + private int numberOfTopQueries; + + /* + * Aggregation function name. + */ + @JsonProperty(value = "aggregationFunction", required = true) + private String aggregationFunction; + + /* + * Observed metric name. + */ + @JsonProperty(value = "observedMetric", required = true) + private String observedMetric; + + /* + * Observation start time. + */ + @JsonProperty(value = "observationStartTime", required = true) + private OffsetDateTime observationStartTime; + + /* + * Observation end time. + */ + @JsonProperty(value = "observationEndTime", required = true) + private OffsetDateTime observationEndTime; + + /* + * Aggregation interval type in ISO 8601 format. + */ + @JsonProperty(value = "aggregationWindow", required = true) + private String aggregationWindow; + + /** + * Get the numberOfTopQueries property: Max number of top queries to return. + * + * @return the numberOfTopQueries value. + */ + public int numberOfTopQueries() { + return this.numberOfTopQueries; + } + + /** + * Set the numberOfTopQueries property: Max number of top queries to return. + * + * @param numberOfTopQueries the numberOfTopQueries value to set. + * @return the TopQueryStatisticsInputProperties object itself. + */ + public TopQueryStatisticsInputProperties withNumberOfTopQueries(int numberOfTopQueries) { + this.numberOfTopQueries = numberOfTopQueries; + return this; + } + + /** + * Get the aggregationFunction property: Aggregation function name. + * + * @return the aggregationFunction value. + */ + public String aggregationFunction() { + return this.aggregationFunction; + } + + /** + * Set the aggregationFunction property: Aggregation function name. + * + * @param aggregationFunction the aggregationFunction value to set. + * @return the TopQueryStatisticsInputProperties object itself. + */ + public TopQueryStatisticsInputProperties withAggregationFunction(String aggregationFunction) { + this.aggregationFunction = aggregationFunction; + return this; + } + + /** + * Get the observedMetric property: Observed metric name. + * + * @return the observedMetric value. + */ + public String observedMetric() { + return this.observedMetric; + } + + /** + * Set the observedMetric property: Observed metric name. + * + * @param observedMetric the observedMetric value to set. + * @return the TopQueryStatisticsInputProperties object itself. + */ + public TopQueryStatisticsInputProperties withObservedMetric(String observedMetric) { + this.observedMetric = observedMetric; + return this; + } + + /** + * Get the observationStartTime property: Observation start time. + * + * @return the observationStartTime value. + */ + public OffsetDateTime observationStartTime() { + return this.observationStartTime; + } + + /** + * Set the observationStartTime property: Observation start time. + * + * @param observationStartTime the observationStartTime value to set. + * @return the TopQueryStatisticsInputProperties object itself. + */ + public TopQueryStatisticsInputProperties withObservationStartTime(OffsetDateTime observationStartTime) { + this.observationStartTime = observationStartTime; + return this; + } + + /** + * Get the observationEndTime property: Observation end time. + * + * @return the observationEndTime value. + */ + public OffsetDateTime observationEndTime() { + return this.observationEndTime; + } + + /** + * Set the observationEndTime property: Observation end time. + * + * @param observationEndTime the observationEndTime value to set. + * @return the TopQueryStatisticsInputProperties object itself. + */ + public TopQueryStatisticsInputProperties withObservationEndTime(OffsetDateTime observationEndTime) { + this.observationEndTime = observationEndTime; + return this; + } + + /** + * Get the aggregationWindow property: Aggregation interval type in ISO 8601 format. + * + * @return the aggregationWindow value. + */ + public String aggregationWindow() { + return this.aggregationWindow; + } + + /** + * Set the aggregationWindow property: Aggregation interval type in ISO 8601 format. + * + * @param aggregationWindow the aggregationWindow value to set. + * @return the TopQueryStatisticsInputProperties object itself. + */ + public TopQueryStatisticsInputProperties withAggregationWindow(String aggregationWindow) { + this.aggregationWindow = aggregationWindow; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (aggregationFunction() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property aggregationFunction in model TopQueryStatisticsInputProperties")); + } + if (observedMetric() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property observedMetric in model TopQueryStatisticsInputProperties")); + } + if (observationStartTime() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property observationStartTime in model TopQueryStatisticsInputProperties")); + } + if (observationEndTime() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property observationEndTime in model TopQueryStatisticsInputProperties")); + } + if (aggregationWindow() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property aggregationWindow in model TopQueryStatisticsInputProperties")); + } + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleInner.java index 0b14c0d3f222..ba57d7877d04 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.models.VirtualNetworkRuleState; @@ -13,29 +12,24 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A virtual network rule. */ -@JsonFlatten @Fluent -public class VirtualNetworkRuleInner extends ProxyResource { +public final class VirtualNetworkRuleInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRuleInner.class); /* - * The ARM resource id of the virtual network subnet. + * Resource properties. */ - @JsonProperty(value = "properties.virtualNetworkSubnetId") - private String virtualNetworkSubnetId; + @JsonProperty(value = "properties") + private VirtualNetworkRuleProperties innerProperties; - /* - * Create firewall rule before the virtual network has vnet service - * endpoint enabled. - */ - @JsonProperty(value = "properties.ignoreMissingVnetServiceEndpoint") - private Boolean ignoreMissingVnetServiceEndpoint; - - /* - * Virtual Network Rule State + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) - private VirtualNetworkRuleState state; + private VirtualNetworkRuleProperties innerProperties() { + return this.innerProperties; + } /** * Get the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet. @@ -43,7 +37,7 @@ public class VirtualNetworkRuleInner extends ProxyResource { * @return the virtualNetworkSubnetId value. */ public String virtualNetworkSubnetId() { - return this.virtualNetworkSubnetId; + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkSubnetId(); } /** @@ -53,7 +47,10 @@ public String virtualNetworkSubnetId() { * @return the VirtualNetworkRuleInner object itself. */ public VirtualNetworkRuleInner withVirtualNetworkSubnetId(String virtualNetworkSubnetId) { - this.virtualNetworkSubnetId = virtualNetworkSubnetId; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualNetworkRuleProperties(); + } + this.innerProperties().withVirtualNetworkSubnetId(virtualNetworkSubnetId); return this; } @@ -64,7 +61,7 @@ public VirtualNetworkRuleInner withVirtualNetworkSubnetId(String virtualNetworkS * @return the ignoreMissingVnetServiceEndpoint value. */ public Boolean ignoreMissingVnetServiceEndpoint() { - return this.ignoreMissingVnetServiceEndpoint; + return this.innerProperties() == null ? null : this.innerProperties().ignoreMissingVnetServiceEndpoint(); } /** @@ -75,7 +72,10 @@ public Boolean ignoreMissingVnetServiceEndpoint() { * @return the VirtualNetworkRuleInner object itself. */ public VirtualNetworkRuleInner withIgnoreMissingVnetServiceEndpoint(Boolean ignoreMissingVnetServiceEndpoint) { - this.ignoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint; + if (this.innerProperties() == null) { + this.innerProperties = new VirtualNetworkRuleProperties(); + } + this.innerProperties().withIgnoreMissingVnetServiceEndpoint(ignoreMissingVnetServiceEndpoint); return this; } @@ -85,7 +85,7 @@ public VirtualNetworkRuleInner withIgnoreMissingVnetServiceEndpoint(Boolean igno * @return the state value. */ public VirtualNetworkRuleState state() { - return this.state; + return this.innerProperties() == null ? null : this.innerProperties().state(); } /** @@ -94,5 +94,8 @@ public VirtualNetworkRuleState state() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleProperties.java new file mode 100644 index 000000000000..22a9cf39ab26 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mariadb.models.VirtualNetworkRuleState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a virtual network rule. */ +@Fluent +public final class VirtualNetworkRuleProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRuleProperties.class); + + /* + * 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; + + /** + * Get the virtualNetworkSubnetId property: The ARM resource id of the virtual network subnet. + * + * @return the virtualNetworkSubnetId value. + */ + public String virtualNetworkSubnetId() { + return this.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. + */ + public VirtualNetworkRuleProperties withVirtualNetworkSubnetId(String virtualNetworkSubnetId) { + this.virtualNetworkSubnetId = virtualNetworkSubnetId; + return this; + } + + /** + * Get the ignoreMissingVnetServiceEndpoint property: Create firewall rule before the virtual network has vnet + * service endpoint enabled. + * + * @return the ignoreMissingVnetServiceEndpoint value. + */ + public Boolean ignoreMissingVnetServiceEndpoint() { + return this.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. + */ + public VirtualNetworkRuleProperties withIgnoreMissingVnetServiceEndpoint(Boolean ignoreMissingVnetServiceEndpoint) { + this.ignoreMissingVnetServiceEndpoint = ignoreMissingVnetServiceEndpoint; + return this; + } + + /** + * Get the state property: Virtual Network Rule State. + * + * @return the state value. + */ + public VirtualNetworkRuleState state() { + return this.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")); + } + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticInner.java index 976e3978502c..acca541fe07b 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticInner.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.mariadb.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -13,64 +12,24 @@ import java.time.OffsetDateTime; /** Represents a Wait Statistic. */ -@JsonFlatten @Fluent -public class WaitStatisticInner extends ProxyResource { +public final class WaitStatisticInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticInner.class); /* - * Observation start time. + * The properties of a wait statistic. */ - @JsonProperty(value = "properties.startTime") - private OffsetDateTime startTime; + @JsonProperty(value = "properties") + private WaitStatisticProperties innerProperties; - /* - * Observation end time. - */ - @JsonProperty(value = "properties.endTime") - private OffsetDateTime endTime; - - /* - * Wait event name. - */ - @JsonProperty(value = "properties.eventName") - private String eventName; - - /* - * Wait event type name. - */ - @JsonProperty(value = "properties.eventTypeName") - private String eventTypeName; - - /* - * Database query identifier. - */ - @JsonProperty(value = "properties.queryId") - private Long queryId; - - /* - * Database Name. - */ - @JsonProperty(value = "properties.databaseName") - private String databaseName; - - /* - * Database user identifier. - */ - @JsonProperty(value = "properties.userId") - private Long userId; - - /* - * Wait event count observed in this time interval. - */ - @JsonProperty(value = "properties.count") - private Long count; - - /* - * Total time of wait in milliseconds in this time interval. + /** + * Get the innerProperties property: The properties of a wait statistic. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.totalTimeInMs") - private Double totalTimeInMs; + private WaitStatisticProperties innerProperties() { + return this.innerProperties; + } /** * Get the startTime property: Observation start time. @@ -78,7 +37,7 @@ public class WaitStatisticInner extends ProxyResource { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.startTime; + return this.innerProperties() == null ? null : this.innerProperties().startTime(); } /** @@ -88,7 +47,10 @@ public OffsetDateTime startTime() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withStartTime(startTime); return this; } @@ -98,7 +60,7 @@ public WaitStatisticInner withStartTime(OffsetDateTime startTime) { * @return the endTime value. */ public OffsetDateTime endTime() { - return this.endTime; + return this.innerProperties() == null ? null : this.innerProperties().endTime(); } /** @@ -108,7 +70,10 @@ public OffsetDateTime endTime() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withEndTime(endTime); return this; } @@ -118,7 +83,7 @@ public WaitStatisticInner withEndTime(OffsetDateTime endTime) { * @return the eventName value. */ public String eventName() { - return this.eventName; + return this.innerProperties() == null ? null : this.innerProperties().eventName(); } /** @@ -128,7 +93,10 @@ public String eventName() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withEventName(String eventName) { - this.eventName = eventName; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withEventName(eventName); return this; } @@ -138,7 +106,7 @@ public WaitStatisticInner withEventName(String eventName) { * @return the eventTypeName value. */ public String eventTypeName() { - return this.eventTypeName; + return this.innerProperties() == null ? null : this.innerProperties().eventTypeName(); } /** @@ -148,7 +116,10 @@ public String eventTypeName() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withEventTypeName(String eventTypeName) { - this.eventTypeName = eventTypeName; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withEventTypeName(eventTypeName); return this; } @@ -158,7 +129,7 @@ public WaitStatisticInner withEventTypeName(String eventTypeName) { * @return the queryId value. */ public Long queryId() { - return this.queryId; + return this.innerProperties() == null ? null : this.innerProperties().queryId(); } /** @@ -168,7 +139,10 @@ public Long queryId() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withQueryId(Long queryId) { - this.queryId = queryId; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withQueryId(queryId); return this; } @@ -178,7 +152,7 @@ public WaitStatisticInner withQueryId(Long queryId) { * @return the databaseName value. */ public String databaseName() { - return this.databaseName; + return this.innerProperties() == null ? null : this.innerProperties().databaseName(); } /** @@ -188,7 +162,10 @@ public String databaseName() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withDatabaseName(String databaseName) { - this.databaseName = databaseName; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withDatabaseName(databaseName); return this; } @@ -198,7 +175,7 @@ public WaitStatisticInner withDatabaseName(String databaseName) { * @return the userId value. */ public Long userId() { - return this.userId; + return this.innerProperties() == null ? null : this.innerProperties().userId(); } /** @@ -208,7 +185,10 @@ public Long userId() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withUserId(Long userId) { - this.userId = userId; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withUserId(userId); return this; } @@ -218,7 +198,7 @@ public WaitStatisticInner withUserId(Long userId) { * @return the count value. */ public Long count() { - return this.count; + return this.innerProperties() == null ? null : this.innerProperties().count(); } /** @@ -228,7 +208,10 @@ public Long count() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withCount(Long count) { - this.count = count; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withCount(count); return this; } @@ -238,7 +221,7 @@ public WaitStatisticInner withCount(Long count) { * @return the totalTimeInMs value. */ public Double totalTimeInMs() { - return this.totalTimeInMs; + return this.innerProperties() == null ? null : this.innerProperties().totalTimeInMs(); } /** @@ -248,7 +231,10 @@ public Double totalTimeInMs() { * @return the WaitStatisticInner object itself. */ public WaitStatisticInner withTotalTimeInMs(Double totalTimeInMs) { - this.totalTimeInMs = totalTimeInMs; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticProperties(); + } + this.innerProperties().withTotalTimeInMs(totalTimeInMs); return this; } @@ -258,5 +244,8 @@ public WaitStatisticInner withTotalTimeInMs(Double totalTimeInMs) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticProperties.java new file mode 100644 index 000000000000..feffe5d022b3 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticProperties.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties of a wait statistic. */ +@Fluent +public final class WaitStatisticProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticProperties.class); + + /* + * Observation start time. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * Observation end time. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Wait event name. + */ + @JsonProperty(value = "eventName") + private String eventName; + + /* + * Wait event type name. + */ + @JsonProperty(value = "eventTypeName") + private String eventTypeName; + + /* + * Database query identifier. + */ + @JsonProperty(value = "queryId") + private Long queryId; + + /* + * Database Name. + */ + @JsonProperty(value = "databaseName") + private String databaseName; + + /* + * Database user identifier. + */ + @JsonProperty(value = "userId") + private Long userId; + + /* + * Wait event count observed in this time interval. + */ + @JsonProperty(value = "count") + private Long count; + + /* + * Total time of wait in milliseconds in this time interval. + */ + @JsonProperty(value = "totalTimeInMs") + private Double totalTimeInMs; + + /** + * Get the startTime property: Observation start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Observation start time. + * + * @param startTime the startTime value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: Observation end time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Observation end time. + * + * @param endTime the endTime value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the eventName property: Wait event name. + * + * @return the eventName value. + */ + public String eventName() { + return this.eventName; + } + + /** + * Set the eventName property: Wait event name. + * + * @param eventName the eventName value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withEventName(String eventName) { + this.eventName = eventName; + return this; + } + + /** + * Get the eventTypeName property: Wait event type name. + * + * @return the eventTypeName value. + */ + public String eventTypeName() { + return this.eventTypeName; + } + + /** + * Set the eventTypeName property: Wait event type name. + * + * @param eventTypeName the eventTypeName value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withEventTypeName(String eventTypeName) { + this.eventTypeName = eventTypeName; + return this; + } + + /** + * Get the queryId property: Database query identifier. + * + * @return the queryId value. + */ + public Long queryId() { + return this.queryId; + } + + /** + * Set the queryId property: Database query identifier. + * + * @param queryId the queryId value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withQueryId(Long queryId) { + this.queryId = queryId; + return this; + } + + /** + * Get the databaseName property: Database Name. + * + * @return the databaseName value. + */ + public String databaseName() { + return this.databaseName; + } + + /** + * Set the databaseName property: Database Name. + * + * @param databaseName the databaseName value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withDatabaseName(String databaseName) { + this.databaseName = databaseName; + return this; + } + + /** + * Get the userId property: Database user identifier. + * + * @return the userId value. + */ + public Long userId() { + return this.userId; + } + + /** + * Set the userId property: Database user identifier. + * + * @param userId the userId value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withUserId(Long userId) { + this.userId = userId; + return this; + } + + /** + * Get the count property: Wait event count observed in this time interval. + * + * @return the count value. + */ + public Long count() { + return this.count; + } + + /** + * Set the count property: Wait event count observed in this time interval. + * + * @param count the count value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withCount(Long count) { + this.count = count; + return this; + } + + /** + * Get the totalTimeInMs property: Total time of wait in milliseconds in this time interval. + * + * @return the totalTimeInMs value. + */ + public Double totalTimeInMs() { + return this.totalTimeInMs; + } + + /** + * Set the totalTimeInMs property: Total time of wait in milliseconds in this time interval. + * + * @param totalTimeInMs the totalTimeInMs value to set. + * @return the WaitStatisticProperties object itself. + */ + public WaitStatisticProperties withTotalTimeInMs(Double totalTimeInMs) { + this.totalTimeInMs = totalTimeInMs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticsInputProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticsInputProperties.java new file mode 100644 index 000000000000..0d772a909354 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticsInputProperties.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties for input to get wait statistics. */ +@Fluent +public final class WaitStatisticsInputProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticsInputProperties.class); + + /* + * Observation start time. + */ + @JsonProperty(value = "observationStartTime", required = true) + private OffsetDateTime observationStartTime; + + /* + * Observation end time. + */ + @JsonProperty(value = "observationEndTime", required = true) + private OffsetDateTime observationEndTime; + + /* + * Aggregation interval type in ISO 8601 format. + */ + @JsonProperty(value = "aggregationWindow", required = true) + private String aggregationWindow; + + /** + * Get the observationStartTime property: Observation start time. + * + * @return the observationStartTime value. + */ + public OffsetDateTime observationStartTime() { + return this.observationStartTime; + } + + /** + * Set the observationStartTime property: Observation start time. + * + * @param observationStartTime the observationStartTime value to set. + * @return the WaitStatisticsInputProperties object itself. + */ + public WaitStatisticsInputProperties withObservationStartTime(OffsetDateTime observationStartTime) { + this.observationStartTime = observationStartTime; + return this; + } + + /** + * Get the observationEndTime property: Observation end time. + * + * @return the observationEndTime value. + */ + public OffsetDateTime observationEndTime() { + return this.observationEndTime; + } + + /** + * Set the observationEndTime property: Observation end time. + * + * @param observationEndTime the observationEndTime value to set. + * @return the WaitStatisticsInputProperties object itself. + */ + public WaitStatisticsInputProperties withObservationEndTime(OffsetDateTime observationEndTime) { + this.observationEndTime = observationEndTime; + return this; + } + + /** + * Get the aggregationWindow property: Aggregation interval type in ISO 8601 format. + * + * @return the aggregationWindow value. + */ + public String aggregationWindow() { + return this.aggregationWindow; + } + + /** + * Set the aggregationWindow property: Aggregation interval type in ISO 8601 format. + * + * @param aggregationWindow the aggregationWindow value to set. + * @return the WaitStatisticsInputProperties object itself. + */ + public WaitStatisticsInputProperties withAggregationWindow(String aggregationWindow) { + this.aggregationWindow = aggregationWindow; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (observationStartTime() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property observationStartTime in model WaitStatisticsInputProperties")); + } + if (observationEndTime() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property observationEndTime in model WaitStatisticsInputProperties")); + } + if (aggregationWindow() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property aggregationWindow in model WaitStatisticsInputProperties")); + } + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/AdvisorsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/AdvisorsClientImpl.java index d8f85a9e619b..0726be601826 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/AdvisorsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/AdvisorsClientImpl.java @@ -109,7 +109,7 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recommendation action advisor. + * @return a recommendation action advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -164,7 +164,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recommendation action advisor. + * @return a recommendation action advisor along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -215,7 +215,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recommendation action advisor. + * @return a recommendation action advisor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName, String advisorName) { @@ -256,7 +256,7 @@ public AdvisorInner get(String resourceGroupName, String serverName, String advi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recommendation action advisor. + * @return a recommendation action advisor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -272,7 +272,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query statistics. + * @return a list of query statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { @@ -330,7 +330,7 @@ private Mono> listByServerSinglePageAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query statistics. + * @return a list of query statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -450,7 +450,7 @@ public PagedIterable listByServer(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query statistics. + * @return a list of query statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -486,7 +486,7 @@ private Mono> listByServerNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query statistics. + * @return a list of query statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/CheckNameAvailabilitiesClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/CheckNameAvailabilitiesClientImpl.java index ef12da2a8ca4..2dca546bb3a0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/CheckNameAvailabilitiesClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/CheckNameAvailabilitiesClientImpl.java @@ -58,7 +58,7 @@ public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailab @ServiceInterface(name = "MariaDBManagementCli") private interface CheckNameAvailabilitiesService { @Headers({"Content-Type: application/json"}) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBForMariaDB/checkNameAvailability") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/checkNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> execute( @@ -77,7 +77,8 @@ Mono> execute( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. + * @return represents a resource name availability along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> executeWithResponseAsync( @@ -125,7 +126,8 @@ private Mono> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. + * @return represents a resource name availability along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> executeWithResponseAsync( @@ -169,7 +171,7 @@ private Mono> executeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. + * @return represents a resource name availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono executeAsync(NameAvailabilityRequest nameAvailabilityRequest) { @@ -206,7 +208,7 @@ public NameAvailabilityInner execute(NameAvailabilityRequest nameAvailabilityReq * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. + * @return represents a resource name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response executeWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationsClientImpl.java index 8e166ac52047..7138278fca73 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationsClientImpl.java @@ -68,7 +68,7 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient { private interface ConfigurationsService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/configurations/{configurationName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -85,7 +85,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/configurations/{configurationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -101,7 +101,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/configurations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -125,7 +125,7 @@ Mono> 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 represents a Configuration. + * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -188,7 +188,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -251,9 +251,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) { Mono>> mono = @@ -261,7 +261,11 @@ private PollerFlux, ConfigurationInner> beginCrea return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ConfigurationInner.class, ConfigurationInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + ConfigurationInner.class, + ConfigurationInner.class, + this.client.getContext()); } /** @@ -275,9 +279,9 @@ private PollerFlux, ConfigurationInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, @@ -303,9 +307,9 @@ private PollerFlux, ConfigurationInner> beginCrea * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, configurationName, parameters).getSyncPoller(); @@ -322,9 +326,9 @@ public SyncPoller, ConfigurationInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -345,7 +349,7 @@ public SyncPoller, ConfigurationInner> beginCreat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -366,7 +370,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Configuration. + * @return represents a Configuration on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -430,7 +434,8 @@ public ConfigurationInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a configuration of server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -486,7 +491,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a configuration of server along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -538,7 +544,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a configuration of server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName, String configurationName) { @@ -579,7 +585,7 @@ public ConfigurationInner get(String resourceGroupName, String serverName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a configuration of server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -595,7 +601,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations. + * @return a list of server configurations along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -649,7 +656,8 @@ private Mono> listByServerSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabasesClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabasesClientImpl.java index a1659bee577d..7350dada2d1a 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabasesClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabasesClientImpl.java @@ -69,7 +69,7 @@ public final class DatabasesClientImpl implements DatabasesClient { private interface DatabasesService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/databases/{databaseName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -86,7 +86,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/databases/{databaseName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -102,7 +102,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/databases/{databaseName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -118,7 +118,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/databases") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -142,7 +142,7 @@ Mono> 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 represents a Database. + * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -204,7 +204,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -262,9 +262,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters) { Mono>> mono = @@ -272,7 +272,11 @@ private PollerFlux, DatabaseInner> beginCreateOrUpdate return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DatabaseInner.class, + DatabaseInner.class, + this.client.getContext()); } /** @@ -286,9 +290,9 @@ private PollerFlux, DatabaseInner> beginCreateOrUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters, Context context) { context = this.client.mergeContext(context); @@ -310,9 +314,9 @@ private PollerFlux, DatabaseInner> beginCreateOrUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @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(); @@ -329,9 +333,9 @@ public SyncPoller, DatabaseInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @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) @@ -348,7 +352,7 @@ public SyncPoller, DatabaseInner> beginCreateOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -369,7 +373,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Database. + * @return represents a Database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -425,7 +429,7 @@ public DatabaseInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -480,7 +484,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -531,15 +535,16 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private 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, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -552,9 +557,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, String databaseName, Context context) { context = this.client.mergeContext(context); @@ -574,9 +579,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String databaseName) { return beginDeleteAsync(resourceGroupName, serverName, databaseName).getSyncPoller(); @@ -592,9 +597,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @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(); @@ -609,7 +614,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName) { @@ -628,7 +633,7 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String databaseName, Context context) { @@ -677,7 +682,7 @@ public void delete(String resourceGroupName, String serverName, String databaseN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -732,7 +737,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about a database along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -783,7 +788,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about a database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName, String databaseName) { @@ -824,7 +829,7 @@ public DatabaseInner get(String resourceGroupName, String serverName, String dat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about a database along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -840,7 +845,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases. + * @return a List of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -894,7 +899,7 @@ private Mono> listByServerSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a List of databases along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRulesClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRulesClientImpl.java index 3b0ac3506e3d..ae5be1d156c6 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRulesClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRulesClientImpl.java @@ -69,7 +69,7 @@ public final class FirewallRulesClientImpl implements FirewallRulesClient { private interface FirewallRulesService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/firewallRules/{firewallRuleName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -86,7 +86,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/firewallRules/{firewallRuleName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -102,7 +102,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/firewallRules/{firewallRuleName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -118,7 +118,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/firewallRules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -142,7 +142,7 @@ Mono> 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 represents a server firewall rule. + * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -205,7 +205,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -268,9 +268,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { Mono>> mono = @@ -278,7 +278,11 @@ private PollerFlux, FirewallRuleInner> beginCreate return this .client .getLroResult( - mono, this.client.getHttpPipeline(), FirewallRuleInner.class, FirewallRuleInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + FirewallRuleInner.class, + FirewallRuleInner.class, + this.client.getContext()); } /** @@ -292,9 +296,9 @@ private PollerFlux, FirewallRuleInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, @@ -320,9 +324,9 @@ private PollerFlux, FirewallRuleInner> beginCreate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, serverName, firewallRuleName, parameters).getSyncPoller(); @@ -339,9 +343,9 @@ public SyncPoller, FirewallRuleInner> beginCreateO * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -362,7 +366,7 @@ public SyncPoller, FirewallRuleInner> beginCreateO * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -383,7 +387,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server firewall rule. + * @return represents a server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -447,7 +451,7 @@ public FirewallRuleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -503,7 +507,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -555,16 +559,17 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, String firewallRuleName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName, firewallRuleName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -577,9 +582,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, String firewallRuleName, Context context) { context = this.client.mergeContext(context); @@ -599,9 +604,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String firewallRuleName) { return beginDeleteAsync(resourceGroupName, serverName, firewallRuleName).getSyncPoller(); @@ -617,9 +622,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String firewallRuleName, Context context) { return beginDeleteAsync(resourceGroupName, serverName, firewallRuleName, context).getSyncPoller(); @@ -634,7 +639,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String firewallRuleName) { @@ -653,7 +658,7 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -703,7 +708,8 @@ public void delete(String resourceGroupName, String serverName, String firewallR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server firewall rule. + * @return information about a server firewall rule along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -759,7 +765,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server firewall rule. + * @return information about a server firewall rule along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -811,7 +818,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server firewall rule. + * @return information about a server firewall rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName, String firewallRuleName) { @@ -852,7 +859,7 @@ public FirewallRuleInner get(String resourceGroupName, String serverName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server firewall rule. + * @return information about a server firewall rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -868,7 +875,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules. + * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -922,7 +929,7 @@ private Mono> listByServerSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules. + * @return a list of firewall rules along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedPerformanceTiersClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedPerformanceTiersClientImpl.java index 984c520f7553..bd342467d509 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedPerformanceTiersClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedPerformanceTiersClientImpl.java @@ -65,7 +65,7 @@ public final class LocationBasedPerformanceTiersClientImpl implements LocationBa private interface LocationBasedPerformanceTiersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.DBForMariaDB/locations/{locationName}" + "/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/locations/{locationName}" + "/performanceTiers") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -85,7 +85,7 @@ Mono> list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of performance tiers. + * @return a list of performance tiers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String locationName) { @@ -132,7 +132,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of performance tiers. + * @return a list of performance tiers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsOperationStatusClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsOperationStatusClientImpl.java index 25076cff06d7..8e6e6cd47bd0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsOperationStatusClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsOperationStatusClientImpl.java @@ -88,7 +88,8 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recommendation action session operation status. + * @return recommendation action session operation status along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -137,7 +138,8 @@ private Mono> getWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recommendation action session operation status. + * @return recommendation action session operation status along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -182,7 +184,7 @@ private Mono> getWithRes * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recommendation action session operation status. + * @return recommendation action session operation status on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String locationName, String operationId) { @@ -221,7 +223,7 @@ public RecommendedActionSessionsOperationStatusInner get(String locationName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recommendation action session operation status. + * @return recommendation action session operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsResultsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsResultsClientImpl.java index 264417491690..5a52bdb47504 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsResultsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsResultsClientImpl.java @@ -101,7 +101,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recommendation actions. + * @return a list of recommendation actions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -159,7 +160,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recommendation actions. + * @return a list of recommendation actions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -277,7 +279,8 @@ public PagedIterable list(String locationName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recommendation actions. + * @return a list of recommendation actions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -313,7 +316,8 @@ private Mono> listNextSinglePageAsync(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recommendation actions. + * @return a list of recommendation actions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LogFilesClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LogFilesClientImpl.java index 2c69a441d5ad..1d73d1d30ea4 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LogFilesClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LogFilesClientImpl.java @@ -60,7 +60,7 @@ public final class LogFilesClientImpl implements LogFilesClient { private interface LogFilesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/logFiles") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -82,7 +82,7 @@ Mono> 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 log files. + * @return a list of log files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { @@ -135,7 +135,7 @@ private Mono> listByServerSinglePageAsync(String res * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of log files. + * @return a list of log files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/OperationsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/OperationsClientImpl.java index b5b3378b1541..72601148761d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/OperationsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/OperationsClientImpl.java @@ -54,7 +54,7 @@ public final class OperationsClientImpl implements OperationsClient { @ServiceInterface(name = "MariaDBManagementCli") private interface OperationsService { @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.DBForMariaDB/operations") + @Get("/providers/Microsoft.DBforMariaDB/operations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -69,7 +69,8 @@ Mono> list( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations. + * @return a list of resource provider operations along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync() { @@ -93,7 +94,8 @@ private Mono> listWithResponseAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations. + * @return a list of resource provider operations along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(Context context) { @@ -114,7 +116,7 @@ private Mono> listWithResponseAsync(Context c * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations. + * @return a list of resource provider operations on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync() { @@ -148,7 +150,7 @@ public OperationListResultInner list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations. + * @return a list of resource provider operations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionsClientImpl.java index 08c80965967b..802dea763ed0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionsClientImpl.java @@ -172,7 +172,7 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -230,7 +230,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -284,7 +284,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -327,7 +327,7 @@ public PrivateEndpointConnectionInner 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 private endpoint connection. + * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -345,7 +345,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -413,7 +413,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -478,9 +478,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -496,7 +496,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -510,9 +510,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -544,9 +544,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -567,9 +567,9 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -591,7 +591,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -615,7 +615,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -684,7 +684,7 @@ public PrivateEndpointConnectionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -742,7 +742,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -796,16 +796,17 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private 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, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -818,9 +819,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); @@ -840,9 +841,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String privateEndpointConnectionName) { return beginDeleteAsync(resourceGroupName, serverName, privateEndpointConnectionName).getSyncPoller(); @@ -858,9 +859,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @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(); @@ -875,7 +876,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName) { @@ -894,7 +895,7 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -946,7 +947,7 @@ public void delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateTagsWithResponseAsync( @@ -1011,7 +1012,7 @@ private Mono>> updateTagsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateTagsWithResponseAsync( @@ -1076,9 +1077,9 @@ private Mono>> updateTagsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateTagsAsync( String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters) { Mono>> mono = @@ -1090,7 +1091,7 @@ private PollerFlux, PrivateEndpointCo this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1104,9 +1105,9 @@ private PollerFlux, PrivateEndpointCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateTagsAsync( String resourceGroupName, String serverName, @@ -1137,9 +1138,9 @@ private PollerFlux, PrivateEndpointCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags( String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters) { return beginUpdateTagsAsync(resourceGroupName, serverName, privateEndpointConnectionName, parameters) @@ -1157,9 +1158,9 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags( String resourceGroupName, String serverName, @@ -1180,7 +1181,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateTagsAsync( @@ -1201,7 +1202,7 @@ private Mono updateTagsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateTagsAsync( @@ -1265,7 +1266,8 @@ public PrivateEndpointConnectionInner updateTags( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return all private endpoint connections on a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -1324,7 +1326,8 @@ private Mono> listByServerSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return all private endpoint connections on a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -1446,7 +1449,8 @@ 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 private endpoint connections. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -1482,7 +1486,8 @@ private Mono> listByServerNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateLinkResourcesClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateLinkResourcesClientImpl.java index a2bda1ebf6d1..4839b14c9b21 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateLinkResourcesClientImpl.java @@ -110,7 +110,8 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 MariaDB server. + * @return the private link resources for MariaDB server along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -169,7 +170,8 @@ private Mono> listByServerSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 MariaDB server. + * @return the private link resources for MariaDB server along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -293,7 +295,8 @@ 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 private link resource for MariaDB server. + * @return a private link resource for MariaDB server along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -348,7 +351,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource for MariaDB server. + * @return a private link resource for MariaDB server along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -399,7 +403,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private link resource for MariaDB server. + * @return a private link resource for MariaDB server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName, String groupName) { @@ -440,7 +444,7 @@ public PrivateLinkResourceInner get(String resourceGroupName, String serverName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 MariaDB server. + * @return a private link resource for MariaDB server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -455,7 +459,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. + * @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) { @@ -491,7 +496,8 @@ private Mono> listByServerNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/QueryTextsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/QueryTextsClientImpl.java index 3644ce130e1a..5d50894d8ec7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/QueryTextsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/QueryTextsClientImpl.java @@ -26,12 +26,15 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; import com.azure.resourcemanager.mariadb.fluent.QueryTextsClient; import com.azure.resourcemanager.mariadb.fluent.models.QueryTextInner; import com.azure.resourcemanager.mariadb.models.QueryTextsResultList; +import java.util.Collection; import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; +import java.util.stream.Stream; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in QueryTextsClient. */ @@ -90,7 +93,7 @@ Mono> listByServer( @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("serverName") String serverName, - @QueryParam("queryIds") String queryIds, + @QueryParam(value = "queryIds", multipleQueryParams = true) List queryIds, @HeaderParam("Accept") String accept, Context context); @@ -114,7 +117,7 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Text. + * @return represents a Query Text along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -169,7 +172,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Text. + * @return represents a Query Text along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -220,7 +223,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Text. + * @return represents a Query Text on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName, String queryId) { @@ -261,7 +264,7 @@ public QueryTextInner get(String resourceGroupName, String serverName, String qu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Text. + * @return represents a Query Text along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -278,7 +281,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query texts. + * @return a list of query texts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -307,8 +310,13 @@ private Mono> listByServerSinglePageAsync( } final String apiVersion = "2018-06-01"; final String accept = "application/json"; - String queryIdsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(queryIds, CollectionFormat.CSV); + List queryIdsConverted = + Optional + .ofNullable(queryIds) + .map(Collection::stream) + .orElseGet(Stream::empty) + .map((item) -> Objects.toString(item, "")) + .collect(Collectors.toList()); return FluxUtil .withContext( context -> @@ -344,7 +352,7 @@ private Mono> listByServerSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query texts. + * @return a list of query texts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -373,8 +381,13 @@ private Mono> listByServerSinglePageAsync( } final String apiVersion = "2018-06-01"; final String accept = "application/json"; - String queryIdsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(queryIds, CollectionFormat.CSV); + List queryIdsConverted = + Optional + .ofNullable(queryIds) + .map(Collection::stream) + .orElseGet(Stream::empty) + .map((item) -> Objects.toString(item, "")) + .collect(Collectors.toList()); context = this.client.mergeContext(context); return service .listByServer( @@ -478,7 +491,7 @@ 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 query texts. + * @return a list of query texts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -514,7 +527,7 @@ private Mono> listByServerNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query texts. + * @return a list of query texts along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecommendedActionsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecommendedActionsClientImpl.java index 92a2fef9a54f..efa232ac7a2b 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecommendedActionsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecommendedActionsClientImpl.java @@ -114,7 +114,7 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Recommendation Action. + * @return represents a Recommendation Action along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -175,7 +175,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Recommendation Action. + * @return represents a Recommendation Action along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -236,7 +236,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Recommendation Action. + * @return represents a Recommendation Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -281,7 +281,7 @@ public RecommendationActionInner 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 represents a Recommendation Action. + * @return represents a Recommendation Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -303,7 +303,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recommendation actions. + * @return a list of recommendation actions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -369,7 +370,8 @@ private Mono> listByServerSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recommendation actions. + * @return a list of recommendation actions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -526,7 +528,8 @@ 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 recommendation actions. + * @return a list of recommendation actions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -562,7 +565,8 @@ private Mono> listByServerNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of recommendation actions. + * @return a list of recommendation actions along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecoverableServersClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecoverableServersClientImpl.java index 31aec7c5b7ca..04c37a9363fc 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecoverableServersClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecoverableServersClientImpl.java @@ -56,7 +56,7 @@ public final class RecoverableServersClientImpl implements RecoverableServersCli private interface RecoverableServersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/recoverableServers") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -78,7 +78,7 @@ Mono> get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recoverable MariaDB Server. + * @return a recoverable MariaDB Server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -128,7 +128,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recoverable MariaDB Server. + * @return a recoverable MariaDB Server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -174,7 +174,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recoverable MariaDB Server. + * @return a recoverable MariaDB Server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName) { @@ -213,7 +213,7 @@ public RecoverableServerResourceInner get(String resourceGroupName, String serve * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 MariaDB Server. + * @return a recoverable MariaDB Server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ReplicasClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ReplicasClientImpl.java index 915a58bf0da3..ea77435ee156 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ReplicasClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ReplicasClientImpl.java @@ -60,7 +60,7 @@ public final class ReplicasClientImpl implements ReplicasClient { private interface ReplicasService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/replicas") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -82,7 +82,7 @@ Mono> 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 servers. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync(String resourceGroupName, String serverName) { @@ -135,7 +135,7 @@ private Mono> listByServerSinglePageAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ResourceProvidersClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ResourceProvidersClientImpl.java index e4d9bd5634d2..5dc351d387d6 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ResourceProvidersClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ResourceProvidersClientImpl.java @@ -99,7 +99,8 @@ Mono>> createRecommendedActionSession( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Query Performance Insight data reset. + * @return result of Query Performance Insight data reset along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -149,7 +150,8 @@ Mono>> createRecommendedActionSession( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Query Performance Insight data reset. + * @return result of Query Performance Insight data reset along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -196,7 +198,7 @@ Mono>> createRecommendedActionSession( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Query Performance Insight data reset. + * @return result of Query Performance Insight data reset on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono resetQueryPerformanceInsightDataAsync( @@ -237,7 +239,7 @@ public QueryPerformanceInsightResetDataResultInner resetQueryPerformanceInsightD * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Query Performance Insight data reset. + * @return result of Query Performance Insight data reset along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response resetQueryPerformanceInsightDataWithResponse( @@ -255,7 +257,7 @@ public Response resetQueryPerforman * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createRecommendedActionSessionWithResponseAsync( @@ -313,7 +315,7 @@ private Mono>> createRecommendedActionSessionWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createRecommendedActionSessionWithResponseAsync( @@ -367,16 +369,17 @@ private Mono>> createRecommendedActionSessionWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginCreateRecommendedActionSessionAsync( String resourceGroupName, String serverName, String advisorName, String databaseName) { Mono>> mono = createRecommendedActionSessionWithResponseAsync(resourceGroupName, serverName, advisorName, databaseName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -390,9 +393,9 @@ private PollerFlux, Void> beginCreateRecommendedActionSessionAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginCreateRecommendedActionSessionAsync( String resourceGroupName, String serverName, String advisorName, String databaseName, Context context) { context = this.client.mergeContext(context); @@ -414,9 +417,9 @@ private PollerFlux, Void> beginCreateRecommendedActionSessionAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCreateRecommendedActionSession( String resourceGroupName, String serverName, String advisorName, String databaseName) { return beginCreateRecommendedActionSessionAsync(resourceGroupName, serverName, advisorName, databaseName) @@ -434,9 +437,9 @@ public SyncPoller, Void> beginCreateRecommendedActionSession( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCreateRecommendedActionSession( String resourceGroupName, String serverName, String advisorName, String databaseName, Context context) { return beginCreateRecommendedActionSessionAsync( @@ -454,7 +457,7 @@ public SyncPoller, Void> beginCreateRecommendedActionSession( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createRecommendedActionSessionAsync( @@ -475,7 +478,7 @@ private Mono createRecommendedActionSessionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createRecommendedActionSessionAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerBasedPerformanceTiersClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerBasedPerformanceTiersClientImpl.java index 88fd400ba391..4c5d0f9c1d0a 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerBasedPerformanceTiersClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerBasedPerformanceTiersClientImpl.java @@ -63,7 +63,7 @@ public final class ServerBasedPerformanceTiersClientImpl implements ServerBasedP private interface ServerBasedPerformanceTiersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/performanceTiers") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -85,7 +85,7 @@ Mono> list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of performance tiers. + * @return a list of performance tiers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -139,7 +139,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of performance tiers. + * @return a list of performance tiers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerImpl.java index 31f4b8b508de..7d7f4df7f8c4 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerImpl.java @@ -219,6 +219,30 @@ public Server refresh(Context context) { return this; } + public void restart() { + serviceManager.servers().restart(resourceGroupName, serverName); + } + + public void restart(Context context) { + serviceManager.servers().restart(resourceGroupName, serverName, context); + } + + public void start() { + serviceManager.servers().start(resourceGroupName, serverName); + } + + public void start(Context context) { + serviceManager.servers().start(resourceGroupName, serverName, context); + } + + public void stop() { + serviceManager.servers().stop(resourceGroupName, serverName); + } + + public void stop(Context context) { + serviceManager.servers().stop(resourceGroupName, serverName, context); + } + public ServerImpl withRegion(Region location) { this.createParameters.withLocation(location.toString()); return this; diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerParametersClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerParametersClientImpl.java index 429398269b49..707de47afefe 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerParametersClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerParametersClientImpl.java @@ -62,7 +62,7 @@ public final class ServerParametersClientImpl implements ServerParametersClient private interface ServerParametersService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/updateConfigurations") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -86,7 +86,7 @@ Mono>> listUpdateConfigurations( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listUpdateConfigurationsWithResponseAsync( @@ -143,7 +143,7 @@ private Mono>> listUpdateConfigurationsWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> listUpdateConfigurationsWithResponseAsync( @@ -196,9 +196,9 @@ private Mono>> listUpdateConfigurationsWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationListResultInner> beginListUpdateConfigurationsAsync( String resourceGroupName, String serverName, ConfigurationListResultInner value) { @@ -211,7 +211,7 @@ private Mono>> listUpdateConfigurationsWithResponseAsy this.client.getHttpPipeline(), ConfigurationListResultInner.class, ConfigurationListResultInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -224,9 +224,9 @@ private Mono>> listUpdateConfigurationsWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationListResultInner> beginListUpdateConfigurationsAsync( String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context) { @@ -252,9 +252,9 @@ private Mono>> listUpdateConfigurationsWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations(String resourceGroupName, String serverName, ConfigurationListResultInner value) { return beginListUpdateConfigurationsAsync(resourceGroupName, serverName, value).getSyncPoller(); @@ -270,9 +270,9 @@ private Mono>> listUpdateConfigurationsWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations( String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context) { @@ -288,7 +288,7 @@ private Mono>> listUpdateConfigurationsWithResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listUpdateConfigurationsAsync( @@ -308,7 +308,7 @@ private Mono listUpdateConfigurationsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 configurations. + * @return a list of server configurations on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listUpdateConfigurationsAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesClientImpl.java index d666c4db3fe1..2f206338a256 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesClientImpl.java @@ -137,7 +137,7 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 security alert policy. + * @return a server's security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -194,7 +194,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's security alert policy. + * @return a server's security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -247,7 +247,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's security alert policy. + * @return a server's security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -290,7 +290,7 @@ public ServerSecurityAlertPolicyInner 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's security alert policy. + * @return a server's security alert policy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -308,7 +308,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server security alert policy. + * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -375,7 +375,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server security alert policy. + * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -439,9 +439,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server security alert policy. + * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -457,7 +457,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), ServerSecurityAlertPolicyInner.class, ServerSecurityAlertPolicyInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -471,9 +471,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server security alert policy. + * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -505,9 +505,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server security alert policy. + * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -528,9 +528,9 @@ public SyncPoller, ServerSecurityAler * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 security alert policy. + * @return a server security alert policy along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -551,7 +551,7 @@ public SyncPoller, ServerSecurityAler * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 security alert policy. + * @return a server security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -575,7 +575,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server security alert policy. + * @return a server security alert policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -641,7 +641,8 @@ public ServerSecurityAlertPolicyInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the server's threat detection policies. + * @return the server's threat detection policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -700,7 +701,8 @@ private Mono> listByServerSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the server's threat detection policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -822,7 +824,8 @@ 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 the server's security alert policies. + * @return a list of the server's security alert policies along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -858,7 +861,8 @@ private Mono> listByServerNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of the server's security alert policies along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServersClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServersClientImpl.java index 48247cef6161..8152e4793dc4 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServersClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServersClientImpl.java @@ -72,7 +72,7 @@ public final class ServersClientImpl implements ServersClient { private interface ServersService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -88,7 +88,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -104,7 +104,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -119,7 +119,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -134,7 +134,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -147,7 +147,7 @@ Mono> listByResourceGroup( Context context); @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBForMariaDB/servers") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DBforMariaDB/servers") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -159,7 +159,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/restart") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -212,7 +212,7 @@ Mono>> stop( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -269,7 +269,7 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -322,16 +322,16 @@ private Mono>> createWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerInner> beginCreateAsync( String resourceGroupName, String serverName, ServerForCreate parameters) { Mono>> mono = createWithResponseAsync(resourceGroupName, serverName, parameters); return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext()); } /** @@ -344,9 +344,9 @@ private PollerFlux, ServerInner> beginCreateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerInner> beginCreateAsync( String resourceGroupName, String serverName, ServerForCreate parameters, Context context) { context = this.client.mergeContext(context); @@ -367,9 +367,9 @@ private PollerFlux, ServerInner> beginCreateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginCreate( String resourceGroupName, String serverName, ServerForCreate parameters) { return beginCreateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); @@ -385,9 +385,9 @@ public SyncPoller, ServerInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginCreate( String resourceGroupName, String serverName, ServerForCreate parameters, Context context) { return beginCreateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); @@ -402,7 +402,7 @@ public SyncPoller, ServerInner> beginCreate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String serverName, ServerForCreate parameters) { @@ -421,7 +421,7 @@ private Mono createAsync(String resourceGroupName, String serverNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -475,7 +475,7 @@ public ServerInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -533,7 +533,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -587,16 +587,16 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerInner> beginUpdateAsync( String resourceGroupName, String serverName, ServerUpdateParameters parameters) { Mono>> mono = updateWithResponseAsync(resourceGroupName, serverName, parameters); return this .client .getLroResult( - mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), ServerInner.class, ServerInner.class, this.client.getContext()); } /** @@ -610,9 +610,9 @@ private PollerFlux, ServerInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerInner> beginUpdateAsync( String resourceGroupName, String serverName, ServerUpdateParameters parameters, Context context) { context = this.client.mergeContext(context); @@ -634,9 +634,9 @@ private PollerFlux, ServerInner> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginUpdate( String resourceGroupName, String serverName, ServerUpdateParameters parameters) { return beginUpdateAsync(resourceGroupName, serverName, parameters).getSyncPoller(); @@ -653,9 +653,9 @@ public SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerInner> beginUpdate( String resourceGroupName, String serverName, ServerUpdateParameters parameters, Context context) { return beginUpdateAsync(resourceGroupName, serverName, parameters, context).getSyncPoller(); @@ -671,7 +671,7 @@ public SyncPoller, ServerInner> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -692,7 +692,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a server. + * @return represents a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -746,7 +746,7 @@ public ServerInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String serverName) { @@ -795,7 +795,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -841,14 +841,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String serverName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, serverName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -860,9 +861,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, Context context) { context = this.client.mergeContext(context); @@ -880,9 +881,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String serverName) { return beginDeleteAsync(resourceGroupName, serverName).getSyncPoller(); } @@ -896,9 +897,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, Context context) { return beginDeleteAsync(resourceGroupName, serverName, context).getSyncPoller(); @@ -912,7 +913,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName) { @@ -928,7 +929,7 @@ private Mono deleteAsync(String resourceGroupName, String serverName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, Context context) { @@ -974,7 +975,7 @@ public void delete(String resourceGroupName, String serverName, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1024,7 +1025,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1070,7 +1071,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String serverName) { @@ -1109,7 +1110,7 @@ public ServerInner getByResourceGroup(String resourceGroupName, String serverNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1124,7 +1125,7 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1172,7 +1173,7 @@ private Mono> listByResourceGroupSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1273,7 +1274,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * * @throws ManagementException thrown if 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. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1310,7 +1311,7 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1397,7 +1398,7 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync(String resourceGroupName, String serverName) { @@ -1446,7 +1447,7 @@ private Mono>> restartWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restartWithResponseAsync( @@ -1492,14 +1493,15 @@ private Mono>> restartWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String serverName) { Mono>> mono = restartWithResponseAsync(resourceGroupName, serverName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1511,9 +1513,9 @@ private PollerFlux, Void> beginRestartAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRestartAsync( String resourceGroupName, String serverName, Context context) { context = this.client.mergeContext(context); @@ -1531,9 +1533,9 @@ private PollerFlux, Void> beginRestartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart(String resourceGroupName, String serverName) { return beginRestartAsync(resourceGroupName, serverName).getSyncPoller(); } @@ -1547,9 +1549,9 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestart( String resourceGroupName, String serverName, Context context) { return beginRestartAsync(resourceGroupName, serverName, context).getSyncPoller(); @@ -1563,7 +1565,7 @@ public SyncPoller, Void> beginRestart( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String serverName) { @@ -1579,7 +1581,7 @@ private Mono restartAsync(String resourceGroupName, String serverName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String serverName, Context context) { @@ -1625,7 +1627,7 @@ public void restart(String resourceGroupName, String serverName, Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceGroupName, String serverName) { @@ -1674,7 +1676,7 @@ private Mono>> startWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync( @@ -1720,14 +1722,15 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync(String resourceGroupName, String serverName) { Mono>> mono = startWithResponseAsync(resourceGroupName, serverName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1739,9 +1742,9 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStartAsync( String resourceGroupName, String serverName, Context context) { context = this.client.mergeContext(context); @@ -1759,9 +1762,9 @@ private PollerFlux, Void> beginStartAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart(String resourceGroupName, String serverName) { return beginStartAsync(resourceGroupName, serverName).getSyncPoller(); } @@ -1775,9 +1778,9 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context) { return beginStartAsync(resourceGroupName, serverName, context).getSyncPoller(); } @@ -1790,7 +1793,7 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String serverName) { @@ -1806,7 +1809,7 @@ private Mono startAsync(String resourceGroupName, String serverName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String serverName, Context context) { @@ -1852,7 +1855,7 @@ public void start(String resourceGroupName, String serverName, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync(String resourceGroupName, String serverName) { @@ -1901,7 +1904,7 @@ private Mono>> stopWithResponseAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync( @@ -1947,14 +1950,15 @@ private Mono>> stopWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync(String resourceGroupName, String serverName) { Mono>> mono = stopWithResponseAsync(resourceGroupName, serverName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -1966,9 +1970,9 @@ private PollerFlux, Void> beginStopAsync(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginStopAsync( String resourceGroupName, String serverName, Context context) { context = this.client.mergeContext(context); @@ -1986,9 +1990,9 @@ private PollerFlux, Void> beginStopAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop(String resourceGroupName, String serverName) { return beginStopAsync(resourceGroupName, serverName).getSyncPoller(); } @@ -2002,9 +2006,9 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginStop(String resourceGroupName, String serverName, Context context) { return beginStopAsync(resourceGroupName, serverName, context).getSyncPoller(); } @@ -2017,7 +2021,7 @@ public SyncPoller, Void> beginStop(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String serverName) { @@ -2033,7 +2037,7 @@ private Mono stopAsync(String resourceGroupName, String serverName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String serverName, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/TopQueryStatisticsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/TopQueryStatisticsClientImpl.java index 1cdaefbdf7c0..20929f2f3a10 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/TopQueryStatisticsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/TopQueryStatisticsClientImpl.java @@ -113,7 +113,7 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Statistic. + * @return represents a Query Statistic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -169,7 +169,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Statistic. + * @return represents a Query Statistic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -221,7 +221,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Statistic. + * @return represents a Query Statistic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName, String queryStatisticId) { @@ -262,7 +262,7 @@ public QueryStatisticInner get(String resourceGroupName, String serverName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Statistic. + * @return represents a Query Statistic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -279,7 +279,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query statistics. + * @return a list of query statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -345,7 +345,7 @@ private Mono> listByServerSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query statistics. + * @return a list of query statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -479,7 +479,7 @@ 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 query statistics. + * @return a list of query statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -515,7 +515,7 @@ private Mono> listByServerNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of query statistics. + * @return a list of query statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRulesClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRulesClientImpl.java index ef40009009d3..de1b2fb752b5 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRulesClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRulesClientImpl.java @@ -69,7 +69,7 @@ public final class VirtualNetworkRulesClientImpl implements VirtualNetworkRulesC private interface VirtualNetworkRulesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -85,7 +85,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -102,7 +102,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -117,7 +117,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMariaDB" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB" + "/servers/{serverName}/virtualNetworkRules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -150,7 +150,7 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -207,7 +207,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -260,7 +260,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -302,7 +302,7 @@ public VirtualNetworkRuleInner get(String resourceGroupName, String serverName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -320,7 +320,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -387,7 +387,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -451,9 +451,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualNetworkRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, @@ -468,7 +468,7 @@ private PollerFlux, VirtualNetworkRuleInner> this.client.getHttpPipeline(), VirtualNetworkRuleInner.class, VirtualNetworkRuleInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -482,9 +482,9 @@ private PollerFlux, VirtualNetworkRuleInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualNetworkRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, @@ -514,9 +514,9 @@ private PollerFlux, VirtualNetworkRuleInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -537,9 +537,9 @@ public SyncPoller, VirtualNetworkRuleInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -560,7 +560,7 @@ public SyncPoller, VirtualNetworkRuleInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -584,7 +584,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -651,7 +651,7 @@ public VirtualNetworkRuleInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -706,7 +706,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -757,16 +757,17 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private 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, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -779,9 +780,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) { context = this.client.mergeContext(context); @@ -801,9 +802,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String virtualNetworkRuleName) { return beginDeleteAsync(resourceGroupName, serverName, virtualNetworkRuleName).getSyncPoller(); @@ -819,9 +820,9 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @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(); @@ -836,7 +837,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String serverName, String virtualNetworkRuleName) { @@ -855,7 +856,7 @@ private Mono deleteAsync(String resourceGroupName, String serverName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -904,7 +905,8 @@ public void delete(String resourceGroupName, String serverName, String virtualNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of virtual network rules in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -963,7 +965,8 @@ private Mono> listByServerSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of virtual network rules in a server along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -1085,7 +1088,8 @@ 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 virtual network rules. + * @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) { @@ -1121,7 +1125,8 @@ private Mono> listByServerNextSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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. + * @return a list of virtual network rules along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/WaitStatisticsClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/WaitStatisticsClientImpl.java index a32244698c13..1fb0872a0256 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/WaitStatisticsClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/WaitStatisticsClientImpl.java @@ -113,7 +113,7 @@ Mono> listByServerNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Wait Statistic. + * @return represents a Wait Statistic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -169,7 +169,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Wait Statistic. + * @return represents a Wait Statistic along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -221,7 +221,7 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Wait Statistic. + * @return represents a Wait Statistic on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String serverName, String waitStatisticsId) { @@ -262,7 +262,7 @@ public WaitStatisticInner get(String resourceGroupName, String serverName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Wait Statistic. + * @return represents a Wait Statistic along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -279,7 +279,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of wait statistics. + * @return a list of wait statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -345,7 +345,7 @@ private Mono> listByServerSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of wait statistics. + * @return a list of wait statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerSinglePageAsync( @@ -479,7 +479,7 @@ 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 wait statistics. + * @return a list of wait statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink) { @@ -515,7 +515,7 @@ private Mono> listByServerNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of wait statistics. + * @return a list of wait statistics along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByServerNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Advisors.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Advisors.java index 2333d156a5ed..3903e6445c74 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Advisors.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Advisors.java @@ -33,7 +33,7 @@ public interface Advisors { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a recommendation action advisor. + * @return a recommendation action advisor along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, String advisorName, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/CheckNameAvailabilities.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/CheckNameAvailabilities.java index 39d85008f416..37e5fce388fd 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/CheckNameAvailabilities.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/CheckNameAvailabilities.java @@ -28,7 +28,7 @@ public interface CheckNameAvailabilities { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a resource name availability. + * @return represents a resource name availability along with {@link Response}. */ Response executeWithResponse(NameAvailabilityRequest nameAvailabilityRequest, Context context); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Configurations.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Configurations.java index a7f75366f503..45c1ac42243d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Configurations.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Configurations.java @@ -33,7 +33,7 @@ public interface Configurations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a configuration of server along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String configurationName, Context context); @@ -70,7 +70,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a configuration of server along with {@link Response}. */ Configuration getById(String id); @@ -82,7 +82,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a configuration of server. + * @return information about a configuration of server along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Databases.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Databases.java index bd12e5a126ab..2080cad28cf0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Databases.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Databases.java @@ -58,7 +58,7 @@ public interface 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 information about a database. + * @return information about a database along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String databaseName, Context context); @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about a database along with {@link Response}. */ Database getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a database. + * @return information about a database along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRules.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRules.java index 0ecff692a3c0..1660f7d6bc70 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRules.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRules.java @@ -58,7 +58,7 @@ public interface FirewallRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server firewall rule. + * @return information about a server firewall rule along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String firewallRuleName, Context context); @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server firewall rule. + * @return information about a server firewall rule along with {@link Response}. */ FirewallRule getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server firewall rule. + * @return information about a server firewall rule along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedRecommendedActionSessionsOperationStatus.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedRecommendedActionSessionsOperationStatus.java index 37c26a53d2f5..66b53ec05e4a 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedRecommendedActionSessionsOperationStatus.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedRecommendedActionSessionsOperationStatus.java @@ -30,7 +30,7 @@ public interface LocationBasedRecommendedActionSessionsOperationStatus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return recommendation action session operation status. + * @return recommendation action session operation status along with {@link Response}. */ Response getWithResponse( String locationName, String operationId, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Operation.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Operation.java index e7d9565700b5..384231a8b342 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Operation.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Operation.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -38,6 +39,7 @@ public final class Operation { * 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; /** diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Operations.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Operations.java index 1d2b12161447..6065bac8a85d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Operations.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Operations.java @@ -25,7 +25,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of resource provider operations. + * @return a list of resource provider operations along with {@link Response}. */ Response listWithResponse(Context context); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnections.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnections.java index c5d64c04c25e..acb2392ccca1 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnections.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnections.java @@ -33,7 +33,7 @@ public interface PrivateEndpointConnections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response}. */ PrivateEndpointConnection getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResources.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResources.java index b6392c8e9e1b..e933b4dfb3de 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResources.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResources.java @@ -58,7 +58,7 @@ public interface PrivateLinkResources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 MariaDB server. + * @return a private link resource for MariaDB server along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String groupName, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryTexts.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryTexts.java index 812e23fefee9..3af88fba448a 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryTexts.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryTexts.java @@ -34,7 +34,7 @@ public interface QueryTexts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Text. + * @return represents a Query Text along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, String queryId, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecommendedActions.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecommendedActions.java index 6265b1ccb95f..e630661619a4 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecommendedActions.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecommendedActions.java @@ -36,7 +36,7 @@ RecommendationAction 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 represents a Recommendation Action. + * @return represents a Recommendation Action along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String advisorName, String recommendedActionName, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecoverableServers.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecoverableServers.java index 31c7a5184ae1..5a7c3921f193 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecoverableServers.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecoverableServers.java @@ -30,7 +30,7 @@ public interface RecoverableServers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 MariaDB Server. + * @return a recoverable MariaDB Server along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ResourceProviders.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ResourceProviders.java index bc7a4b904090..4f26911417e6 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ResourceProviders.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ResourceProviders.java @@ -31,7 +31,7 @@ QueryPerformanceInsightResetDataResult resetQueryPerformanceInsightData( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Query Performance Insight data reset. + * @return result of Query Performance Insight data reset along with {@link Response}. */ Response resetQueryPerformanceInsightDataWithResponse( String resourceGroupName, String serverName, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Server.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Server.java index 8c2378ca23c2..c162b9cc97fd 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Server.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Server.java @@ -403,4 +403,58 @@ interface WithReplicationRole { * @return the refreshed resource. */ Server refresh(Context context); + + /** + * Restarts a server. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restart(); + + /** + * Restarts a 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. + */ + void restart(Context context); + + /** + * Starts a stopped server. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void start(); + + /** + * Starts a stopped 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. + */ + void start(Context context); + + /** + * Stops a running server. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stop(); + + /** + * Stops a running 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. + */ + void stop(Context context); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerForCreate.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerForCreate.java index 7c654511e8af..dae1a5c0f819 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerForCreate.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerForCreate.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -37,6 +38,7 @@ public final class ServerForCreate { * Application-specific metadata in the form of key-value pairs. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicies.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicies.java index fff712283faf..c9dbd17ba3cc 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicies.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicies.java @@ -34,7 +34,7 @@ ServerSecurityAlertPolicy 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's security alert policy. + * @return a server's security alert policy along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, Context context); @@ -71,7 +71,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's security alert policy. + * @return a server's security alert policy along with {@link Response}. */ ServerSecurityAlertPolicy getById(String id); @@ -83,7 +83,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a server's security alert policy. + * @return a server's security alert policy along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerUpdateParameters.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerUpdateParameters.java index 183713314f8c..d63d4588ef86 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerUpdateParameters.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerUpdateParameters.java @@ -5,16 +5,16 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mariadb.fluent.models.ServerUpdateParametersProperties; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Parameters allowed to update for a server. */ -@JsonFlatten @Fluent -public class ServerUpdateParameters { +public final class ServerUpdateParameters { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerUpdateParameters.class); /* @@ -24,53 +24,17 @@ public class ServerUpdateParameters { private Sku sku; /* - * Application-specific metadata in the form of key-value pairs. - */ - @JsonProperty(value = "tags") - private Map tags; - - /* - * Storage profile of a server. - */ - @JsonProperty(value = "properties.storageProfile") - private StorageProfile storageProfile; - - /* - * The password of the administrator login. - */ - @JsonProperty(value = "properties.administratorLoginPassword") - private String administratorLoginPassword; - - /* - * The version of a server. - */ - @JsonProperty(value = "properties.version") - private ServerVersion version; - - /* - * Enable ssl enforcement or not when connect to server. - */ - @JsonProperty(value = "properties.sslEnforcement") - private SslEnforcementEnum sslEnforcement; - - /* - * Enforce a minimal Tls version for the server. + * The properties that can be updated for a server. */ - @JsonProperty(value = "properties.minimalTlsVersion") - private MinimalTlsVersionEnum minimalTlsVersion; + @JsonProperty(value = "properties") + private ServerUpdateParametersProperties innerProperties; /* - * Whether or not public network access is allowed for this server. Value - * is optional but if passed in, must be 'Enabled' or 'Disabled' - */ - @JsonProperty(value = "properties.publicNetworkAccess") - private PublicNetworkAccessEnum publicNetworkAccess; - - /* - * The replication role of the server. + * Application-specific metadata in the form of key-value pairs. */ - @JsonProperty(value = "properties.replicationRole") - private String replicationRole; + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; /** * Get the sku property: The SKU (pricing tier) of the server. @@ -92,6 +56,15 @@ public ServerUpdateParameters withSku(Sku sku) { return this; } + /** + * Get the innerProperties property: The properties that can be updated for a server. + * + * @return the innerProperties value. + */ + private ServerUpdateParametersProperties innerProperties() { + return this.innerProperties; + } + /** * Get the tags property: Application-specific metadata in the form of key-value pairs. * @@ -118,7 +91,7 @@ public ServerUpdateParameters withTags(Map tags) { * @return the storageProfile value. */ public StorageProfile storageProfile() { - return this.storageProfile; + return this.innerProperties() == null ? null : this.innerProperties().storageProfile(); } /** @@ -128,7 +101,10 @@ public StorageProfile storageProfile() { * @return the ServerUpdateParameters object itself. */ public ServerUpdateParameters withStorageProfile(StorageProfile storageProfile) { - this.storageProfile = storageProfile; + if (this.innerProperties() == null) { + this.innerProperties = new ServerUpdateParametersProperties(); + } + this.innerProperties().withStorageProfile(storageProfile); return this; } @@ -138,7 +114,7 @@ public ServerUpdateParameters withStorageProfile(StorageProfile storageProfile) * @return the administratorLoginPassword value. */ public String administratorLoginPassword() { - return this.administratorLoginPassword; + return this.innerProperties() == null ? null : this.innerProperties().administratorLoginPassword(); } /** @@ -148,7 +124,10 @@ public String administratorLoginPassword() { * @return the ServerUpdateParameters object itself. */ public ServerUpdateParameters withAdministratorLoginPassword(String administratorLoginPassword) { - this.administratorLoginPassword = administratorLoginPassword; + if (this.innerProperties() == null) { + this.innerProperties = new ServerUpdateParametersProperties(); + } + this.innerProperties().withAdministratorLoginPassword(administratorLoginPassword); return this; } @@ -158,7 +137,7 @@ public ServerUpdateParameters withAdministratorLoginPassword(String administrato * @return the version value. */ public ServerVersion version() { - return this.version; + return this.innerProperties() == null ? null : this.innerProperties().version(); } /** @@ -168,7 +147,10 @@ public ServerVersion version() { * @return the ServerUpdateParameters object itself. */ public ServerUpdateParameters withVersion(ServerVersion version) { - this.version = version; + if (this.innerProperties() == null) { + this.innerProperties = new ServerUpdateParametersProperties(); + } + this.innerProperties().withVersion(version); return this; } @@ -178,7 +160,7 @@ public ServerUpdateParameters withVersion(ServerVersion version) { * @return the sslEnforcement value. */ public SslEnforcementEnum sslEnforcement() { - return this.sslEnforcement; + return this.innerProperties() == null ? null : this.innerProperties().sslEnforcement(); } /** @@ -188,7 +170,10 @@ public SslEnforcementEnum sslEnforcement() { * @return the ServerUpdateParameters object itself. */ public ServerUpdateParameters withSslEnforcement(SslEnforcementEnum sslEnforcement) { - this.sslEnforcement = sslEnforcement; + if (this.innerProperties() == null) { + this.innerProperties = new ServerUpdateParametersProperties(); + } + this.innerProperties().withSslEnforcement(sslEnforcement); return this; } @@ -198,7 +183,7 @@ public ServerUpdateParameters withSslEnforcement(SslEnforcementEnum sslEnforceme * @return the minimalTlsVersion value. */ public MinimalTlsVersionEnum minimalTlsVersion() { - return this.minimalTlsVersion; + return this.innerProperties() == null ? null : this.innerProperties().minimalTlsVersion(); } /** @@ -208,7 +193,10 @@ public MinimalTlsVersionEnum minimalTlsVersion() { * @return the ServerUpdateParameters object itself. */ public ServerUpdateParameters withMinimalTlsVersion(MinimalTlsVersionEnum minimalTlsVersion) { - this.minimalTlsVersion = minimalTlsVersion; + if (this.innerProperties() == null) { + this.innerProperties = new ServerUpdateParametersProperties(); + } + this.innerProperties().withMinimalTlsVersion(minimalTlsVersion); return this; } @@ -219,7 +207,7 @@ public ServerUpdateParameters withMinimalTlsVersion(MinimalTlsVersionEnum minima * @return the publicNetworkAccess value. */ public PublicNetworkAccessEnum publicNetworkAccess() { - return this.publicNetworkAccess; + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** @@ -230,7 +218,10 @@ public PublicNetworkAccessEnum publicNetworkAccess() { * @return the ServerUpdateParameters object itself. */ public ServerUpdateParameters withPublicNetworkAccess(PublicNetworkAccessEnum publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + if (this.innerProperties() == null) { + this.innerProperties = new ServerUpdateParametersProperties(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } @@ -240,7 +231,7 @@ public ServerUpdateParameters withPublicNetworkAccess(PublicNetworkAccessEnum pu * @return the replicationRole value. */ public String replicationRole() { - return this.replicationRole; + return this.innerProperties() == null ? null : this.innerProperties().replicationRole(); } /** @@ -250,7 +241,10 @@ public String replicationRole() { * @return the ServerUpdateParameters object itself. */ public ServerUpdateParameters withReplicationRole(String replicationRole) { - this.replicationRole = replicationRole; + if (this.innerProperties() == null) { + this.innerProperties = new ServerUpdateParametersProperties(); + } + this.innerProperties().withReplicationRole(replicationRole); return this; } @@ -263,8 +257,8 @@ public void validate() { if (sku() != null) { sku().validate(); } - if (storageProfile() != null) { - storageProfile().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Servers.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Servers.java index 96e1d36ed350..c70cbb69d119 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Servers.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Servers.java @@ -54,7 +54,7 @@ public interface Servers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String serverName, Context context); @@ -177,7 +177,7 @@ public interface Servers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server along with {@link Response}. */ Server getById(String id); @@ -189,7 +189,7 @@ public interface Servers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about a server. + * @return information about a server along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TagsObject.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TagsObject.java index 0d92e6054752..75d569b8d4cf 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TagsObject.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TagsObject.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -19,6 +20,7 @@ public final class TagsObject { * Resource tags. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /** diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatistics.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatistics.java index 507b60a68eef..b16cd0c826c4 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatistics.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatistics.java @@ -33,7 +33,7 @@ public interface TopQueryStatistics { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Query Statistic. + * @return represents a Query Statistic along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String queryStatisticId, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatisticsInput.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatisticsInput.java index cf6437b86f2b..fcc049c0c3a0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatisticsInput.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatisticsInput.java @@ -5,53 +5,31 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mariadb.fluent.models.TopQueryStatisticsInputProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Input to get top query statistics. */ -@JsonFlatten @Fluent -public class TopQueryStatisticsInput { +public final class TopQueryStatisticsInput { @JsonIgnore private final ClientLogger logger = new ClientLogger(TopQueryStatisticsInput.class); /* - * Max number of top queries to return. + * The properties of a wait statistics input. */ - @JsonProperty(value = "properties.numberOfTopQueries", required = true) - private int numberOfTopQueries; + @JsonProperty(value = "properties", required = true) + private TopQueryStatisticsInputProperties innerProperties = new TopQueryStatisticsInputProperties(); - /* - * Aggregation function name. - */ - @JsonProperty(value = "properties.aggregationFunction", required = true) - private String aggregationFunction; - - /* - * Observed metric name. - */ - @JsonProperty(value = "properties.observedMetric", required = true) - private String observedMetric; - - /* - * Observation start time. - */ - @JsonProperty(value = "properties.observationStartTime", required = true) - private OffsetDateTime observationStartTime; - - /* - * Observation end time. - */ - @JsonProperty(value = "properties.observationEndTime", required = true) - private OffsetDateTime observationEndTime; - - /* - * Aggregation interval type in ISO 8601 format. + /** + * Get the innerProperties property: The properties of a wait statistics input. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.aggregationWindow", required = true) - private String aggregationWindow; + private TopQueryStatisticsInputProperties innerProperties() { + return this.innerProperties; + } /** * Get the numberOfTopQueries property: Max number of top queries to return. @@ -59,7 +37,7 @@ public class TopQueryStatisticsInput { * @return the numberOfTopQueries value. */ public int numberOfTopQueries() { - return this.numberOfTopQueries; + return this.innerProperties() == null ? 0 : this.innerProperties().numberOfTopQueries(); } /** @@ -69,7 +47,10 @@ public int numberOfTopQueries() { * @return the TopQueryStatisticsInput object itself. */ public TopQueryStatisticsInput withNumberOfTopQueries(int numberOfTopQueries) { - this.numberOfTopQueries = numberOfTopQueries; + if (this.innerProperties() == null) { + this.innerProperties = new TopQueryStatisticsInputProperties(); + } + this.innerProperties().withNumberOfTopQueries(numberOfTopQueries); return this; } @@ -79,7 +60,7 @@ public TopQueryStatisticsInput withNumberOfTopQueries(int numberOfTopQueries) { * @return the aggregationFunction value. */ public String aggregationFunction() { - return this.aggregationFunction; + return this.innerProperties() == null ? null : this.innerProperties().aggregationFunction(); } /** @@ -89,7 +70,10 @@ public String aggregationFunction() { * @return the TopQueryStatisticsInput object itself. */ public TopQueryStatisticsInput withAggregationFunction(String aggregationFunction) { - this.aggregationFunction = aggregationFunction; + if (this.innerProperties() == null) { + this.innerProperties = new TopQueryStatisticsInputProperties(); + } + this.innerProperties().withAggregationFunction(aggregationFunction); return this; } @@ -99,7 +83,7 @@ public TopQueryStatisticsInput withAggregationFunction(String aggregationFunctio * @return the observedMetric value. */ public String observedMetric() { - return this.observedMetric; + return this.innerProperties() == null ? null : this.innerProperties().observedMetric(); } /** @@ -109,7 +93,10 @@ public String observedMetric() { * @return the TopQueryStatisticsInput object itself. */ public TopQueryStatisticsInput withObservedMetric(String observedMetric) { - this.observedMetric = observedMetric; + if (this.innerProperties() == null) { + this.innerProperties = new TopQueryStatisticsInputProperties(); + } + this.innerProperties().withObservedMetric(observedMetric); return this; } @@ -119,7 +106,7 @@ public TopQueryStatisticsInput withObservedMetric(String observedMetric) { * @return the observationStartTime value. */ public OffsetDateTime observationStartTime() { - return this.observationStartTime; + return this.innerProperties() == null ? null : this.innerProperties().observationStartTime(); } /** @@ -129,7 +116,10 @@ public OffsetDateTime observationStartTime() { * @return the TopQueryStatisticsInput object itself. */ public TopQueryStatisticsInput withObservationStartTime(OffsetDateTime observationStartTime) { - this.observationStartTime = observationStartTime; + if (this.innerProperties() == null) { + this.innerProperties = new TopQueryStatisticsInputProperties(); + } + this.innerProperties().withObservationStartTime(observationStartTime); return this; } @@ -139,7 +129,7 @@ public TopQueryStatisticsInput withObservationStartTime(OffsetDateTime observati * @return the observationEndTime value. */ public OffsetDateTime observationEndTime() { - return this.observationEndTime; + return this.innerProperties() == null ? null : this.innerProperties().observationEndTime(); } /** @@ -149,7 +139,10 @@ public OffsetDateTime observationEndTime() { * @return the TopQueryStatisticsInput object itself. */ public TopQueryStatisticsInput withObservationEndTime(OffsetDateTime observationEndTime) { - this.observationEndTime = observationEndTime; + if (this.innerProperties() == null) { + this.innerProperties = new TopQueryStatisticsInputProperties(); + } + this.innerProperties().withObservationEndTime(observationEndTime); return this; } @@ -159,7 +152,7 @@ public TopQueryStatisticsInput withObservationEndTime(OffsetDateTime observation * @return the aggregationWindow value. */ public String aggregationWindow() { - return this.aggregationWindow; + return this.innerProperties() == null ? null : this.innerProperties().aggregationWindow(); } /** @@ -169,7 +162,10 @@ public String aggregationWindow() { * @return the TopQueryStatisticsInput object itself. */ public TopQueryStatisticsInput withAggregationWindow(String aggregationWindow) { - this.aggregationWindow = aggregationWindow; + if (this.innerProperties() == null) { + this.innerProperties = new TopQueryStatisticsInputProperties(); + } + this.innerProperties().withAggregationWindow(aggregationWindow); return this; } @@ -179,35 +175,13 @@ public TopQueryStatisticsInput withAggregationWindow(String aggregationWindow) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (aggregationFunction() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property aggregationFunction in model TopQueryStatisticsInput")); - } - if (observedMetric() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property observedMetric in model TopQueryStatisticsInput")); - } - if (observationStartTime() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property observationStartTime in model TopQueryStatisticsInput")); - } - if (observationEndTime() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property observationEndTime in model TopQueryStatisticsInput")); - } - if (aggregationWindow() == null) { + if (innerProperties() == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - "Missing required property aggregationWindow in model TopQueryStatisticsInput")); + "Missing required property innerProperties in model TopQueryStatisticsInput")); + } else { + innerProperties().validate(); } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRules.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRules.java index cedb76d1fefa..17633981eceb 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRules.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRules.java @@ -33,7 +33,7 @@ public interface VirtualNetworkRules { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context); @@ -95,7 +95,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response}. */ VirtualNetworkRule getById(String id); @@ -107,7 +107,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatistics.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatistics.java index 9ba9927ec4a3..222fbe5e0ecf 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatistics.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatistics.java @@ -33,7 +33,7 @@ public interface WaitStatistics { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Wait Statistic. + * @return represents a Wait Statistic along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String serverName, String waitStatisticsId, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatisticsInput.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatisticsInput.java index ca1dd3cc850c..88234e0c9c0a 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatisticsInput.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatisticsInput.java @@ -5,35 +5,31 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.mariadb.fluent.models.WaitStatisticsInputProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Input to get wait statistics. */ -@JsonFlatten @Fluent -public class WaitStatisticsInput { +public final class WaitStatisticsInput { @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticsInput.class); /* - * Observation start time. + * The properties of a wait statistics input. */ - @JsonProperty(value = "properties.observationStartTime", required = true) - private OffsetDateTime observationStartTime; + @JsonProperty(value = "properties", required = true) + private WaitStatisticsInputProperties innerProperties = new WaitStatisticsInputProperties(); - /* - * Observation end time. - */ - @JsonProperty(value = "properties.observationEndTime", required = true) - private OffsetDateTime observationEndTime; - - /* - * Aggregation interval type in ISO 8601 format. + /** + * Get the innerProperties property: The properties of a wait statistics input. + * + * @return the innerProperties value. */ - @JsonProperty(value = "properties.aggregationWindow", required = true) - private String aggregationWindow; + private WaitStatisticsInputProperties innerProperties() { + return this.innerProperties; + } /** * Get the observationStartTime property: Observation start time. @@ -41,7 +37,7 @@ public class WaitStatisticsInput { * @return the observationStartTime value. */ public OffsetDateTime observationStartTime() { - return this.observationStartTime; + return this.innerProperties() == null ? null : this.innerProperties().observationStartTime(); } /** @@ -51,7 +47,10 @@ public OffsetDateTime observationStartTime() { * @return the WaitStatisticsInput object itself. */ public WaitStatisticsInput withObservationStartTime(OffsetDateTime observationStartTime) { - this.observationStartTime = observationStartTime; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticsInputProperties(); + } + this.innerProperties().withObservationStartTime(observationStartTime); return this; } @@ -61,7 +60,7 @@ public WaitStatisticsInput withObservationStartTime(OffsetDateTime observationSt * @return the observationEndTime value. */ public OffsetDateTime observationEndTime() { - return this.observationEndTime; + return this.innerProperties() == null ? null : this.innerProperties().observationEndTime(); } /** @@ -71,7 +70,10 @@ public OffsetDateTime observationEndTime() { * @return the WaitStatisticsInput object itself. */ public WaitStatisticsInput withObservationEndTime(OffsetDateTime observationEndTime) { - this.observationEndTime = observationEndTime; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticsInputProperties(); + } + this.innerProperties().withObservationEndTime(observationEndTime); return this; } @@ -81,7 +83,7 @@ public WaitStatisticsInput withObservationEndTime(OffsetDateTime observationEndT * @return the aggregationWindow value. */ public String aggregationWindow() { - return this.aggregationWindow; + return this.innerProperties() == null ? null : this.innerProperties().aggregationWindow(); } /** @@ -91,7 +93,10 @@ public String aggregationWindow() { * @return the WaitStatisticsInput object itself. */ public WaitStatisticsInput withAggregationWindow(String aggregationWindow) { - this.aggregationWindow = aggregationWindow; + if (this.innerProperties() == null) { + this.innerProperties = new WaitStatisticsInputProperties(); + } + this.innerProperties().withAggregationWindow(aggregationWindow); return this; } @@ -101,23 +106,13 @@ public WaitStatisticsInput withAggregationWindow(String aggregationWindow) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (observationStartTime() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property observationStartTime in model WaitStatisticsInput")); - } - if (observationEndTime() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property observationEndTime in model WaitStatisticsInput")); - } - if (aggregationWindow() == null) { + if (innerProperties() == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - "Missing required property aggregationWindow in model WaitStatisticsInput")); + "Missing required property innerProperties in model WaitStatisticsInput")); + } else { + innerProperties().validate(); } } } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/AdvisorsGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/AdvisorsGetSamples.java new file mode 100644 index 000000000000..654458c9b390 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/AdvisorsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Advisors Get. */ +public final class AdvisorsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/AdvisorsGet.json + */ + /** + * Sample code: AdvisorsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void advisorsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.advisors().getWithResponse("testResourceGroupName", "testServerName", "Index", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/AdvisorsListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/AdvisorsListByServerSamples.java new file mode 100644 index 000000000000..9c460996def9 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/AdvisorsListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Advisors ListByServer. */ +public final class AdvisorsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/AdvisorsListByServer.json + */ + /** + * Sample code: AdvisorsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void advisorsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.advisors().listByServer("testResourceGroupName", "testServerName", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/CheckNameAvailabilityExecuteSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/CheckNameAvailabilityExecuteSamples.java new file mode 100644 index 000000000000..011880e75312 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/CheckNameAvailabilityExecuteSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.NameAvailabilityRequest; + +/** Samples for CheckNameAvailability Execute. */ +public final class CheckNameAvailabilityExecuteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/CheckNameAvailability.json + */ + /** + * Sample code: NameAvailability. + * + * @param manager Entry point to MariaDBManager. + */ + public static void nameAvailability(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .checkNameAvailabilities() + .executeWithResponse( + new NameAvailabilityRequest().withName("name1").withType("Microsoft.DBforMariaDB"), Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsCreateOrUpdateSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..925e7dd24c51 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +/** Samples for Configurations CreateOrUpdate. */ +public final class ConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ConfigurationCreateOrUpdate.json + */ + /** + * Sample code: ConfigurationCreateOrUpdate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void configurationCreateOrUpdate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .configurations() + .define("event_scheduler") + .withExistingServer("TestGroup", "testserver") + .withValue("off") + .withSource("user-override") + .create(); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsGetSamples.java new file mode 100644 index 000000000000..d892521400ef --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Configurations Get. */ +public final class ConfigurationsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ConfigurationGet.json + */ + /** + * Sample code: ConfigurationGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void configurationGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.configurations().getWithResponse("TestGroup", "testserver", "event_scheduler", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsListByServerSamples.java new file mode 100644 index 000000000000..3fee37e925cd --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Configurations ListByServer. */ +public final class ConfigurationsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ConfigurationListByServer.json + */ + /** + * Sample code: ConfigurationList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void configurationList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.configurations().listByServer("testrg", "mariadbtestsvc1", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesCreateOrUpdateSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..d2835cbb0c15 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +/** Samples for Databases CreateOrUpdate. */ +public final class DatabasesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/DatabaseCreate.json + */ + /** + * Sample code: DatabaseCreate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void databaseCreate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .databases() + .define("db1") + .withExistingServer("TestGroup", "testserver") + .withCharset("utf8") + .withCollation("utf8_general_ci") + .create(); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesDeleteSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesDeleteSamples.java new file mode 100644 index 000000000000..a796d4196d04 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Databases Delete. */ +public final class DatabasesDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/DatabaseDelete.json + */ + /** + * Sample code: DatabaseDelete. + * + * @param manager Entry point to MariaDBManager. + */ + public static void databaseDelete(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.databases().delete("TestGroup", "testserver", "db1", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesGetSamples.java new file mode 100644 index 000000000000..707559a23a0d --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Databases Get. */ +public final class DatabasesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/DatabaseGet.json + */ + /** + * Sample code: DatabaseGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void databaseGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.databases().getWithResponse("TestGroup", "testserver", "db1", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesListByServerSamples.java new file mode 100644 index 000000000000..53ecb07603af --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Databases ListByServer. */ +public final class DatabasesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/DatabaseListByServer.json + */ + /** + * Sample code: DatabaseList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void databaseList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.databases().listByServer("TestGroup", "testserver", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesCreateOrUpdateSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..cfa4539deca2 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +/** Samples for FirewallRules CreateOrUpdate. */ +public final class FirewallRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/FirewallRuleCreate.json + */ + /** + * Sample code: FirewallRuleCreate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void firewallRuleCreate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .firewallRules() + .define("rule1") + .withExistingServer("TestGroup", "testserver") + .withStartIpAddress("0.0.0.0") + .withEndIpAddress("255.255.255.255") + .create(); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesDeleteSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesDeleteSamples.java new file mode 100644 index 000000000000..167361dfb230 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for FirewallRules Delete. */ +public final class FirewallRulesDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/FirewallRuleDelete.json + */ + /** + * Sample code: FirewallRuleDelete. + * + * @param manager Entry point to MariaDBManager. + */ + public static void firewallRuleDelete(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.firewallRules().delete("TestGroup", "testserver", "rule1", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesGetSamples.java new file mode 100644 index 000000000000..2793a2f51739 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for FirewallRules Get. */ +public final class FirewallRulesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/FirewallRuleGet.json + */ + /** + * Sample code: FirewallRuleGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void firewallRuleGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.firewallRules().getWithResponse("TestGroup", "testserver", "rule1", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesListByServerSamples.java new file mode 100644 index 000000000000..1755b8a381c0 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for FirewallRules ListByServer. */ +public final class FirewallRulesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/FirewallRuleListByServer.json + */ + /** + * Sample code: FirewallRuleList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void firewallRuleList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.firewallRules().listByServer("TestGroup", "testserver", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedPerformanceTierListSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedPerformanceTierListSamples.java new file mode 100644 index 000000000000..ee9c575a4406 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedPerformanceTierListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for LocationBasedPerformanceTier List. */ +public final class LocationBasedPerformanceTierListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PerformanceTiersListByLocation.json + */ + /** + * Sample code: PerformanceTiersList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void performanceTiersList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.locationBasedPerformanceTiers().list("WestUS", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedRecommendedActionSessionsOperationStatusGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedRecommendedActionSessionsOperationStatusGetSamples.java new file mode 100644 index 000000000000..ae396c68a1c1 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedRecommendedActionSessionsOperationStatusGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for LocationBasedRecommendedActionSessionsOperationStatus Get. */ +public final class LocationBasedRecommendedActionSessionsOperationStatusGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionSessionOperationStatus.json + */ + /** + * Sample code: RecommendedActionSessionOperationStatus. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionSessionOperationStatus( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .locationBasedRecommendedActionSessionsOperationStatus() + .getWithResponse("WestUS", "aaaabbbb-cccc-dddd-0000-111122223333", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedRecommendedActionSessionsResultListSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedRecommendedActionSessionsResultListSamples.java new file mode 100644 index 000000000000..ac9d4aca12b1 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedRecommendedActionSessionsResultListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for LocationBasedRecommendedActionSessionsResult List. */ +public final class LocationBasedRecommendedActionSessionsResultListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionSessionResult.json + */ + /** + * Sample code: RecommendedActionSessionResult. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionSessionResult(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .locationBasedRecommendedActionSessionsResults() + .list("WestUS", "aaaabbbb-cccc-dddd-0000-111122223333", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LogFilesListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LogFilesListByServerSamples.java new file mode 100644 index 000000000000..710e45b06b53 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LogFilesListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for LogFiles ListByServer. */ +public final class LogFilesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/LogFileListByServer.json + */ + /** + * Sample code: LogFileList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void logFileList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.logFiles().listByServer("TestGroup", "testserver", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/OperationsListSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/OperationsListSamples.java new file mode 100644 index 000000000000..d5bd597648b9 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/OperationList.json + */ + /** + * Sample code: OperationList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void operationList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.operations().listWithResponse(Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..bc7b7f116789 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.resourcemanager.mariadb.models.PrivateLinkServiceConnectionStateProperty; + +/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionUpdate.json + */ + /** + * Sample code: Approve or reject a private endpoint connection with a given name. + * + * @param manager Entry point to MariaDBManager. + */ + public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .privateEndpointConnections() + .define("private-endpoint-connection-name") + .withExistingServer("Default", "test-svr") + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty() + .withStatus("Approved") + .withDescription("Approved by johndoe@contoso.com")) + .create(); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsDeleteSamples.java new file mode 100644 index 000000000000..a8cf7b036a4d --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Delete. */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionDelete.json + */ + /** + * Sample code: Deletes a private endpoint connection with a given name. + * + * @param manager Entry point to MariaDBManager. + */ + public static void deletesAPrivateEndpointConnectionWithAGivenName( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .privateEndpointConnections() + .delete("Default", "test-svr", "private-endpoint-connection-name", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsGetSamples.java new file mode 100644 index 000000000000..9eaaa0ab2247 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections Get. */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionGet.json + */ + /** + * Sample code: Gets private endpoint connection. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsPrivateEndpointConnection(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .privateEndpointConnections() + .getWithResponse("Default", "test-svr", "private-endpoint-connection-name", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsListByServerSamples.java new file mode 100644 index 000000000000..6bc5dac963e9 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsListByServerSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnections ListByServer. */ +public final class PrivateEndpointConnectionsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionList.json + */ + /** + * Sample code: Gets list of private endpoint connections on a server. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsListOfPrivateEndpointConnectionsOnAServer( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.privateEndpointConnections().listByServer("Default", "test-svr", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsUpdateTagsSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsUpdateTagsSamples.java new file mode 100644 index 000000000000..78a695c597ed --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsUpdateTagsSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.PrivateEndpointConnection; +import java.util.HashMap; +import java.util.Map; + +/** Samples for PrivateEndpointConnections UpdateTags. */ +public final class PrivateEndpointConnectionsUpdateTagsSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateEndpointConnectionUpdateTags.json + */ + /** + * Sample code: Update private endpoint connection Tags. + * + * @param manager Entry point to MariaDBManager. + */ + public static void updatePrivateEndpointConnectionTags(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + PrivateEndpointConnection resource = + manager + .privateEndpointConnections() + .getWithResponse("Default", "test-svr", "private-endpoint-connection-name", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key1", "val1", "key2", "val2")).apply(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateLinkResourcesGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateLinkResourcesGetSamples.java new file mode 100644 index 000000000000..98fcfab112f8 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateLinkResourcesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources Get. */ +public final class PrivateLinkResourcesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateLinkResourcesGet.json + */ + /** + * Sample code: Gets a private link resource for MariaDB. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsAPrivateLinkResourceForMariaDB(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.privateLinkResources().getWithResponse("Default", "test-svr", "plr", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateLinkResourcesListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateLinkResourcesListByServerSamples.java new file mode 100644 index 000000000000..bcd88a0db711 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateLinkResourcesListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResources ListByServer. */ +public final class PrivateLinkResourcesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PrivateLinkResourcesList.json + */ + /** + * Sample code: Gets private link resources for MariaDB. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsPrivateLinkResourcesForMariaDB(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.privateLinkResources().listByServer("Default", "test-svr", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/QueryTextsGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/QueryTextsGetSamples.java new file mode 100644 index 000000000000..45ca534b22f7 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/QueryTextsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for QueryTexts Get. */ +public final class QueryTextsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryTextsGet.json + */ + /** + * Sample code: QueryTextsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void queryTextsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.queryTexts().getWithResponse("testResourceGroupName", "testServerName", "1", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/QueryTextsListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/QueryTextsListByServerSamples.java new file mode 100644 index 000000000000..cfd3b09f3829 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/QueryTextsListByServerSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import java.util.Arrays; + +/** Samples for QueryTexts ListByServer. */ +public final class QueryTextsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryTextsListByServer.json + */ + /** + * Sample code: QueryTextsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void queryTextsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .queryTexts() + .listByServer("testResourceGroupName", "testServerName", Arrays.asList("1", "2"), Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecommendedActionsGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecommendedActionsGetSamples.java new file mode 100644 index 000000000000..0c1f44479e82 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecommendedActionsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for RecommendedActions Get. */ +public final class RecommendedActionsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionsGet.json + */ + /** + * Sample code: RecommendedActionsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .recommendedActions() + .getWithResponse("testResourceGroupName", "testServerName", "Index", "Index-1", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecommendedActionsListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecommendedActionsListByServerSamples.java new file mode 100644 index 000000000000..4944f7dfbe65 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecommendedActionsListByServerSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for RecommendedActions ListByServer. */ +public final class RecommendedActionsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionsListByServer.json + */ + /** + * Sample code: RecommendedActionsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .recommendedActions() + .listByServer("testResourceGroupName", "testServerName", "Index", null, Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecoverableServersGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecoverableServersGetSamples.java new file mode 100644 index 000000000000..8ada38f27d9d --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecoverableServersGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for RecoverableServers Get. */ +public final class RecoverableServersGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecoverableServersGet.json + */ + /** + * Sample code: ReplicasListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void replicasListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.recoverableServers().getWithResponse("testrg", "testsvc4", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ReplicasListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ReplicasListByServerSamples.java new file mode 100644 index 000000000000..1307f949a70c --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ReplicasListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Replicas ListByServer. */ +public final class ReplicasListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ReplicasListByServer.json + */ + /** + * Sample code: ReplicasListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void replicasListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.replicas().listByServer("TestGroup", "testmaster", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ResourceProviderCreateRecommendedActionSessionSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ResourceProviderCreateRecommendedActionSessionSamples.java new file mode 100644 index 000000000000..cbe1a3b07b0d --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ResourceProviderCreateRecommendedActionSessionSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceProvider CreateRecommendedActionSession. */ +public final class ResourceProviderCreateRecommendedActionSessionSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/RecommendedActionSessionCreate.json + */ + /** + * Sample code: RecommendedActionSessionCreate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void recommendedActionSessionCreate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .resourceProviders() + .createRecommendedActionSession( + "testResourceGroupName", "testServerName", "Index", "someDatabaseName", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ResourceProviderResetQueryPerformanceInsightDataSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ResourceProviderResetQueryPerformanceInsightDataSamples.java new file mode 100644 index 000000000000..bc34bc20ddab --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ResourceProviderResetQueryPerformanceInsightDataSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceProvider ResetQueryPerformanceInsightData. */ +public final class ResourceProviderResetQueryPerformanceInsightDataSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/QueryPerformanceInsightResetData.json + */ + /** + * Sample code: QueryPerformanceInsightResetData. + * + * @param manager Entry point to MariaDBManager. + */ + public static void queryPerformanceInsightResetData(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .resourceProviders() + .resetQueryPerformanceInsightDataWithResponse("testResourceGroupName", "testServerName", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerBasedPerformanceTierListSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerBasedPerformanceTierListSamples.java new file mode 100644 index 000000000000..a98a728f8815 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerBasedPerformanceTierListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for ServerBasedPerformanceTier List. */ +public final class ServerBasedPerformanceTierListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/PerformanceTiersListByServer.json + */ + /** + * Sample code: PerformanceTiersList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void performanceTiersList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.serverBasedPerformanceTiers().list("testrg", "mariadbtestsvc1", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerParametersListUpdateConfigurationsSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerParametersListUpdateConfigurationsSamples.java new file mode 100644 index 000000000000..c70b6bdec888 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerParametersListUpdateConfigurationsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.fluent.models.ConfigurationListResultInner; + +/** Samples for ServerParameters ListUpdateConfigurations. */ +public final class ServerParametersListUpdateConfigurationsSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ConfigurationsUpdateByServer.json + */ + /** + * Sample code: ConfigurationList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void configurationList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .serverParameters() + .listUpdateConfigurations("testrg", "mariadbtestsvc1", new ConfigurationListResultInner(), Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..767f12c6a652 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.SecurityAlertPolicyName; +import com.azure.resourcemanager.mariadb.models.ServerSecurityAlertPolicy; +import com.azure.resourcemanager.mariadb.models.ServerSecurityAlertPolicyState; +import java.util.Arrays; + +/** Samples for ServerSecurityAlertPolicies CreateOrUpdate. */ +public final class ServerSecurityAlertPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerSecurityAlertsCreateMin.json + */ + /** + * Sample code: Update a server's threat detection policy with minimal parameters. + * + * @param manager Entry point to MariaDBManager. + */ + public static void updateAServerSThreatDetectionPolicyWithMinimalParameters( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + ServerSecurityAlertPolicy resource = + manager + .serverSecurityAlertPolicies() + .getWithResponse( + "securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE) + .getValue(); + resource.update().withState(ServerSecurityAlertPolicyState.DISABLED).withEmailAccountAdmins(true).apply(); + } + + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerSecurityAlertsCreateMax.json + */ + /** + * Sample code: Update a server's threat detection policy with all parameters. + * + * @param manager Entry point to MariaDBManager. + */ + public static void updateAServerSThreatDetectionPolicyWithAllParameters( + com.azure.resourcemanager.mariadb.MariaDBManager manager) { + ServerSecurityAlertPolicy resource = + manager + .serverSecurityAlertPolicies() + .getWithResponse( + "securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE) + .getValue(); + resource + .update() + .withState(ServerSecurityAlertPolicyState.ENABLED) + .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly")) + .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com")) + .withEmailAccountAdmins(true) + .withStorageEndpoint("https://mystorage.blob.core.windows.net") + .withStorageAccountAccessKey( + "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") + .withRetentionDays(5) + .apply(); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesGetSamples.java new file mode 100644 index 000000000000..839e374998eb --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.SecurityAlertPolicyName; + +/** Samples for ServerSecurityAlertPolicies Get. */ +public final class ServerSecurityAlertPoliciesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerSecurityAlertsGet.json + */ + /** + * Sample code: Get a server's threat detection policy. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getAServerSThreatDetectionPolicy(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .serverSecurityAlertPolicies() + .getWithResponse("securityalert-4799", "securityalert-6440", SecurityAlertPolicyName.DEFAULT, Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesListByServerSamples.java new file mode 100644 index 000000000000..c184de63486c --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for ServerSecurityAlertPolicies ListByServer. */ +public final class ServerSecurityAlertPoliciesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerSecurityAlertsListByServer.json + */ + /** + * Sample code: List the server's threat detection policies. + * + * @param manager Entry point to MariaDBManager. + */ + public static void listTheServerSThreatDetectionPolicies(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.serverSecurityAlertPolicies().listByServer("securityalert-4799", "securityalert-6440", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersCreateSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersCreateSamples.java new file mode 100644 index 000000000000..62c13abcf336 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersCreateSamples.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.resourcemanager.mariadb.models.GeoRedundantBackup; +import com.azure.resourcemanager.mariadb.models.MinimalTlsVersionEnum; +import com.azure.resourcemanager.mariadb.models.ServerPropertiesForDefaultCreate; +import com.azure.resourcemanager.mariadb.models.ServerPropertiesForGeoRestore; +import com.azure.resourcemanager.mariadb.models.ServerPropertiesForReplica; +import com.azure.resourcemanager.mariadb.models.ServerPropertiesForRestore; +import com.azure.resourcemanager.mariadb.models.Sku; +import com.azure.resourcemanager.mariadb.models.SkuTier; +import com.azure.resourcemanager.mariadb.models.SslEnforcementEnum; +import com.azure.resourcemanager.mariadb.models.StorageProfile; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Servers Create. */ +public final class ServersCreateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateReplicaMode.json + */ + /** + * Sample code: Create a replica server. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createAReplicaServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .servers() + .define("targetserver") + .withRegion("westus") + .withExistingResourceGroup("TargetResourceGroup") + .withProperties( + new ServerPropertiesForReplica() + .withSourceServerId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver")) + .create(); + } + + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateGeoRestoreMode.json + */ + /** + * Sample code: Create a server as a geo restore. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createAServerAsAGeoRestore(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .servers() + .define("targetserver") + .withRegion("westus") + .withExistingResourceGroup("TargetResourceGroup") + .withProperties( + new ServerPropertiesForGeoRestore() + .withSourceServerId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver")) + .withTags(mapOf("ElasticServer", "1")) + .withSku( + new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5")) + .create(); + } + + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreate.json + */ + /** + * Sample code: Create a new server. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createANewServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .servers() + .define("mariadbtestsvc4") + .withRegion("westus") + .withExistingResourceGroup("testrg") + .withProperties( + new ServerPropertiesForDefaultCreate() + .withSslEnforcement(SslEnforcementEnum.ENABLED) + .withMinimalTlsVersion(MinimalTlsVersionEnum.TLS1_2) + .withStorageProfile( + new StorageProfile() + .withBackupRetentionDays(7) + .withGeoRedundantBackup(GeoRedundantBackup.ENABLED) + .withStorageMB(128000)) + .withAdministratorLogin("cloudsa") + .withAdministratorLoginPassword("")) + .withTags(mapOf("ElasticServer", "1")) + .withSku( + new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5")) + .create(); + } + + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreatePointInTimeRestore.json + */ + /** + * Sample code: Create a database as a point in time restore. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createADatabaseAsAPointInTimeRestore(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .servers() + .define("targetserver") + .withRegion("brazilsouth") + .withExistingResourceGroup("TargetResourceGroup") + .withProperties( + new ServerPropertiesForRestore() + .withSourceServerId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver") + .withRestorePointInTime(OffsetDateTime.parse("2017-12-14T00:00:37.467Z"))) + .withTags(mapOf("ElasticServer", "1")) + .withSku( + new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersDeleteSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersDeleteSamples.java new file mode 100644 index 000000000000..216bc8c5fc2c --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Servers Delete. */ +public final class ServersDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerDelete.json + */ + /** + * Sample code: ServerDelete. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverDelete(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().delete("TestGroup", "testserver", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersGetByResourceGroupSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersGetByResourceGroupSamples.java new file mode 100644 index 000000000000..8c8e9c78692b --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Servers GetByResourceGroup. */ +public final class ServersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerGet.json + */ + /** + * Sample code: ServerGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().getByResourceGroupWithResponse("testrg", "mariadbtestsvc4", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersListByResourceGroupSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersListByResourceGroupSamples.java new file mode 100644 index 000000000000..df25b95ebc2f --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Servers ListByResourceGroup. */ +public final class ServersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerListByResourceGroup.json + */ + /** + * Sample code: ServerListByResourceGroup. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverListByResourceGroup(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().listByResourceGroup("testrg", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersListSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersListSamples.java new file mode 100644 index 000000000000..90708b522fd8 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Servers List. */ +public final class ServersListSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerList.json + */ + /** + * Sample code: ServerList. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverList(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().list(Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersRestartSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersRestartSamples.java new file mode 100644 index 000000000000..e814a59eda7e --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersRestartSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Servers Restart. */ +public final class ServersRestartSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerRestart.json + */ + /** + * Sample code: ServerRestart. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverRestart(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().restart("TestGroup", "testserver", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersStartSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersStartSamples.java new file mode 100644 index 000000000000..b403fd349291 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersStartSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Servers Start. */ +public final class ServersStartSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2020-01-01/examples/ServerStart.json + */ + /** + * Sample code: ServerStart. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverStart(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().start("TestGroup", "testserver", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersStopSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersStopSamples.java new file mode 100644 index 000000000000..4d96cc208f0d --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersStopSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for Servers Stop. */ +public final class ServersStopSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2020-01-01/examples/ServerStop.json + */ + /** + * Sample code: ServerStop. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverStop(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.servers().stop("TestGroup", "testserver", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersUpdateSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersUpdateSamples.java new file mode 100644 index 000000000000..2282f5e77d12 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.Server; +import com.azure.resourcemanager.mariadb.models.SslEnforcementEnum; + +/** Samples for Servers Update. */ +public final class ServersUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerUpdate.json + */ + /** + * Sample code: ServerUpdate. + * + * @param manager Entry point to MariaDBManager. + */ + public static void serverUpdate(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + Server resource = + manager.servers().getByResourceGroupWithResponse("testrg", "mariadbtestsvc4", Context.NONE).getValue(); + resource + .update() + .withAdministratorLoginPassword("") + .withSslEnforcement(SslEnforcementEnum.DISABLED) + .apply(); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/TopQueryStatisticsGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/TopQueryStatisticsGetSamples.java new file mode 100644 index 000000000000..2e645b83a2f5 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/TopQueryStatisticsGetSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for TopQueryStatistics Get. */ +public final class TopQueryStatisticsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/TopQueryStatisticsGet.json + */ + /** + * Sample code: TopQueryStatisticsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void topQueryStatisticsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .topQueryStatistics() + .getWithResponse( + "testResourceGroupName", + "testServerName", + "66-636923268000000000-636923277000000000-avg-duration", + Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/TopQueryStatisticsListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/TopQueryStatisticsListByServerSamples.java new file mode 100644 index 000000000000..30c0332446b2 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/TopQueryStatisticsListByServerSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.TopQueryStatisticsInput; +import java.time.OffsetDateTime; + +/** Samples for TopQueryStatistics ListByServer. */ +public final class TopQueryStatisticsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/TopQueryStatisticsListByServer.json + */ + /** + * Sample code: TopQueryStatisticsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void topQueryStatisticsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .topQueryStatistics() + .listByServer( + "testResourceGroupName", + "testServerName", + new TopQueryStatisticsInput() + .withNumberOfTopQueries(5) + .withAggregationFunction("avg") + .withObservedMetric("duration") + .withObservationStartTime(OffsetDateTime.parse("2019-05-01T20:00:00.000Z")) + .withObservationEndTime(OffsetDateTime.parse("2019-05-07T20:00:00.000Z")) + .withAggregationWindow("PT15M"), + Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesCreateOrUpdateSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..9229779b3d63 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesCreateOrUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +/** Samples for VirtualNetworkRules CreateOrUpdate. */ +public final class VirtualNetworkRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/VirtualNetworkRulesCreateOrUpdate.json + */ + /** + * Sample code: Create or update a virtual network rule. + * + * @param manager Entry point to MariaDBManager. + */ + public static void createOrUpdateAVirtualNetworkRule(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .virtualNetworkRules() + .define("vnet-firewall-rule") + .withExistingServer("TestGroup", "vnet-test-svr") + .withVirtualNetworkSubnetId( + "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet") + .withIgnoreMissingVnetServiceEndpoint(false) + .create(); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesDeleteSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesDeleteSamples.java new file mode 100644 index 000000000000..a975540a6250 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules Delete. */ +public final class VirtualNetworkRulesDeleteSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/VirtualNetworkRulesDelete.json + */ + /** + * Sample code: Delete a virtual network rule. + * + * @param manager Entry point to MariaDBManager. + */ + public static void deleteAVirtualNetworkRule(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.virtualNetworkRules().delete("TestGroup", "vnet-test-svr", "vnet-firewall-rule", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesGetSamples.java new file mode 100644 index 000000000000..1959e99c52d3 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules Get. */ +public final class VirtualNetworkRulesGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/VirtualNetworkRulesGet.json + */ + /** + * Sample code: Gets a virtual network rule. + * + * @param manager Entry point to MariaDBManager. + */ + public static void getsAVirtualNetworkRule(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.virtualNetworkRules().getWithResponse("TestGroup", "vnet-test-svr", "vnet-firewall-rule", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesListByServerSamples.java new file mode 100644 index 000000000000..4365b81ea7fb --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesListByServerSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for VirtualNetworkRules ListByServer. */ +public final class VirtualNetworkRulesListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/VirtualNetworkRulesList.json + */ + /** + * Sample code: List virtual network rules. + * + * @param manager Entry point to MariaDBManager. + */ + public static void listVirtualNetworkRules(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager.virtualNetworkRules().listByServer("TestGroup", "vnet-test-svr", Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/WaitStatisticsGetSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/WaitStatisticsGetSamples.java new file mode 100644 index 000000000000..76ed1d40ffaa --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/WaitStatisticsGetSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; + +/** Samples for WaitStatistics Get. */ +public final class WaitStatisticsGetSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/WaitStatisticsGet.json + */ + /** + * Sample code: WaitStatisticsGet. + * + * @param manager Entry point to MariaDBManager. + */ + public static void waitStatisticsGet(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .waitStatistics() + .getWithResponse( + "testResourceGroupName", + "testServerName", + "636927606000000000-636927615000000000-send-wait/io/socket/sql/client_connection-2--0", + Context.NONE); + } +} diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/WaitStatisticsListByServerSamples.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/WaitStatisticsListByServerSamples.java new file mode 100644 index 000000000000..c95cff8a5729 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/WaitStatisticsListByServerSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.mariadb.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.mariadb.models.WaitStatisticsInput; +import java.time.OffsetDateTime; + +/** Samples for WaitStatistics ListByServer. */ +public final class WaitStatisticsListByServerSamples { + /* + * x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/WaitStatisticsListByServer.json + */ + /** + * Sample code: WaitStatisticsListByServer. + * + * @param manager Entry point to MariaDBManager. + */ + public static void waitStatisticsListByServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) { + manager + .waitStatistics() + .listByServer( + "testResourceGroupName", + "testServerName", + new WaitStatisticsInput() + .withObservationStartTime(OffsetDateTime.parse("2019-05-01T20:00:00.000Z")) + .withObservationEndTime(OffsetDateTime.parse("2019-05-07T20:00:00.000Z")) + .withAggregationWindow("PT15M"), + Context.NONE); + } +}