From 106b2548ce8af3512d4d1fbb028a488b27afea35 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 12 Jul 2022 05:23:24 +0000 Subject: [PATCH] CodeGen from PR 19716 in Azure/azure-rest-api-specs Merge b694193635220431592e54aea59137a812db4886 into 432872fac1d0f8edcae98a0e8504afc0ee302710 --- .../CHANGELOG.md | 3 +- .../azure-resourcemanager-mariadb/README.md | 5 +- .../azure-resourcemanager-mariadb/SAMPLE.md | 1581 +++++++++++++++++ .../azure-resourcemanager-mariadb/pom.xml | 98 +- .../mariadb/MariaDBManager.java | 225 ++- .../mariadb/fluent/AdvisorsClient.java | 6 +- .../fluent/CheckNameAvailabilitiesClient.java | 2 +- .../mariadb/fluent/ConfigurationsClient.java | 14 +- .../mariadb/fluent/DatabasesClient.java | 22 +- .../mariadb/fluent/FirewallRulesClient.java | 22 +- .../LocationBasedPerformanceTiersClient.java | 4 +- ...edActionSessionsOperationStatusClient.java | 2 +- ...ecommendedActionSessionsResultsClient.java | 4 +- .../mariadb/fluent/LogFilesClient.java | 4 +- .../mariadb/fluent/OperationsClient.java | 2 +- .../PrivateEndpointConnectionsClient.java | 30 +- .../fluent/PrivateLinkResourcesClient.java | 6 +- .../mariadb/fluent/QueryTextsClient.java | 6 +- .../fluent/RecommendedActionsClient.java | 6 +- .../fluent/RecoverableServersClient.java | 2 +- .../mariadb/fluent/ReplicasClient.java | 4 +- .../fluent/ResourceProvidersClient.java | 10 +- .../ServerBasedPerformanceTiersClient.java | 4 +- .../fluent/ServerParametersClient.java | 8 +- .../ServerSecurityAlertPoliciesClient.java | 14 +- .../mariadb/fluent/ServersClient.java | 58 +- .../fluent/TopQueryStatisticsClient.java | 6 +- .../fluent/VirtualNetworkRulesClient.java | 22 +- .../mariadb/fluent/WaitStatisticsClient.java | 6 +- .../mariadb/fluent/models/AdvisorInner.java | 4 - .../fluent/models/ConfigurationInner.java | 74 +- .../models/ConfigurationListResultInner.java | 4 - .../models/ConfigurationProperties.java | 132 ++ .../mariadb/fluent/models/DatabaseInner.java | 42 +- .../fluent/models/DatabaseProperties.java | 72 + .../fluent/models/FirewallRuleInner.java | 53 +- .../fluent/models/FirewallRuleProperties.java | 87 + .../mariadb/fluent/models/LogFileInner.java | 76 +- .../fluent/models/LogFileProperties.java | 118 ++ .../fluent/models/NameAvailabilityInner.java | 4 - .../models/OperationListResultInner.java | 4 - .../PerformanceTierPropertiesInner.java | 4 - .../PrivateEndpointConnectionInner.java | 54 +- .../PrivateEndpointConnectionProperties.java | 96 + .../models/PrivateLinkResourceInner.java | 4 - ...erformanceInsightResetDataResultInner.java | 4 - .../fluent/models/QueryStatisticInner.java | 146 +- .../models/QueryStatisticProperties.java | 282 +++ .../mariadb/fluent/models/QueryTextInner.java | 42 +- .../fluent/models/QueryTextProperties.java | 72 + .../models/RecommendationActionInner.java | 120 +- .../RecommendationActionProperties.java | 232 +++ ...dedActionSessionsOperationStatusInner.java | 5 - .../models/RecoverableServerProperties.java | 110 ++ .../RecoverableServerResourceInner.java | 68 +- .../models/SecurityAlertPolicyProperties.java | 223 +++ .../mariadb/fluent/models/ServerInner.java | 218 +-- .../fluent/models/ServerProperties.java | 368 ++++ .../ServerSecurityAlertPolicyInner.java | 111 +- .../ServerUpdateParametersProperties.java | 213 +++ .../TopQueryStatisticsInputProperties.java | 210 +++ .../models/VirtualNetworkRuleInner.java | 51 +- .../models/VirtualNetworkRuleProperties.java | 100 ++ .../fluent/models/WaitStatisticInner.java | 133 +- .../models/WaitStatisticProperties.java | 255 +++ .../models/WaitStatisticsInputProperties.java | 120 ++ .../implementation/AdvisorsClientImpl.java | 36 +- .../mariadb/implementation/AdvisorsImpl.java | 3 +- .../CheckNameAvailabilitiesClientImpl.java | 25 +- .../CheckNameAvailabilitiesImpl.java | 3 +- .../implementation/ConfigurationImpl.java | 4 + .../ConfigurationsClientImpl.java | 72 +- .../implementation/ConfigurationsImpl.java | 15 +- .../mariadb/implementation/DatabaseImpl.java | 4 + .../implementation/DatabasesClientImpl.java | 97 +- .../mariadb/implementation/DatabasesImpl.java | 27 +- .../implementation/FirewallRuleImpl.java | 4 + .../FirewallRulesClientImpl.java | 99 +- .../implementation/FirewallRulesImpl.java | 27 +- ...cationBasedPerformanceTiersClientImpl.java | 17 +- .../LocationBasedPerformanceTiersImpl.java | 3 +- ...tionSessionsOperationStatusClientImpl.java | 24 +- ...ndedActionSessionsOperationStatusImpl.java | 4 +- ...mendedActionSessionsResultsClientImpl.java | 23 +- ...dRecommendedActionSessionsResultsImpl.java | 5 +- .../implementation/LogFilesClientImpl.java | 17 +- .../mariadb/implementation/LogFilesImpl.java | 3 +- .../MariaDBManagementClientBuilder.java | 34 +- .../MariaDBManagementClientImpl.java | 13 +- .../implementation/OperationsClientImpl.java | 25 +- .../implementation/OperationsImpl.java | 3 +- .../PrivateEndpointConnectionImpl.java | 4 + .../PrivateEndpointConnectionsClientImpl.java | 119 +- .../PrivateEndpointConnectionsImpl.java | 27 +- .../PrivateLinkResourcesClientImpl.java | 42 +- .../PrivateLinkResourcesImpl.java | 3 +- .../implementation/QueryTextsClientImpl.java | 50 +- .../implementation/QueryTextsImpl.java | 3 +- .../RecommendedActionsClientImpl.java | 42 +- .../RecommendedActionsImpl.java | 3 +- .../RecoverableServersClientImpl.java | 23 +- .../RecoverableServersImpl.java | 3 +- .../implementation/ReplicasClientImpl.java | 17 +- .../mariadb/implementation/ReplicasImpl.java | 3 +- .../ResourceProvidersClientImpl.java | 49 +- .../implementation/ResourceProvidersImpl.java | 3 +- ...ServerBasedPerformanceTiersClientImpl.java | 17 +- .../ServerBasedPerformanceTiersImpl.java | 3 +- .../mariadb/implementation/ServerImpl.java | 28 + .../ServerParametersClientImpl.java | 31 +- .../implementation/ServerParametersImpl.java | 3 +- ...ServerSecurityAlertPoliciesClientImpl.java | 66 +- .../ServerSecurityAlertPoliciesImpl.java | 15 +- .../ServerSecurityAlertPolicyImpl.java | 4 + .../implementation/ServersClientImpl.java | 218 ++- .../mariadb/implementation/ServersImpl.java | 19 +- .../TopQueryStatisticsClientImpl.java | 36 +- .../TopQueryStatisticsImpl.java | 3 +- .../VirtualNetworkRuleImpl.java | 4 + .../VirtualNetworkRulesClientImpl.java | 101 +- .../VirtualNetworkRulesImpl.java | 27 +- .../WaitStatisticsClientImpl.java | 36 +- .../implementation/WaitStatisticsImpl.java | 3 +- .../mariadb/models/Advisors.java | 6 +- .../mariadb/models/AdvisorsResultList.java | 4 - .../models/CheckNameAvailabilities.java | 2 +- .../mariadb/models/Configuration.java | 7 + .../mariadb/models/Configurations.java | 10 +- .../mariadb/models/CreateMode.java | 6 +- .../mariadb/models/Database.java | 7 + .../mariadb/models/DatabaseListResult.java | 4 - .../mariadb/models/Databases.java | 10 +- .../mariadb/models/FirewallRule.java | 7 + .../models/FirewallRuleListResult.java | 4 - .../mariadb/models/FirewallRules.java | 10 +- .../mariadb/models/GeoRedundantBackup.java | 6 +- .../models/LocationBasedPerformanceTiers.java | 4 +- ...ommendedActionSessionsOperationStatus.java | 2 +- ...BasedRecommendedActionSessionsResults.java | 4 +- .../mariadb/models/LogFileListResult.java | 4 - .../mariadb/models/LogFiles.java | 4 +- .../mariadb/models/MinimalTlsVersionEnum.java | 6 +- .../models/NameAvailabilityRequest.java | 7 +- .../mariadb/models/Operation.java | 6 +- .../mariadb/models/OperationDisplay.java | 4 - .../mariadb/models/OperationOrigin.java | 6 +- .../mariadb/models/Operations.java | 2 +- .../models/PerformanceTierListResult.java | 4 - ...PerformanceTierServiceLevelObjectives.java | 4 - .../models/PrivateEndpointConnection.java | 7 + .../PrivateEndpointConnectionListResult.java | 4 - .../models/PrivateEndpointConnections.java | 10 +- .../models/PrivateEndpointProperty.java | 4 - .../PrivateEndpointProvisioningState.java | 6 +- .../models/PrivateLinkResourceListResult.java | 4 - .../models/PrivateLinkResourceProperties.java | 4 - .../mariadb/models/PrivateLinkResources.java | 6 +- ...kServiceConnectionStateActionsRequire.java | 6 +- ...ateLinkServiceConnectionStateProperty.java | 9 +- ...ivateLinkServiceConnectionStateStatus.java | 6 +- .../models/PublicNetworkAccessEnum.java | 6 +- ...erformanceInsightResetDataResultState.java | 6 +- .../mariadb/models/QueryTexts.java | 6 +- .../mariadb/models/QueryTextsResultList.java | 4 - .../RecommendationActionsResultList.java | 4 - .../mariadb/models/RecommendedActions.java | 6 +- .../mariadb/models/RecoverableServers.java | 2 +- .../mariadb/models/Replicas.java | 4 +- .../mariadb/models/ResourceProviders.java | 2 +- .../models/SecurityAlertPolicyName.java | 6 +- .../mariadb/models/Server.java | 61 + .../models/ServerBasedPerformanceTiers.java | 4 +- .../mariadb/models/ServerForCreate.java | 11 +- .../mariadb/models/ServerListResult.java | 4 - .../ServerPrivateEndpointConnection.java | 4 - ...erPrivateEndpointConnectionProperties.java | 4 - ...ateLinkServiceConnectionStateProperty.java | 10 +- .../models/ServerPropertiesForCreate.java | 4 - .../ServerPropertiesForDefaultCreate.java | 9 +- .../models/ServerPropertiesForGeoRestore.java | 7 +- .../models/ServerPropertiesForReplica.java | 7 +- .../models/ServerPropertiesForRestore.java | 9 +- .../models/ServerSecurityAlertPolicies.java | 10 +- .../models/ServerSecurityAlertPolicy.java | 7 + .../ServerSecurityAlertPolicyListResult.java | 4 - .../mariadb/models/ServerState.java | 6 +- .../models/ServerUpdateParameters.java | 122 +- .../mariadb/models/ServerVersion.java | 6 +- .../mariadb/models/Servers.java | 14 +- .../resourcemanager/mariadb/models/Sku.java | 7 +- .../mariadb/models/SkuTier.java | 6 +- .../mariadb/models/StorageAutogrow.java | 6 +- .../mariadb/models/StorageProfile.java | 4 - .../mariadb/models/TagsObject.java | 6 +- .../mariadb/models/TopQueryStatistics.java | 6 +- .../models/TopQueryStatisticsInput.java | 125 +- .../models/TopQueryStatisticsResultList.java | 4 - .../mariadb/models/VirtualNetworkRule.java | 7 + .../models/VirtualNetworkRuleListResult.java | 4 - .../models/VirtualNetworkRuleState.java | 6 +- .../mariadb/models/VirtualNetworkRules.java | 10 +- .../mariadb/models/WaitStatistics.java | 6 +- .../mariadb/models/WaitStatisticsInput.java | 74 +- .../models/WaitStatisticsResultList.java | 4 - .../mariadb/generated/AdvisorsGetSamples.java | 22 + .../AdvisorsListByServerSamples.java | 22 + .../CheckNameAvailabilityExecuteSamples.java | 26 + .../ConfigurationsCreateOrUpdateSamples.java | 26 + .../generated/ConfigurationsGetSamples.java | 22 + .../ConfigurationsListByServerSamples.java | 22 + .../DatabasesCreateOrUpdateSamples.java | 26 + .../generated/DatabasesDeleteSamples.java | 22 + .../generated/DatabasesGetSamples.java | 22 + .../DatabasesListByServerSamples.java | 22 + .../FirewallRulesCreateOrUpdateSamples.java | 26 + .../generated/FirewallRulesDeleteSamples.java | 22 + .../generated/FirewallRulesGetSamples.java | 22 + .../FirewallRulesListByServerSamples.java | 22 + ...cationBasedPerformanceTierListSamples.java | 22 + ...tionSessionsOperationStatusGetSamples.java | 25 + ...mendedActionSessionsResultListSamples.java | 24 + .../LogFilesListByServerSamples.java | 22 + .../generated/OperationsListSamples.java | 22 + ...pointConnectionsCreateOrUpdateSamples.java | 31 + ...ivateEndpointConnectionsDeleteSamples.java | 25 + .../PrivateEndpointConnectionsGetSamples.java | 24 + ...ndpointConnectionsListByServerSamples.java | 23 + ...eEndpointConnectionsUpdateTagsSamples.java | 41 + .../PrivateLinkResourcesGetSamples.java | 22 + ...ivateLinkResourcesListByServerSamples.java | 22 + .../generated/QueryTextsGetSamples.java | 22 + .../QueryTextsListByServerSamples.java | 25 + .../RecommendedActionsGetSamples.java | 24 + ...RecommendedActionsListByServerSamples.java | 24 + .../RecoverableServersGetSamples.java | 22 + .../ReplicasListByServerSamples.java | 22 + ...CreateRecommendedActionSessionSamples.java | 25 + ...setQueryPerformanceInsightDataSamples.java | 24 + ...ServerBasedPerformanceTierListSamples.java | 22 + ...metersListUpdateConfigurationsSamples.java | 25 + ...ityAlertPoliciesCreateOrUpdateSamples.java | 62 + ...ServerSecurityAlertPoliciesGetSamples.java | 25 + ...urityAlertPoliciesListByServerSamples.java | 22 + .../generated/ServersCreateSamples.java | 134 ++ .../generated/ServersDeleteSamples.java | 22 + .../ServersGetByResourceGroupSamples.java | 22 + .../ServersListByResourceGroupSamples.java | 22 + .../mariadb/generated/ServersListSamples.java | 22 + .../generated/ServersRestartSamples.java | 22 + .../generated/ServersStartSamples.java | 22 + .../mariadb/generated/ServersStopSamples.java | 22 + .../generated/ServersUpdateSamples.java | 30 + .../TopQueryStatisticsGetSamples.java | 28 + ...TopQueryStatisticsListByServerSamples.java | 36 + ...tualNetworkRulesCreateOrUpdateSamples.java | 27 + .../VirtualNetworkRulesDeleteSamples.java | 22 + .../VirtualNetworkRulesGetSamples.java | 22 + ...irtualNetworkRulesListByServerSamples.java | 22 + .../generated/WaitStatisticsGetSamples.java | 28 + .../WaitStatisticsListByServerSamples.java | 33 + 260 files changed, 7840 insertions(+), 2176 deletions(-) create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/SAMPLE.md create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/SecurityAlertPolicyProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerUpdateParametersProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/TopQueryStatisticsInputProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticsInputProperties.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/AdvisorsGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/AdvisorsListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/CheckNameAvailabilityExecuteSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsCreateOrUpdateSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ConfigurationsListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesCreateOrUpdateSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesDeleteSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/DatabasesListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesCreateOrUpdateSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesDeleteSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/FirewallRulesListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedPerformanceTierListSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedRecommendedActionSessionsOperationStatusGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LocationBasedRecommendedActionSessionsResultListSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/LogFilesListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/OperationsListSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsDeleteSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateEndpointConnectionsUpdateTagsSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateLinkResourcesGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/PrivateLinkResourcesListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/QueryTextsGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/QueryTextsListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecommendedActionsGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecommendedActionsListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/RecoverableServersGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ReplicasListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ResourceProviderCreateRecommendedActionSessionSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ResourceProviderResetQueryPerformanceInsightDataSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerBasedPerformanceTierListSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerParametersListUpdateConfigurationsSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesCreateOrUpdateSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServerSecurityAlertPoliciesListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersCreateSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersDeleteSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersGetByResourceGroupSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersListByResourceGroupSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersListSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersRestartSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersStartSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersStopSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/ServersUpdateSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/TopQueryStatisticsGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/TopQueryStatisticsListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesCreateOrUpdateSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesDeleteSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/VirtualNetworkRulesListByServerSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/WaitStatisticsGetSamples.java create mode 100644 sdk/mariadb/azure-resourcemanager-mariadb/src/samples/java/com/azure/resourcemanager/mariadb/generated/WaitStatisticsListByServerSamples.java diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/CHANGELOG.md b/sdk/mariadb/azure-resourcemanager-mariadb/CHANGELOG.md index d5dba5ef1f37..8518430046d6 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-07-12) +- 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 6b3b9044db43..670c9db39d81 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.30.0 - - - com.azure - azure-core-management - 1.7.0 - - + + 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.30.0 + + + com.azure + azure-core-management + 1.7.0 + + 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..3bc41aed92c8 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,15 +8,18 @@ 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.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -75,6 +78,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 @@ -157,6 +161,19 @@ public static MariaDBManager authenticate(TokenCredential credential, AzureProfi return configure().authenticate(credential, profile); } + /** + * Creates an instance of MariaDB service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the MariaDB service API instance. + */ + public static MariaDBManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new MariaDBManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create MariaDBManager with optional configuration. * @@ -168,12 +185,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -212,6 +231,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. * @@ -223,6 +253,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -230,9 +273,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -268,20 +313,38 @@ 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); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .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 = @@ -293,7 +356,11 @@ public MariaDBManager authenticate(TokenCredential credential, AzureProfile prof } } - /** @return Resource collection API of Servers. */ + /** + * Gets the resource collection API of Servers. It manages Server. + * + * @return Resource collection API of Servers. + */ public Servers servers() { if (this.servers == null) { this.servers = new ServersImpl(clientObject.getServers(), this); @@ -301,7 +368,11 @@ public Servers servers() { return servers; } - /** @return Resource collection API of Replicas. */ + /** + * Gets the resource collection API of Replicas. + * + * @return Resource collection API of Replicas. + */ public Replicas replicas() { if (this.replicas == null) { this.replicas = new ReplicasImpl(clientObject.getReplicas(), this); @@ -309,7 +380,11 @@ public Replicas replicas() { return replicas; } - /** @return Resource collection API of FirewallRules. */ + /** + * Gets the resource collection API of FirewallRules. It manages FirewallRule. + * + * @return Resource collection API of FirewallRules. + */ public FirewallRules firewallRules() { if (this.firewallRules == null) { this.firewallRules = new FirewallRulesImpl(clientObject.getFirewallRules(), this); @@ -317,7 +392,11 @@ public FirewallRules firewallRules() { return firewallRules; } - /** @return Resource collection API of VirtualNetworkRules. */ + /** + * Gets the resource collection API of VirtualNetworkRules. It manages VirtualNetworkRule. + * + * @return Resource collection API of VirtualNetworkRules. + */ public VirtualNetworkRules virtualNetworkRules() { if (this.virtualNetworkRules == null) { this.virtualNetworkRules = new VirtualNetworkRulesImpl(clientObject.getVirtualNetworkRules(), this); @@ -325,7 +404,11 @@ public VirtualNetworkRules virtualNetworkRules() { return virtualNetworkRules; } - /** @return Resource collection API of Databases. */ + /** + * Gets the resource collection API of Databases. It manages Database. + * + * @return Resource collection API of Databases. + */ public Databases databases() { if (this.databases == null) { this.databases = new DatabasesImpl(clientObject.getDatabases(), this); @@ -333,7 +416,11 @@ public Databases databases() { return databases; } - /** @return Resource collection API of Configurations. */ + /** + * Gets the resource collection API of Configurations. It manages Configuration. + * + * @return Resource collection API of Configurations. + */ public Configurations configurations() { if (this.configurations == null) { this.configurations = new ConfigurationsImpl(clientObject.getConfigurations(), this); @@ -341,7 +428,11 @@ public Configurations configurations() { return configurations; } - /** @return Resource collection API of ServerParameters. */ + /** + * Gets the resource collection API of ServerParameters. + * + * @return Resource collection API of ServerParameters. + */ public ServerParameters serverParameters() { if (this.serverParameters == null) { this.serverParameters = new ServerParametersImpl(clientObject.getServerParameters(), this); @@ -349,7 +440,11 @@ public ServerParameters serverParameters() { return serverParameters; } - /** @return Resource collection API of LogFiles. */ + /** + * Gets the resource collection API of LogFiles. + * + * @return Resource collection API of LogFiles. + */ public LogFiles logFiles() { if (this.logFiles == null) { this.logFiles = new LogFilesImpl(clientObject.getLogFiles(), this); @@ -357,7 +452,11 @@ public LogFiles logFiles() { return logFiles; } - /** @return Resource collection API of RecoverableServers. */ + /** + * Gets the resource collection API of RecoverableServers. + * + * @return Resource collection API of RecoverableServers. + */ public RecoverableServers recoverableServers() { if (this.recoverableServers == null) { this.recoverableServers = new RecoverableServersImpl(clientObject.getRecoverableServers(), this); @@ -365,7 +464,11 @@ public RecoverableServers recoverableServers() { return recoverableServers; } - /** @return Resource collection API of ServerBasedPerformanceTiers. */ + /** + * Gets the resource collection API of ServerBasedPerformanceTiers. + * + * @return Resource collection API of ServerBasedPerformanceTiers. + */ public ServerBasedPerformanceTiers serverBasedPerformanceTiers() { if (this.serverBasedPerformanceTiers == null) { this.serverBasedPerformanceTiers = @@ -374,7 +477,11 @@ public ServerBasedPerformanceTiers serverBasedPerformanceTiers() { return serverBasedPerformanceTiers; } - /** @return Resource collection API of LocationBasedPerformanceTiers. */ + /** + * Gets the resource collection API of LocationBasedPerformanceTiers. + * + * @return Resource collection API of LocationBasedPerformanceTiers. + */ public LocationBasedPerformanceTiers locationBasedPerformanceTiers() { if (this.locationBasedPerformanceTiers == null) { this.locationBasedPerformanceTiers = @@ -383,7 +490,11 @@ public LocationBasedPerformanceTiers locationBasedPerformanceTiers() { return locationBasedPerformanceTiers; } - /** @return Resource collection API of CheckNameAvailabilities. */ + /** + * Gets the resource collection API of CheckNameAvailabilities. + * + * @return Resource collection API of CheckNameAvailabilities. + */ public CheckNameAvailabilities checkNameAvailabilities() { if (this.checkNameAvailabilities == null) { this.checkNameAvailabilities = @@ -392,7 +503,11 @@ public CheckNameAvailabilities checkNameAvailabilities() { return checkNameAvailabilities; } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -400,7 +515,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of QueryTexts. */ + /** + * Gets the resource collection API of QueryTexts. + * + * @return Resource collection API of QueryTexts. + */ public QueryTexts queryTexts() { if (this.queryTexts == null) { this.queryTexts = new QueryTextsImpl(clientObject.getQueryTexts(), this); @@ -408,7 +527,11 @@ public QueryTexts queryTexts() { return queryTexts; } - /** @return Resource collection API of TopQueryStatistics. */ + /** + * Gets the resource collection API of TopQueryStatistics. + * + * @return Resource collection API of TopQueryStatistics. + */ public TopQueryStatistics topQueryStatistics() { if (this.topQueryStatistics == null) { this.topQueryStatistics = new TopQueryStatisticsImpl(clientObject.getTopQueryStatistics(), this); @@ -416,7 +539,11 @@ public TopQueryStatistics topQueryStatistics() { return topQueryStatistics; } - /** @return Resource collection API of WaitStatistics. */ + /** + * Gets the resource collection API of WaitStatistics. + * + * @return Resource collection API of WaitStatistics. + */ public WaitStatistics waitStatistics() { if (this.waitStatistics == null) { this.waitStatistics = new WaitStatisticsImpl(clientObject.getWaitStatistics(), this); @@ -424,7 +551,11 @@ public WaitStatistics waitStatistics() { return waitStatistics; } - /** @return Resource collection API of ResourceProviders. */ + /** + * Gets the resource collection API of ResourceProviders. + * + * @return Resource collection API of ResourceProviders. + */ public ResourceProviders resourceProviders() { if (this.resourceProviders == null) { this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); @@ -432,7 +563,11 @@ public ResourceProviders resourceProviders() { return resourceProviders; } - /** @return Resource collection API of Advisors. */ + /** + * Gets the resource collection API of Advisors. + * + * @return Resource collection API of Advisors. + */ public Advisors advisors() { if (this.advisors == null) { this.advisors = new AdvisorsImpl(clientObject.getAdvisors(), this); @@ -440,7 +575,11 @@ public Advisors advisors() { return advisors; } - /** @return Resource collection API of RecommendedActions. */ + /** + * Gets the resource collection API of RecommendedActions. + * + * @return Resource collection API of RecommendedActions. + */ public RecommendedActions recommendedActions() { if (this.recommendedActions == null) { this.recommendedActions = new RecommendedActionsImpl(clientObject.getRecommendedActions(), this); @@ -448,7 +587,11 @@ public RecommendedActions recommendedActions() { return recommendedActions; } - /** @return Resource collection API of LocationBasedRecommendedActionSessionsOperationStatus. */ + /** + * Gets the resource collection API of LocationBasedRecommendedActionSessionsOperationStatus. + * + * @return Resource collection API of LocationBasedRecommendedActionSessionsOperationStatus. + */ public LocationBasedRecommendedActionSessionsOperationStatus locationBasedRecommendedActionSessionsOperationStatus() { if (this.locationBasedRecommendedActionSessionsOperationStatus == null) { @@ -459,7 +602,11 @@ public RecommendedActions recommendedActions() { return locationBasedRecommendedActionSessionsOperationStatus; } - /** @return Resource collection API of LocationBasedRecommendedActionSessionsResults. */ + /** + * Gets the resource collection API of LocationBasedRecommendedActionSessionsResults. + * + * @return Resource collection API of LocationBasedRecommendedActionSessionsResults. + */ public LocationBasedRecommendedActionSessionsResults locationBasedRecommendedActionSessionsResults() { if (this.locationBasedRecommendedActionSessionsResults == null) { this.locationBasedRecommendedActionSessionsResults = @@ -469,7 +616,11 @@ public LocationBasedRecommendedActionSessionsResults locationBasedRecommendedAct return locationBasedRecommendedActionSessionsResults; } - /** @return Resource collection API of PrivateEndpointConnections. */ + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * + * @return Resource collection API of PrivateEndpointConnections. + */ public PrivateEndpointConnections privateEndpointConnections() { if (this.privateEndpointConnections == null) { this.privateEndpointConnections = @@ -478,7 +629,11 @@ public PrivateEndpointConnections privateEndpointConnections() { return privateEndpointConnections; } - /** @return Resource collection API of PrivateLinkResources. */ + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ public PrivateLinkResources privateLinkResources() { if (this.privateLinkResources == null) { this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); @@ -486,7 +641,11 @@ public PrivateLinkResources privateLinkResources() { return privateLinkResources; } - /** @return Resource collection API of ServerSecurityAlertPolicies. */ + /** + * Gets the resource collection API of ServerSecurityAlertPolicies. It manages ServerSecurityAlertPolicy. + * + * @return Resource collection API of ServerSecurityAlertPolicies. + */ public ServerSecurityAlertPolicies serverSecurityAlertPolicies() { if (this.serverSecurityAlertPolicies == null) { this.serverSecurityAlertPolicies = 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..8580aac5161f 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( @@ -51,7 +51,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 list of query statistics. + * @return a list of query statistics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -65,7 +65,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 list of query statistics. + * @return a list of query statistics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); 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..6d179a329cd8 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 @@ -25,9 +25,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 the {@link SyncPoller} for polling of represents a Configuration. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String configurationName, ConfigurationInner parameters); @@ -42,9 +42,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 the {@link SyncPoller} for polling of represents a Configuration. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -113,7 +113,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( @@ -127,7 +127,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 list of server configurations. + * @return a list of server configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -141,7 +141,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 list of server configurations. + * @return a list of server configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); 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..d2aab8f6b610 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 @@ -25,9 +25,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 the {@link SyncPoller} for polling of represents a Database. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String databaseName, DatabaseInner parameters); @@ -42,9 +42,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 the {@link SyncPoller} for polling of represents a Database. */ - @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 +90,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, String databaseName); /** @@ -105,9 +105,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String databaseName, Context context); @@ -162,7 +162,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( @@ -176,7 +176,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 List of databases. + * @return a List of databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -190,7 +190,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 List of databases. + * @return a List of databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); 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..8e93078664f4 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 @@ -25,9 +25,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 the {@link SyncPoller} for polling of represents a server firewall rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String firewallRuleName, FirewallRuleInner parameters); @@ -42,9 +42,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 the {@link SyncPoller} for polling of represents a server firewall rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, FirewallRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -98,9 +98,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String firewallRuleName); @@ -114,9 +114,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String firewallRuleName, Context context); @@ -171,7 +171,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( @@ -185,7 +185,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 list of firewall rules. + * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -199,7 +199,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 list of firewall rules. + * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedPerformanceTiersClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedPerformanceTiersClient.java index 825a53701966..5605b0380916 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedPerformanceTiersClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedPerformanceTiersClient.java @@ -19,7 +19,7 @@ public interface LocationBasedPerformanceTiersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String locationName); @@ -32,7 +32,7 @@ public interface LocationBasedPerformanceTiersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String locationName, Context context); 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/LocationBasedRecommendedActionSessionsResultsClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedRecommendedActionSessionsResultsClient.java index 5ea2d2774633..311d9974937c 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedRecommendedActionSessionsResultsClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LocationBasedRecommendedActionSessionsResultsClient.java @@ -23,7 +23,7 @@ public interface LocationBasedRecommendedActionSessionsResultsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String locationName, String operationId); @@ -37,7 +37,7 @@ public interface LocationBasedRecommendedActionSessionsResultsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String locationName, String operationId, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LogFilesClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LogFilesClient.java index 367dfb6185b4..11af774488aa 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LogFilesClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/LogFilesClient.java @@ -20,7 +20,7 @@ public interface LogFilesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -34,7 +34,7 @@ public interface LogFilesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); 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..aa92680711fd 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 @@ -41,7 +41,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 +57,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 the {@link SyncPoller} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -77,9 +77,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 the {@link SyncPoller} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -136,9 +136,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String privateEndpointConnectionName); @@ -152,9 +152,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context); @@ -195,9 +195,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 the {@link SyncPoller} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags( String resourceGroupName, String serverName, String privateEndpointConnectionName, TagsObject parameters); @@ -212,9 +212,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 the {@link SyncPoller} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags( String resourceGroupName, String serverName, @@ -267,7 +267,7 @@ PrivateEndpointConnectionInner updateTags( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -281,7 +281,7 @@ PrivateEndpointConnectionInner updateTags( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( 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..088ef4dd5ec5 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 @@ -21,7 +21,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 the private link resources for MariaDB server. + * @return the private link resources for MariaDB server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -35,7 +35,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 the private link resources for MariaDB server. + * @return the private link resources for MariaDB server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); @@ -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..46077acaefa6 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( @@ -53,7 +53,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 list of query texts. + * @return a list of query texts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, List queryIds); @@ -68,7 +68,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 list of query texts. + * @return a list of query texts as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( 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..1e7be8878f56 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( @@ -55,7 +55,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 list of recommendation actions. + * @return a list of recommendation actions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( @@ -72,7 +72,7 @@ PagedIterable listByServer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( 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/ReplicasClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ReplicasClient.java index e1a4f828bffd..6b8803358cea 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ReplicasClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ReplicasClient.java @@ -20,7 +20,7 @@ public interface ReplicasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -34,7 +34,7 @@ public interface ReplicasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, Context context); 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..0dcda632c94c 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 @@ -37,7 +37,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 +53,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginCreateRecommendedActionSession( String resourceGroupName, String serverName, String advisorName, String databaseName); @@ -70,9 +70,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 SyncPoller} for polling of long-running operation. */ - @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/ServerBasedPerformanceTiersClient.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerBasedPerformanceTiersClient.java index 28a938066b90..69fe48b87787 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerBasedPerformanceTiersClient.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/ServerBasedPerformanceTiersClient.java @@ -20,7 +20,7 @@ public interface ServerBasedPerformanceTiersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String serverName); @@ -34,7 +34,7 @@ public interface ServerBasedPerformanceTiersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String serverName, 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..6f4e234a9096 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 @@ -22,9 +22,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 the {@link SyncPoller} for polling of a list of server configurations. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations( String resourceGroupName, String serverName, ConfigurationListResultInner value); @@ -38,9 +38,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 the {@link SyncPoller} for polling of a list of server configurations. */ - @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..86d77a8f72be 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 @@ -41,7 +41,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 +57,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 the {@link SyncPoller} for polling of a server security alert policy. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -77,9 +77,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 the {@link SyncPoller} for polling of a server security alert policy. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -135,7 +135,7 @@ ServerSecurityAlertPolicyInner 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 server's threat detection policies. + * @return the server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -149,7 +149,7 @@ ServerSecurityAlertPolicyInner 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 server's threat detection policies. + * @return the server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( 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..5494b3a7a35a 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 @@ -26,9 +26,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 the {@link SyncPoller} for polling of represents a server. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginCreate( String resourceGroupName, String serverName, ServerForCreate parameters); @@ -42,9 +42,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 the {@link SyncPoller} for polling of represents a server. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginCreate( String resourceGroupName, String serverName, ServerForCreate parameters, Context context); @@ -87,9 +87,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 the {@link SyncPoller} for polling of represents a server. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate( String resourceGroupName, String serverName, ServerUpdateParameters parameters); @@ -104,9 +104,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 the {@link SyncPoller} for polling of represents a server. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerInner> beginUpdate( String resourceGroupName, String serverName, ServerUpdateParameters parameters, Context context); @@ -149,9 +149,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String serverName); /** @@ -163,9 +163,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String serverName, Context context); /** @@ -215,7 +215,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); @@ -227,7 +227,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 a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -240,7 +240,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 a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -250,7 +250,7 @@ SyncPoller, ServerInner> beginUpdate( * * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -262,7 +262,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 a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -275,9 +275,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String serverName); /** @@ -289,9 +289,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginRestart(String resourceGroupName, String serverName, Context context); /** @@ -327,9 +327,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String serverName); /** @@ -341,9 +341,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStart(String resourceGroupName, String serverName, Context context); /** @@ -379,9 +379,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginStop(String resourceGroupName, String serverName); /** @@ -393,9 +393,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 SyncPoller} for polling of long-running operation. */ - @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..c8452f08a5c0 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( @@ -53,7 +53,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 list of query statistics. + * @return a list of query statistics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( @@ -69,7 +69,7 @@ PagedIterable listByServer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( 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..d5601ac7432a 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 @@ -39,7 +39,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 +55,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 the {@link SyncPoller} for polling of a virtual network rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters); @@ -72,9 +72,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 the {@link SyncPoller} for polling of a virtual network rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -128,9 +128,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String virtualNetworkRuleName); @@ -144,9 +144,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 SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context); @@ -185,7 +185,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 a list of virtual network rules in a server. + * @return a list of virtual network rules in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName); @@ -199,7 +199,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 a list of virtual network rules in a server. + * @return a list of virtual network rules in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer(String resourceGroupName, String serverName, 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..c965fed6f7f3 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( @@ -53,7 +53,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 list of wait statistics. + * @return a list of wait statistics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( @@ -69,7 +69,7 @@ PagedIterable listByServer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByServer( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/AdvisorInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/AdvisorInner.java index 0d2fcda31f4b..4579c9136a92 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/AdvisorInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/AdvisorInner.java @@ -6,15 +6,11 @@ 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; /** Represents a recommendation action advisor. */ @Fluent public final class AdvisorInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdvisorInner.class); - /* * The properties of a recommendation action advisor. */ 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..7d282d05e129 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,26 @@ 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 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationInner.class); - +public final class ConfigurationInner extends ProxyResource { /* - * 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 +32,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 +42,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 +55,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 +64,7 @@ public String description() { * @return the defaultValue value. */ public String defaultValue() { - return this.defaultValue; + return this.innerProperties() == null ? null : this.innerProperties().defaultValue(); } /** @@ -97,7 +73,7 @@ public String defaultValue() { * @return the dataType value. */ public String dataType() { - return this.dataType; + return this.innerProperties() == null ? null : this.innerProperties().dataType(); } /** @@ -106,7 +82,7 @@ public String dataType() { * @return the allowedValues value. */ public String allowedValues() { - return this.allowedValues; + return this.innerProperties() == null ? null : this.innerProperties().allowedValues(); } /** @@ -115,7 +91,7 @@ public String allowedValues() { * @return the source value. */ public String source() { - return this.source; + return this.innerProperties() == null ? null : this.innerProperties().source(); } /** @@ -125,7 +101,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 +114,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/ConfigurationListResultInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationListResultInner.java index 44434a1ff53b..5885840c9d52 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationListResultInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationListResultInner.java @@ -5,16 +5,12 @@ 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.util.List; /** A list of server configurations. */ @Fluent public final class ConfigurationListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationListResultInner.class); - /* * The list of server configurations. */ 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..f1d874481192 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ConfigurationProperties.java @@ -0,0 +1,132 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of a configuration. */ +@Fluent +public final class ConfigurationProperties { + /* + * 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..fed66e6b6437 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,26 @@ 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 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class); - +public final class DatabaseInner extends ProxyResource { /* - * 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 +32,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 +42,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 +55,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 +65,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 +78,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..2ceb9a42bf7e --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/DatabaseProperties.java @@ -0,0 +1,72 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of a database. */ +@Fluent +public final class DatabaseProperties { + /* + * 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..b7da2bc9075e 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,27 @@ 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 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleInner.class); - +public final class FirewallRuleInner extends ProxyResource { /* - * 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 +33,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 +43,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 +56,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 +66,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 +79,15 @@ public FirewallRuleInner withEndIpAddress(String endIpAddress) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (startIpAddress() == null) { - throw logger + 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(); } } + + private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleInner.class); } 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..485952a40711 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/FirewallRuleProperties.java @@ -0,0 +1,87 @@ +// 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.JsonProperty; + +/** The properties of a server firewall rule. */ +@Fluent +public final class FirewallRuleProperties { + /* + * 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")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FirewallRuleProperties.class); +} 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..c4c3ce13d3b0 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,48 +5,27 @@ 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; import java.time.OffsetDateTime; /** Represents a log file. */ -@JsonFlatten @Fluent -public class LogFileInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogFileInner.class); - - /* - * Size of the log file. - */ - @JsonProperty(value = "properties.sizeInKB") - private Long sizeInKB; - - /* - * Creation timestamp of the log file. - */ - @JsonProperty(value = "properties.createdTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTime; - +public final class LogFileInner extends ProxyResource { /* - * Last modified timestamp of the log file. + * The properties of the log file. */ - @JsonProperty(value = "properties.lastModifiedTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastModifiedTime; + @JsonProperty(value = "properties") + private LogFileProperties innerProperties; - /* - * 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 +33,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 +43,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 +56,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 +65,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 +97,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 +106,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..e1e67877d925 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/LogFileProperties.java @@ -0,0 +1,118 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties of a log file. */ +@Fluent +public final class LogFileProperties { + /* + * 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/NameAvailabilityInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/NameAvailabilityInner.java index 3096e7c39705..fb23a99b17ba 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/NameAvailabilityInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/NameAvailabilityInner.java @@ -5,15 +5,11 @@ 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; /** Represents a resource name availability. */ @Fluent public final class NameAvailabilityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityInner.class); - /* * Error Message. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/OperationListResultInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/OperationListResultInner.java index 0b1b737342ea..7a2693c9992c 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/OperationListResultInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/OperationListResultInner.java @@ -5,17 +5,13 @@ 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.Operation; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of resource provider operations. */ @Fluent public final class OperationListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class); - /* * The list of resource provider operations. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PerformanceTierPropertiesInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PerformanceTierPropertiesInner.java index 8c399e47344c..5fa43dd0a600 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PerformanceTierPropertiesInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PerformanceTierPropertiesInner.java @@ -5,17 +5,13 @@ 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.PerformanceTierServiceLevelObjectives; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Performance tier properties. */ @Fluent public final class PerformanceTierPropertiesInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PerformanceTierPropertiesInner.class); - /* * ID of the performance tier. */ 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..492800d6f008 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,37 +5,28 @@ 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; import com.azure.resourcemanager.mariadb.models.PrivateLinkServiceConnectionStateProperty; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A private endpoint connection. */ -@JsonFlatten @Fluent -public class PrivateEndpointConnectionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); - - /* - * Private endpoint which the connection belongs to. - */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpointProperty privateEndpoint; - +public final class PrivateEndpointConnectionInner extends ProxyResource { /* - * Connection state of the private endpoint connection. + * Resource properties. */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState; + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; - /* - * 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 +34,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 +44,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 +57,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 +68,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 +81,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( * @return the provisioningState value. */ public String provisioningState() { - return this.provisioningState; + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } /** @@ -93,11 +90,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..2f9d7bbe219c --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,96 @@ +// 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.resourcemanager.mariadb.models.PrivateEndpointProperty; +import com.azure.resourcemanager.mariadb.models.PrivateLinkServiceConnectionStateProperty; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a private endpoint connection. */ +@Fluent +public final class PrivateEndpointConnectionProperties { + /* + * 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/PrivateLinkResourceInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateLinkResourceInner.java index c5ca68c7ec38..968711c51c7e 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/PrivateLinkResourceInner.java @@ -6,16 +6,12 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.models.PrivateLinkResourceProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A private link resource. */ @Immutable public final class PrivateLinkResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); - /* * The private link resource group id. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryPerformanceInsightResetDataResultInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryPerformanceInsightResetDataResultInner.java index 9c19716c3494..50fa33a9292e 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryPerformanceInsightResetDataResultInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryPerformanceInsightResetDataResultInner.java @@ -5,16 +5,12 @@ 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.QueryPerformanceInsightResetDataResultState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Result of Query Performance Insight data reset. */ @Fluent public final class QueryPerformanceInsightResetDataResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryPerformanceInsightResetDataResultInner.class); - /* * Indicates result of the operation. */ 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..c3881e312883 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,79 +5,28 @@ 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; import java.time.OffsetDateTime; import java.util.List; /** Represents a Query Statistic. */ -@JsonFlatten @Fluent -public class QueryStatisticInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryStatisticInner.class); - - /* - * Database query identifier. - */ - @JsonProperty(value = "properties.queryId") - private String queryId; - +public final class QueryStatisticInner extends ProxyResource { /* - * Observation start time. + * The properties of a query statistic. */ - @JsonProperty(value = "properties.startTime") - private OffsetDateTime startTime; + @JsonProperty(value = "properties") + private QueryStatisticProperties innerProperties; - /* - * 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 +34,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 +44,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 +57,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 +67,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 +80,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 +90,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 +103,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 +113,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 +126,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 +136,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 +149,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 +159,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 +172,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 +182,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 +195,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 +205,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 +218,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 +228,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 +241,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 +251,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 +264,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..ee299500a864 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryStatisticProperties.java @@ -0,0 +1,282 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The properties of a query statistic. */ +@Fluent +public final class QueryStatisticProperties { + /* + * 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..0a2545ab6b01 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,26 @@ 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 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryTextInner.class); - +public final class QueryTextInner extends ProxyResource { /* - * 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 +32,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 +42,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 +55,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 +65,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 +78,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..ebb35c066eb9 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/QueryTextProperties.java @@ -0,0 +1,72 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** The properties of a query text. */ +@Fluent +public final class QueryTextProperties { + /* + * 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..dada9c168324 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,67 +5,28 @@ 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; import java.time.OffsetDateTime; import java.util.Map; /** Represents a Recommendation Action. */ -@JsonFlatten @Fluent -public class RecommendationActionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationActionInner.class); - - /* - * Advisor name. - */ - @JsonProperty(value = "properties.advisorName") - private String advisorName; - - /* - * Recommendation action session identifier. - */ - @JsonProperty(value = "properties.sessionId") - private String sessionId; - - /* - * Recommendation action identifier. - */ - @JsonProperty(value = "properties.actionId") - private Integer actionId; - +public final class RecommendationActionInner extends ProxyResource { /* - * Recommendation action creation time. + * The properties of a recommendation action. */ - @JsonProperty(value = "properties.createdTime") - private OffsetDateTime createdTime; + @JsonProperty(value = "properties") + private RecommendationActionProperties innerProperties; - /* - * 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 +34,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 +44,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 +57,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 +67,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 +80,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 +90,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 +103,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 +113,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 +126,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 +136,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 +149,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 +159,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 +172,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 +182,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 +195,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 +205,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 +218,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..4cad977d78a1 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendationActionProperties.java @@ -0,0 +1,232 @@ +// 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.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 { + /* + * 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/RecommendedActionSessionsOperationStatusInner.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendedActionSessionsOperationStatusInner.java index 4b2b9ec737ae..03b4eafeefec 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendedActionSessionsOperationStatusInner.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecommendedActionSessionsOperationStatusInner.java @@ -5,17 +5,12 @@ 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; /** Recommendation action session operation status. */ @Fluent public final class RecommendedActionSessionsOperationStatusInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(RecommendedActionSessionsOperationStatusInner.class); - /* * Operation identifier. */ 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..3525029f183c --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/RecoverableServerProperties.java @@ -0,0 +1,110 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** The recoverable server's properties. */ +@Immutable +public final class RecoverableServerProperties { + /* + * 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..73d7cd159e83 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,27 @@ 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 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableServerResourceInner.class); - +@Fluent +public final class RecoverableServerResourceInner extends ProxyResource { /* - * 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 +32,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 +41,7 @@ public String lastAvailableBackupDateTime() { * @return the serviceLevelObjective value. */ public String serviceLevelObjective() { - return this.serviceLevelObjective; + return this.innerProperties() == null ? null : this.innerProperties().serviceLevelObjective(); } /** @@ -77,7 +50,7 @@ public String serviceLevelObjective() { * @return the edition value. */ public String edition() { - return this.edition; + return this.innerProperties() == null ? null : this.innerProperties().edition(); } /** @@ -86,7 +59,7 @@ public String edition() { * @return the vCore value. */ public Integer vCore() { - return this.vCore; + return this.innerProperties() == null ? null : this.innerProperties().vCore(); } /** @@ -95,7 +68,7 @@ public Integer vCore() { * @return the hardwareGeneration value. */ public String hardwareGeneration() { - return this.hardwareGeneration; + return this.innerProperties() == null ? null : this.innerProperties().hardwareGeneration(); } /** @@ -104,7 +77,7 @@ public String hardwareGeneration() { * @return the version value. */ public String version() { - return this.version; + return this.innerProperties() == null ? null : this.innerProperties().version(); } /** @@ -113,5 +86,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..3139de97fc13 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/SecurityAlertPolicyProperties.java @@ -0,0 +1,223 @@ +// 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.JsonProperty; +import java.util.List; + +/** Properties of a security alert policy. */ +@Fluent +public final class SecurityAlertPolicyProperties { + /* + * 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")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SecurityAlertPolicyProperties.class); +} 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..0eb8fffc66c1 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,9 +5,7 @@ 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; import com.azure.resourcemanager.mariadb.models.PublicNetworkAccessEnum; import com.azure.resourcemanager.mariadb.models.ServerPrivateEndpointConnection; @@ -16,18 +14,14 @@ import com.azure.resourcemanager.mariadb.models.Sku; 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; import java.util.Map; /** Represents a server. */ -@JsonFlatten @Fluent -public class ServerInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerInner.class); - +public final class ServerInner extends Resource { /* * The SKU (pricing tier) of the server. */ @@ -35,84 +29,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). - */ - @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. + * Properties 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 +54,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 +84,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 +95,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 +108,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 +118,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 +131,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 +141,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 +154,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 +164,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 +177,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 +187,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 +200,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 +210,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 +223,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 +233,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 +246,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 +256,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 +269,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 +279,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 +292,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 +302,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 +315,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 +325,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 +339,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 +350,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 +363,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 +375,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..dc75b5a72830 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerProperties.java @@ -0,0 +1,368 @@ +// 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.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.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The properties of a server. */ +@Fluent +public final class ServerProperties { + /* + * 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..161817450a88 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,65 +5,28 @@ 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; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A server security alert policy. */ -@JsonFlatten @Fluent -public 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. - */ - @JsonProperty(value = "properties.state") - private ServerSecurityAlertPolicyState state; - +public final class ServerSecurityAlertPolicyInner extends ProxyResource { /* - * Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly + * Resource properties. */ - @JsonProperty(value = "properties.disabledAlerts") - private List disabledAlerts; + @JsonProperty(value = "properties") + private SecurityAlertPolicyProperties innerProperties; - /* - * 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 +34,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 +44,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 +58,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 +69,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 +82,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 +92,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 +105,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 +115,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 +129,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 +140,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 +154,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 +165,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 +178,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 +188,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 +201,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..f65e42f64710 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/ServerUpdateParametersProperties.java @@ -0,0 +1,213 @@ +// 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.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.JsonProperty; + +/** The properties that can be updated for a server. */ +@Fluent +public final class ServerUpdateParametersProperties { + /* + * 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..6116a61f5e93 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/TopQueryStatisticsInputProperties.java @@ -0,0 +1,210 @@ +// 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.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties for input to get top query statistics. */ +@Fluent +public final class TopQueryStatisticsInputProperties { + /* + * 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")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TopQueryStatisticsInputProperties.class); +} 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..b05491290b3d 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,37 +5,27 @@ 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; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A virtual network rule. */ -@JsonFlatten @Fluent -public class VirtualNetworkRuleInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRuleInner.class); - - /* - * The ARM resource id of the virtual network subnet. - */ - @JsonProperty(value = "properties.virtualNetworkSubnetId") - private String virtualNetworkSubnetId; - +public final class VirtualNetworkRuleInner extends ProxyResource { /* - * Create firewall rule before the virtual network has vnet service - * endpoint enabled. + * Resource properties. */ - @JsonProperty(value = "properties.ignoreMissingVnetServiceEndpoint") - private Boolean ignoreMissingVnetServiceEndpoint; + @JsonProperty(value = "properties") + private VirtualNetworkRuleProperties innerProperties; - /* - * 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 +33,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 +43,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 +57,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 +68,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 +81,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 +90,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..bfe7fbd16c89 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/VirtualNetworkRuleProperties.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.VirtualNetworkRuleState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties of a virtual network rule. */ +@Fluent +public final class VirtualNetworkRuleProperties { + /* + * 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")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRuleProperties.class); +} 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..112f53320230 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,72 +5,27 @@ 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; import java.time.OffsetDateTime; /** Represents a Wait Statistic. */ -@JsonFlatten @Fluent -public class WaitStatisticInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticInner.class); - - /* - * Observation start time. - */ - @JsonProperty(value = "properties.startTime") - private OffsetDateTime startTime; - - /* - * 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; - +public final class WaitStatisticInner extends ProxyResource { /* - * Database query identifier. + * The properties of a wait statistic. */ - @JsonProperty(value = "properties.queryId") - private Long queryId; + @JsonProperty(value = "properties") + private WaitStatisticProperties innerProperties; - /* - * 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 +33,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 +43,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 +56,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 +66,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 +79,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 +89,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 +102,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 +112,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 +125,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 +135,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 +148,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 +158,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 +171,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 +181,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 +194,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 +204,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 +217,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 +227,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 +240,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..ce0b4da004ea --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticProperties.java @@ -0,0 +1,255 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties of a wait statistic. */ +@Fluent +public final class WaitStatisticProperties { + /* + * 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..89c595a473b2 --- /dev/null +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/fluent/models/WaitStatisticsInputProperties.java @@ -0,0 +1,120 @@ +// 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.JsonProperty; +import java.time.OffsetDateTime; + +/** The properties for input to get wait statistics. */ +@Fluent +public final class WaitStatisticsInputProperties { + /* + * 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")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WaitStatisticsInputProperties.class); +} 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..7b480bf78272 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.AdvisorsClient; import com.azure.resourcemanager.mariadb.fluent.models.AdvisorInner; import com.azure.resourcemanager.mariadb.models.AdvisorsResultList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in AdvisorsClient. */ public final class AdvisorsClientImpl implements AdvisorsClient { - private final ClientLogger logger = new ClientLogger(AdvisorsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AdvisorsService service; @@ -109,7 +106,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 +161,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,19 +212,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getWithResponseAsync(resourceGroupName, serverName, advisorName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -256,7 +246,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 +262,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 +320,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( @@ -385,7 +375,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -403,7 +393,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, 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 statistics. + * @return a list of query statistics as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { @@ -420,7 +410,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, 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 statistics. + * @return a list of query statistics as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -436,7 +426,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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { @@ -450,7 +440,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 +476,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/AdvisorsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/AdvisorsImpl.java index 9f6506d9fd9b..8952a9c8ade1 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/AdvisorsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/AdvisorsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.AdvisorInner; import com.azure.resourcemanager.mariadb.models.Advisor; import com.azure.resourcemanager.mariadb.models.Advisors; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AdvisorsImpl implements Advisors { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdvisorsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AdvisorsImpl.class); private final AdvisorsClient innerClient; 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..1b61316c79a5 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 @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.CheckNameAvailabilitiesClient; import com.azure.resourcemanager.mariadb.fluent.models.NameAvailabilityInner; import com.azure.resourcemanager.mariadb.models.NameAvailabilityRequest; @@ -30,8 +29,6 @@ /** An instance of this class provides access to all the operations defined in CheckNameAvailabilitiesClient. */ public final class CheckNameAvailabilitiesClientImpl implements CheckNameAvailabilitiesClient { - private final ClientLogger logger = new ClientLogger(CheckNameAvailabilitiesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CheckNameAvailabilitiesService service; @@ -58,7 +55,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 +74,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 +123,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,19 +168,11 @@ 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) { - return executeWithResponseAsync(nameAvailabilityRequest) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return executeWithResponseAsync(nameAvailabilityRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -206,7 +197,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/CheckNameAvailabilitiesImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/CheckNameAvailabilitiesImpl.java index 8cce2d67aacf..5f0faa81f3f2 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/CheckNameAvailabilitiesImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/CheckNameAvailabilitiesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.models.CheckNameAvailabilities; import com.azure.resourcemanager.mariadb.models.NameAvailability; import com.azure.resourcemanager.mariadb.models.NameAvailabilityRequest; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CheckNameAvailabilitiesImpl implements CheckNameAvailabilities { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilitiesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CheckNameAvailabilitiesImpl.class); private final CheckNameAvailabilitiesClient innerClient; diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationImpl.java index 56aca7c66858..6a83adb8d0a2 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationImpl.java @@ -49,6 +49,10 @@ public String source() { return this.innerModel().source(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ConfigurationInner innerModel() { return this.innerObject; } 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..a353e53bae82 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 @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.ConfigurationsClient; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in ConfigurationsClient. */ public final class ConfigurationsClientImpl implements ConfigurationsClient { - private final ClientLogger logger = new ClientLogger(ConfigurationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ConfigurationsService service; @@ -68,7 +65,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 +82,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 +98,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 +122,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 +185,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 +248,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 the {@link PollerFlux} for polling of represents a Configuration. */ - @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 +258,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 +276,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 the {@link PollerFlux} for polling of represents a Configuration. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, @@ -303,9 +304,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 the {@link SyncPoller} for polling of represents a Configuration. */ - @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 +323,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 the {@link SyncPoller} for polling of represents a Configuration. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -345,7 +346,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 +367,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 +431,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 +488,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,19 +541,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getWithResponseAsync(resourceGroupName, serverName, configurationName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -579,7 +575,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 +591,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 +646,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( @@ -699,7 +697,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 server configurations. + * @return a list of server configurations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -715,7 +713,7 @@ private PagedFlux listByServerAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations. + * @return a list of server configurations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -731,7 +729,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -747,7 +745,7 @@ public PagedIterable listByServer(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of server configurations. + * @return a list of server configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationsImpl.java index cc71702f7962..d8af72b52511 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ConfigurationsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.ConfigurationInner; import com.azure.resourcemanager.mariadb.models.Configuration; import com.azure.resourcemanager.mariadb.models.Configurations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ConfigurationsImpl implements Configurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ConfigurationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ConfigurationsImpl.class); private final ConfigurationsClient innerClient; @@ -66,7 +65,7 @@ public PagedIterable listByServer(String resourceGroupName, Strin public Configuration getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -74,14 +73,14 @@ public Configuration getById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String configurationName = Utils.getValueFromIdByName(id, "configurations"); if (configurationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -93,7 +92,7 @@ public Configuration getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -101,14 +100,14 @@ public Response getByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String configurationName = Utils.getValueFromIdByName(id, "configurations"); if (configurationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabaseImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabaseImpl.java index ad4b63c8659d..e709de67597d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabaseImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabaseImpl.java @@ -33,6 +33,10 @@ public String collation() { return this.innerModel().collation(); } + public String resourceGroupName() { + return resourceGroupName; + } + public DatabaseInner innerModel() { return this.innerObject; } 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..4d9bee2a9967 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.DatabasesClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in DatabasesClient. */ public final class DatabasesClientImpl implements DatabasesClient { - private final ClientLogger logger = new ClientLogger(DatabasesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DatabasesService service; @@ -69,7 +66,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 +83,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 +99,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 +115,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 +139,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 +201,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 +259,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 the {@link PollerFlux} for polling of represents a Database. */ - @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 +269,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 +287,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 the {@link PollerFlux} for polling of represents a Database. */ - @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 +311,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 the {@link SyncPoller} for polling of represents a Database. */ - @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 +330,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 the {@link SyncPoller} for polling of represents a Database. */ - @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 +349,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 +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 Database. + * @return represents a Database on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -425,7 +426,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 +481,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 +532,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 PollerFlux} for polling of long-running operation. */ - @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 +554,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, String databaseName, Context context) { context = this.client.mergeContext(context); @@ -574,9 +576,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 SyncPoller} for polling of long-running operation. */ - @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 +594,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 SyncPoller} for polling of long-running operation. */ - @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 +611,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 +630,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 +679,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 +734,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,19 +785,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getWithResponseAsync(resourceGroupName, serverName, databaseName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -824,7 +819,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 +835,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 +889,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( @@ -944,7 +939,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -960,7 +955,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases. + * @return a List of databases as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { @@ -975,7 +970,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a List of databases. + * @return a List of databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -991,7 +986,7 @@ public PagedIterable listByServer(String resourceGroupName, 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 a List of databases. + * @return a List of databases as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabasesImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabasesImpl.java index 37af4fa3dc09..3afce61375f9 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabasesImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/DatabasesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.DatabaseInner; import com.azure.resourcemanager.mariadb.models.Database; import com.azure.resourcemanager.mariadb.models.Databases; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DatabasesImpl implements Databases { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DatabasesImpl.class); private final DatabasesClient innerClient; @@ -72,7 +71,7 @@ public PagedIterable listByServer(String resourceGroupName, String ser public Database getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -80,14 +79,14 @@ public Database getById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); @@ -98,7 +97,7 @@ public Database getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -106,14 +105,14 @@ public Response getByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); @@ -124,7 +123,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -132,14 +131,14 @@ public void deleteById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); @@ -150,7 +149,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -158,14 +157,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRuleImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRuleImpl.java index 3a5eecad5991..4b301961bc3a 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRuleImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRuleImpl.java @@ -33,6 +33,10 @@ public String endIpAddress() { return this.innerModel().endIpAddress(); } + public String resourceGroupName() { + return resourceGroupName; + } + public FirewallRuleInner innerModel() { return this.innerObject; } 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..5eb7d9eb3293 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.FirewallRulesClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in FirewallRulesClient. */ public final class FirewallRulesClientImpl implements FirewallRulesClient { - private final ClientLogger logger = new ClientLogger(FirewallRulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final FirewallRulesService service; @@ -69,7 +66,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 +83,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 +99,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 +115,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 +139,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 +202,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 +265,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 the {@link PollerFlux} for polling of represents a server firewall rule. */ - @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 +275,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 +293,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 the {@link PollerFlux} for polling of represents a server firewall rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FirewallRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, @@ -320,9 +321,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 the {@link SyncPoller} for polling of represents a server firewall rule. */ - @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 +340,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 the {@link SyncPoller} for polling of represents a server firewall rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, FirewallRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -362,7 +363,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 +384,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 +448,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 +504,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 +556,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 PollerFlux} for polling of long-running operation. */ - @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 +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 PollerFlux} for polling of long-running operation. */ - @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 +601,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 SyncPoller} for polling of long-running operation. */ - @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 +619,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 SyncPoller} for polling of long-running operation. */ - @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 +636,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 +655,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 +705,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 +762,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,19 +815,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getWithResponseAsync(resourceGroupName, serverName, firewallRuleName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -852,7 +849,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 +865,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 +919,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( @@ -972,7 +969,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -988,7 +985,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of firewall rules. + * @return a list of firewall rules as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -1004,7 +1001,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -1020,7 +1017,7 @@ public PagedIterable listByServer(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 a list of firewall rules. + * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRulesImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRulesImpl.java index cfb4257596c1..d50cbaedca4e 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRulesImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/FirewallRulesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.FirewallRuleInner; import com.azure.resourcemanager.mariadb.models.FirewallRule; import com.azure.resourcemanager.mariadb.models.FirewallRules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class FirewallRulesImpl implements FirewallRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(FirewallRulesImpl.class); private final FirewallRulesClient innerClient; @@ -74,7 +73,7 @@ public PagedIterable listByServer(String resourceGroupName, String public FirewallRule getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -82,14 +81,14 @@ public FirewallRule getById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); @@ -100,7 +99,7 @@ public FirewallRule getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -108,14 +107,14 @@ public Response getByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); @@ -126,7 +125,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -134,14 +133,14 @@ public void deleteById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); @@ -152,7 +151,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -160,14 +159,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String firewallRuleName = Utils.getValueFromIdByName(id, "firewallRules"); if (firewallRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'firewallRules'.", id))); 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..37000f706248 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.LocationBasedPerformanceTiersClient; import com.azure.resourcemanager.mariadb.fluent.models.PerformanceTierPropertiesInner; import com.azure.resourcemanager.mariadb.models.PerformanceTierListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in LocationBasedPerformanceTiersClient. */ public final class LocationBasedPerformanceTiersClientImpl implements LocationBasedPerformanceTiersClient { - private final ClientLogger logger = new ClientLogger(LocationBasedPerformanceTiersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LocationBasedPerformanceTiersService service; @@ -65,7 +62,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 +82,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 +129,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( @@ -170,7 +167,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName) { @@ -185,7 +182,7 @@ private PagedFlux listAsync(String locationName) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, Context context) { @@ -199,7 +196,7 @@ private PagedFlux listAsync(String locationName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String locationName) { @@ -214,7 +211,7 @@ public PagedIterable list(String locationName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String locationName, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedPerformanceTiersImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedPerformanceTiersImpl.java index fdd356125ba6..46387795dab7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedPerformanceTiersImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedPerformanceTiersImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.PerformanceTierPropertiesInner; import com.azure.resourcemanager.mariadb.models.LocationBasedPerformanceTiers; import com.azure.resourcemanager.mariadb.models.PerformanceTierProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LocationBasedPerformanceTiersImpl implements LocationBasedPerformanceTiers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LocationBasedPerformanceTiersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LocationBasedPerformanceTiersImpl.class); private final LocationBasedPerformanceTiersClient innerClient; 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..62dd9eb34c1e 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 @@ -21,7 +21,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.LocationBasedRecommendedActionSessionsOperationStatusClient; import com.azure.resourcemanager.mariadb.fluent.models.RecommendedActionSessionsOperationStatusInner; import reactor.core.publisher.Mono; @@ -32,9 +31,6 @@ */ public final class LocationBasedRecommendedActionSessionsOperationStatusClientImpl implements LocationBasedRecommendedActionSessionsOperationStatusClient { - private final ClientLogger logger = - new ClientLogger(LocationBasedRecommendedActionSessionsOperationStatusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LocationBasedRecommendedActionSessionsOperationStatusService service; @@ -88,7 +84,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 +134,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,19 +180,11 @@ 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) { - return getWithResponseAsync(locationName, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(locationName, operationId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -221,7 +211,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/LocationBasedRecommendedActionSessionsOperationStatusImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsOperationStatusImpl.java index e5bae6a16bbb..f7cd4c09acab 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsOperationStatusImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsOperationStatusImpl.java @@ -12,12 +12,10 @@ import com.azure.resourcemanager.mariadb.fluent.models.RecommendedActionSessionsOperationStatusInner; import com.azure.resourcemanager.mariadb.models.LocationBasedRecommendedActionSessionsOperationStatus; import com.azure.resourcemanager.mariadb.models.RecommendedActionSessionsOperationStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LocationBasedRecommendedActionSessionsOperationStatusImpl implements LocationBasedRecommendedActionSessionsOperationStatus { - @JsonIgnore - private final ClientLogger logger = + private static final ClientLogger LOGGER = new ClientLogger(LocationBasedRecommendedActionSessionsOperationStatusImpl.class); private final LocationBasedRecommendedActionSessionsOperationStatusClient innerClient; 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..3f7edd258643 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.LocationBasedRecommendedActionSessionsResultsClient; import com.azure.resourcemanager.mariadb.fluent.models.RecommendationActionInner; import com.azure.resourcemanager.mariadb.models.RecommendationActionsResultList; @@ -37,8 +36,6 @@ */ public final class LocationBasedRecommendedActionSessionsResultsClientImpl implements LocationBasedRecommendedActionSessionsResultsClient { - private final ClientLogger logger = new ClientLogger(LocationBasedRecommendedActionSessionsResultsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LocationBasedRecommendedActionSessionsResultsService service; @@ -101,7 +98,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 +157,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( @@ -213,7 +212,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 recommendation actions. + * @return a list of recommendation actions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, String operationId) { @@ -230,7 +229,7 @@ private PagedFlux listAsync(String locationName, 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 recommendation actions. + * @return a list of recommendation actions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, String operationId, Context context) { @@ -247,7 +246,7 @@ private PagedFlux listAsync(String locationName, 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 recommendation actions. + * @return a list of recommendation actions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String locationName, String operationId) { @@ -263,7 +262,7 @@ 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String locationName, String operationId, Context context) { @@ -277,7 +276,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 +313,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/LocationBasedRecommendedActionSessionsResultsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsResultsImpl.java index aeab7d1ce89a..5128e75e491d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsResultsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LocationBasedRecommendedActionSessionsResultsImpl.java @@ -11,12 +11,11 @@ import com.azure.resourcemanager.mariadb.fluent.models.RecommendationActionInner; import com.azure.resourcemanager.mariadb.models.LocationBasedRecommendedActionSessionsResults; import com.azure.resourcemanager.mariadb.models.RecommendationAction; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LocationBasedRecommendedActionSessionsResultsImpl implements LocationBasedRecommendedActionSessionsResults { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(LocationBasedRecommendedActionSessionsResultsImpl.class); + private static final ClientLogger LOGGER = + new ClientLogger(LocationBasedRecommendedActionSessionsResultsImpl.class); private final LocationBasedRecommendedActionSessionsResultsClient innerClient; 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..a1a5c633d363 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.LogFilesClient; import com.azure.resourcemanager.mariadb.fluent.models.LogFileInner; import com.azure.resourcemanager.mariadb.models.LogFileListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in LogFilesClient. */ public final class LogFilesClientImpl implements LogFilesClient { - private final ClientLogger logger = new ClientLogger(LogFilesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final LogFilesService service; @@ -60,7 +57,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 +79,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 +132,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( @@ -185,7 +182,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 log files. + * @return a list of log files as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -201,7 +198,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, 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 log files. + * @return a list of log files as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { @@ -216,7 +213,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, 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 log files. + * @return a list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -232,7 +229,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 log files. + * @return a list of log files as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LogFilesImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LogFilesImpl.java index fcc7046bbcb9..80d7fc2e2191 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LogFilesImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/LogFilesImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.LogFileInner; import com.azure.resourcemanager.mariadb.models.LogFile; import com.azure.resourcemanager.mariadb.models.LogFiles; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class LogFilesImpl implements LogFiles { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogFilesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(LogFilesImpl.class); private final LogFilesClient innerClient; diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/MariaDBManagementClientBuilder.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/MariaDBManagementClientBuilder.java index 90e605f3aaf2..016a46955493 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/MariaDBManagementClientBuilder.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/MariaDBManagementClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public MariaDBManagementClientBuilder environment(AzureEnvironment environment) } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the MariaDBManagementClientBuilder. */ - public MariaDBManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public MariaDBManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the MariaDBManagementClientBuilder. */ - public MariaDBManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public MariaDBManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -126,15 +125,12 @@ public MariaDBManagementClientImpl buildClient() { if (environment == null) { this.environment = AzureEnvironment.AZURE; } + if (pipeline == null) { + this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + } if (defaultPollInterval == null) { this.defaultPollInterval = Duration.ofSeconds(30); } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/MariaDBManagementClientImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/MariaDBManagementClientImpl.java index 84726375bca1..805965704167 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/MariaDBManagementClientImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/MariaDBManagementClientImpl.java @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -52,15 +53,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the MariaDBManagementClientImpl type. */ @ServiceClient(builder = MariaDBManagementClientBuilder.class) public final class MariaDBManagementClientImpl implements MariaDBManagementClient { - private final ClientLogger logger = new ClientLogger(MariaDBManagementClientImpl.class); - /** The ID of the target subscription. */ private final String subscriptionId; @@ -477,10 +475,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -544,7 +539,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -603,4 +598,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(MariaDBManagementClientImpl.class); } 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..4fc62a9988a3 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 @@ -20,15 +20,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.OperationsClient; import com.azure.resourcemanager.mariadb.fluent.models.OperationListResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -54,7 +51,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 +66,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 +91,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,19 +113,11 @@ 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() { - return listWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -148,7 +139,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/OperationsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/OperationsImpl.java index b44107268898..0b9c129a8da1 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/OperationsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/OperationsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.OperationListResultInner; import com.azure.resourcemanager.mariadb.models.OperationListResult; import com.azure.resourcemanager.mariadb.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionImpl.java index 3a6abccde1e3..8c271a7c7bdc 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionImpl.java @@ -42,6 +42,10 @@ public String provisioningState() { return this.innerModel().provisioningState(); } + public String resourceGroupName() { + return resourceGroupName; + } + public PrivateEndpointConnectionInner innerModel() { return this.innerObject; } 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..ff88b85c33bf 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 @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.PrivateEndpointConnectionsClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateEndpointConnectionsService service; @@ -172,7 +169,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 +227,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,20 +281,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a private endpoint connection. + * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String serverName, String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -327,7 +317,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 +335,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 +403,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 +468,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 the {@link PollerFlux} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -496,7 +486,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -510,9 +500,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 the {@link PollerFlux} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -544,9 +534,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 the {@link SyncPoller} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -567,9 +557,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 the {@link SyncPoller} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -591,7 +581,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 +605,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 +674,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 +732,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 +786,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 PollerFlux} for polling of long-running operation. */ - @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 +809,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); @@ -840,9 +831,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 SyncPoller} for polling of long-running operation. */ - @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 +849,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 SyncPoller} for polling of long-running operation. */ - @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 +866,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 +885,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 +937,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 +1002,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 +1067,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 the {@link PollerFlux} for polling of a private endpoint connection. */ - @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 +1081,7 @@ private PollerFlux, PrivateEndpointCo this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1104,9 +1095,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 the {@link PollerFlux} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateTagsAsync( String resourceGroupName, String serverName, @@ -1137,9 +1128,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 the {@link SyncPoller} for polling of a private endpoint connection. */ - @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 +1148,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 the {@link SyncPoller} for polling of a private endpoint connection. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdateTags( String resourceGroupName, String serverName, @@ -1180,7 +1171,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 +1192,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 +1256,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 +1316,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( @@ -1379,7 +1372,7 @@ 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -1397,7 +1390,7 @@ private PagedFlux listByServerAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -1415,7 +1408,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -1431,7 +1424,7 @@ public PagedIterable listByServer(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 all private endpoint connections on a server. + * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -1446,7 +1439,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 +1476,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/PrivateEndpointConnectionsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionsImpl.java index 0bce6408aea0..03df7384de23 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateEndpointConnectionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.mariadb.models.PrivateEndpointConnection; import com.azure.resourcemanager.mariadb.models.PrivateEndpointConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); private final PrivateEndpointConnectionsClient innerClient; @@ -79,7 +78,7 @@ public PagedIterable listByServer( public PrivateEndpointConnection getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -87,14 +86,14 @@ public PrivateEndpointConnection getById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -110,7 +109,7 @@ public PrivateEndpointConnection getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -118,14 +117,14 @@ public Response getByIdWithResponse(String id, Contex } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -139,7 +138,7 @@ public Response getByIdWithResponse(String id, Contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -147,14 +146,14 @@ public void deleteById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -168,7 +167,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -176,14 +175,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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..4c593d43c99c 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.mariadb.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.mariadb.models.PrivateLinkResourceListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateLinkResourcesService service; @@ -110,7 +107,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 +167,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( @@ -224,7 +223,7 @@ 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -242,7 +241,7 @@ private PagedFlux listByServerAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -260,7 +259,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -276,7 +275,7 @@ public PagedIterable listByServer(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 private link resources for MariaDB server. + * @return the private link resources for MariaDB server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -293,7 +292,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 +348,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,19 +400,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getWithResponseAsync(resourceGroupName, serverName, groupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -440,7 +434,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 +449,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 +486,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/PrivateLinkResourcesImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateLinkResourcesImpl.java index 87b4e41a8330..e24e3fadb85c 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/PrivateLinkResourcesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.mariadb.models.PrivateLinkResource; import com.azure.resourcemanager.mariadb.models.PrivateLinkResources; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateLinkResourcesImpl implements PrivateLinkResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); private final PrivateLinkResourcesClient innerClient; 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..27da6e6ae8cb 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 @@ -25,19 +25,16 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.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.List; +import java.util.Objects; +import java.util.stream.Collectors; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in QueryTextsClient. */ public final class QueryTextsClientImpl implements QueryTextsClient { - private final ClientLogger logger = new ClientLogger(QueryTextsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final QueryTextsService service; @@ -90,7 +87,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 +111,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 +166,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,19 +217,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getWithResponseAsync(resourceGroupName, serverName, queryId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -261,7 +251,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 +268,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 +297,8 @@ private Mono> listByServerSinglePageAsync( } final String apiVersion = "2018-06-01"; final String accept = "application/json"; - String queryIdsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(queryIds, CollectionFormat.CSV); + List queryIdsConverted = + queryIds.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); return FluxUtil .withContext( context -> @@ -344,7 +334,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 +363,8 @@ private Mono> listByServerSinglePageAsync( } final String apiVersion = "2018-06-01"; final String accept = "application/json"; - String queryIdsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(queryIds, CollectionFormat.CSV); + List queryIdsConverted = + queryIds.stream().map(item -> Objects.toString(item, "")).collect(Collectors.toList()); context = this.client.mergeContext(context); return service .listByServer( @@ -406,7 +396,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -426,7 +416,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -445,7 +435,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -463,7 +453,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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -478,7 +468,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 +504,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/QueryTextsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/QueryTextsImpl.java index 9837f9ded4e9..e943d0bde5bf 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/QueryTextsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/QueryTextsImpl.java @@ -13,11 +13,10 @@ import com.azure.resourcemanager.mariadb.fluent.models.QueryTextInner; import com.azure.resourcemanager.mariadb.models.QueryText; import com.azure.resourcemanager.mariadb.models.QueryTexts; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; public final class QueryTextsImpl implements QueryTexts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryTextsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(QueryTextsImpl.class); private final QueryTextsClient innerClient; 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..b15825dde648 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.RecommendedActionsClient; import com.azure.resourcemanager.mariadb.fluent.models.RecommendationActionInner; import com.azure.resourcemanager.mariadb.models.RecommendationActionsResultList; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in RecommendedActionsClient. */ public final class RecommendedActionsClientImpl implements RecommendedActionsClient { - private final ClientLogger logger = new ClientLogger(RecommendedActionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final RecommendedActionsService service; @@ -114,7 +111,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 +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 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,20 +233,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a Recommendation Action. + * @return represents a Recommendation Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String serverName, String advisorName, String recommendedActionName) { return getWithResponseAsync(resourceGroupName, serverName, advisorName, recommendedActionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -281,7 +271,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 +293,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 +360,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( @@ -431,7 +423,7 @@ 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -450,7 +442,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -472,7 +464,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -491,7 +483,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -511,7 +503,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 recommendation actions. + * @return a list of recommendation actions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -526,7 +518,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 +555,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/RecommendedActionsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecommendedActionsImpl.java index 14f6588c96a9..1bfca4bfac48 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecommendedActionsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecommendedActionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.RecommendationActionInner; import com.azure.resourcemanager.mariadb.models.RecommendationAction; import com.azure.resourcemanager.mariadb.models.RecommendedActions; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class RecommendedActionsImpl implements RecommendedActions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendedActionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(RecommendedActionsImpl.class); private final RecommendedActionsClient innerClient; 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..e67720ae3b50 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 @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.RecoverableServersClient; import com.azure.resourcemanager.mariadb.fluent.models.RecoverableServerResourceInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in RecoverableServersClient. */ public final class RecoverableServersClientImpl implements RecoverableServersClient { - private final ClientLogger logger = new ClientLogger(RecoverableServersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final RecoverableServersService service; @@ -56,7 +53,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 +75,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 +125,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,19 +171,11 @@ 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) { - return getWithResponseAsync(resourceGroupName, serverName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(resourceGroupName, serverName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -213,7 +202,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/RecoverableServersImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecoverableServersImpl.java index a3213ceec6d0..902ae487ed57 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecoverableServersImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/RecoverableServersImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.RecoverableServerResourceInner; import com.azure.resourcemanager.mariadb.models.RecoverableServerResource; import com.azure.resourcemanager.mariadb.models.RecoverableServers; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class RecoverableServersImpl implements RecoverableServers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableServersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(RecoverableServersImpl.class); private final RecoverableServersClient innerClient; 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..3f551e415904 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.ReplicasClient; import com.azure.resourcemanager.mariadb.fluent.models.ServerInner; import com.azure.resourcemanager.mariadb.models.ServerListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ReplicasClient. */ public final class ReplicasClientImpl implements ReplicasClient { - private final ClientLogger logger = new ClientLogger(ReplicasClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ReplicasService service; @@ -60,7 +57,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 +79,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 +132,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( @@ -185,7 +182,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 servers. + * @return a list of servers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -201,7 +198,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, 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 a list of servers. + * @return a list of servers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName, Context context) { @@ -216,7 +213,7 @@ private PagedFlux listByServerAsync(String resourceGroupName, 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 a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -232,7 +229,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 servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName, Context context) { diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ReplicasImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ReplicasImpl.java index 38386ce865c9..fef9de125622 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ReplicasImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ReplicasImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.ServerInner; import com.azure.resourcemanager.mariadb.models.Replicas; import com.azure.resourcemanager.mariadb.models.Server; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ReplicasImpl implements Replicas { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicasImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ReplicasImpl.class); private final ReplicasClient innerClient; 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..954f5f834539 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 @@ -22,7 +22,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.ResourceProvidersClient; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - private final ClientLogger logger = new ClientLogger(ResourceProvidersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ResourceProvidersService service; @@ -99,7 +96,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 +147,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,20 +195,13 @@ 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( String resourceGroupName, String serverName) { return resetQueryPerformanceInsightDataWithResponseAsync(resourceGroupName, serverName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -237,7 +229,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 +247,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 +305,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 +359,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 PollerFlux} for polling of long-running operation. */ - @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 +383,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 PollerFlux} for polling of long-running operation. */ - @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 +407,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 SyncPoller} for polling of long-running operation. */ - @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 +427,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 SyncPoller} for polling of long-running operation. */ - @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 +447,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 +468,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/ResourceProvidersImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ResourceProvidersImpl.java index 22dcce9029de..eaf782a30eb0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ResourceProvidersImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ResourceProvidersImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.QueryPerformanceInsightResetDataResultInner; import com.azure.resourcemanager.mariadb.models.QueryPerformanceInsightResetDataResult; import com.azure.resourcemanager.mariadb.models.ResourceProviders; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ResourceProvidersImpl implements ResourceProviders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvidersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class); private final ResourceProvidersClient innerClient; 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..537e3e9638bf 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.ServerBasedPerformanceTiersClient; import com.azure.resourcemanager.mariadb.fluent.models.PerformanceTierPropertiesInner; import com.azure.resourcemanager.mariadb.models.PerformanceTierListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ServerBasedPerformanceTiersClient. */ public final class ServerBasedPerformanceTiersClientImpl implements ServerBasedPerformanceTiersClient { - private final ClientLogger logger = new ClientLogger(ServerBasedPerformanceTiersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ServerBasedPerformanceTiersService service; @@ -63,7 +60,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 +82,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 +136,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( @@ -189,7 +186,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String serverName) { @@ -205,7 +202,7 @@ private PagedFlux listAsync(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 a list of performance tiers. + * @return a list of performance tiers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -221,7 +218,7 @@ private PagedFlux listAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of performance tiers. + * @return a list of performance tiers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String serverName) { @@ -237,7 +234,7 @@ public PagedIterable list(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of performance tiers. + * @return a list of performance tiers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerBasedPerformanceTiersImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerBasedPerformanceTiersImpl.java index 37d08dd3e35f..9eb21ef27e9f 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerBasedPerformanceTiersImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerBasedPerformanceTiersImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.PerformanceTierPropertiesInner; import com.azure.resourcemanager.mariadb.models.PerformanceTierProperties; import com.azure.resourcemanager.mariadb.models.ServerBasedPerformanceTiers; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ServerBasedPerformanceTiersImpl implements ServerBasedPerformanceTiers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerBasedPerformanceTiersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServerBasedPerformanceTiersImpl.class); private final ServerBasedPerformanceTiersClient innerClient; 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..367acf64aa5d 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 @@ -123,6 +123,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ServerInner innerModel() { return this.innerObject; } @@ -219,6 +223,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..ebc9987a4102 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 @@ -23,7 +23,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.ServerParametersClient; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in ServerParametersClient. */ public final class ServerParametersClientImpl implements ServerParametersClient { - private final ClientLogger logger = new ClientLogger(ServerParametersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ServerParametersService service; @@ -62,7 +59,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 +83,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 +140,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 +193,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 the {@link PollerFlux} for polling of a list of server configurations. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationListResultInner> beginListUpdateConfigurationsAsync( String resourceGroupName, String serverName, ConfigurationListResultInner value) { @@ -211,7 +208,7 @@ private Mono>> listUpdateConfigurationsWithResponseAsy this.client.getHttpPipeline(), ConfigurationListResultInner.class, ConfigurationListResultInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -224,9 +221,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 the {@link PollerFlux} for polling of a list of server configurations. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConfigurationListResultInner> beginListUpdateConfigurationsAsync( String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context) { @@ -252,9 +249,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 the {@link SyncPoller} for polling of a list of server configurations. */ - @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 +267,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 the {@link SyncPoller} for polling of a list of server configurations. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConfigurationListResultInner> beginListUpdateConfigurations( String resourceGroupName, String serverName, ConfigurationListResultInner value, Context context) { @@ -288,7 +285,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 +305,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/ServerParametersImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerParametersImpl.java index 6d8978398e2e..21cdc94f8d89 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerParametersImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerParametersImpl.java @@ -10,10 +10,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.ConfigurationListResultInner; import com.azure.resourcemanager.mariadb.models.ConfigurationListResult; import com.azure.resourcemanager.mariadb.models.ServerParameters; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ServerParametersImpl implements ServerParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerParametersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServerParametersImpl.class); private final ServerParametersClient innerClient; 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..71a569eabb66 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 @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.ServerSecurityAlertPoliciesClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in ServerSecurityAlertPoliciesClient. */ public final class ServerSecurityAlertPoliciesClientImpl implements ServerSecurityAlertPoliciesClient { - private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPoliciesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ServerSecurityAlertPoliciesService service; @@ -137,7 +134,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 +191,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,20 +244,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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( String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName) { return getWithResponseAsync(resourceGroupName, serverName, securityAlertPolicyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -290,7 +280,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 +298,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 +365,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 +429,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 the {@link PollerFlux} for polling of a server security alert policy. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -457,7 +447,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), ServerSecurityAlertPolicyInner.class, ServerSecurityAlertPolicyInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -471,9 +461,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 the {@link PollerFlux} for polling of a server security alert policy. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerSecurityAlertPolicyInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -505,9 +495,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 the {@link SyncPoller} for polling of a server security alert policy. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -528,9 +518,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 the {@link SyncPoller} for polling of a server security alert policy. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -551,7 +541,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 +565,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 +631,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 +691,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( @@ -755,7 +747,7 @@ 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -773,7 +765,7 @@ private PagedFlux listByServerAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -791,7 +783,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -807,7 +799,7 @@ public PagedIterable listByServer(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 server's threat detection policies. + * @return the server's threat detection policies as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -822,7 +814,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 +851,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/ServerSecurityAlertPoliciesImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesImpl.java index 6fd524375936..041a5393d85b 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.mariadb.models.SecurityAlertPolicyName; import com.azure.resourcemanager.mariadb.models.ServerSecurityAlertPolicies; import com.azure.resourcemanager.mariadb.models.ServerSecurityAlertPolicy; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ServerSecurityAlertPoliciesImpl implements ServerSecurityAlertPolicies { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPoliciesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServerSecurityAlertPoliciesImpl.class); private final ServerSecurityAlertPoliciesClient innerClient; @@ -72,7 +71,7 @@ public PagedIterable listByServer( public ServerSecurityAlertPolicy getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -80,7 +79,7 @@ public ServerSecurityAlertPolicy getById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); @@ -88,7 +87,7 @@ public ServerSecurityAlertPolicy getById(String id) { SecurityAlertPolicyName securityAlertPolicyName = SecurityAlertPolicyName.fromString(Utils.getValueFromIdByName(id, "securityAlertPolicies")); if (securityAlertPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -102,7 +101,7 @@ public ServerSecurityAlertPolicy getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -110,7 +109,7 @@ public Response getByIdWithResponse(String id, Contex } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); @@ -118,7 +117,7 @@ public Response getByIdWithResponse(String id, Contex SecurityAlertPolicyName securityAlertPolicyName = SecurityAlertPolicyName.fromString(Utils.getValueFromIdByName(id, "securityAlertPolicies")); if (securityAlertPolicyName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPolicyImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPolicyImpl.java index 8f2dc35632cc..5cb19c5ab4e0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPolicyImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPolicyImpl.java @@ -68,6 +68,10 @@ public Integer retentionDays() { return this.innerModel().retentionDays(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ServerSecurityAlertPolicyInner innerModel() { return this.innerObject; } 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..34bb4ee7e19f 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 @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.ServersClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in ServersClient. */ public final class ServersClientImpl implements ServersClient { - private final ClientLogger logger = new ClientLogger(ServersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ServersService service; @@ -72,7 +69,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 +85,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 +101,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 +116,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 +131,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 +144,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 +156,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 +209,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 +266,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 +319,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 the {@link PollerFlux} for polling of represents a server. */ - @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 +341,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 the {@link PollerFlux} for polling of represents a server. */ - @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 +364,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 the {@link SyncPoller} for polling of represents a server. */ - @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 +382,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 the {@link SyncPoller} for polling of represents a server. */ - @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 +399,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 +418,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 +472,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 +530,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 +584,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 the {@link PollerFlux} for polling of represents a server. */ - @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 +607,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 the {@link PollerFlux} for polling of represents a server. */ - @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 +631,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 the {@link SyncPoller} for polling of represents a server. */ - @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 +650,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 the {@link SyncPoller} for polling of represents a server. */ - @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 +668,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 +689,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 +743,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 +792,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 +838,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.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 +858,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 PollerFlux} for polling of long-running operation. */ - @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 +878,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 SyncPoller} for polling of long-running operation. */ - @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 +894,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 SyncPoller} for polling of long-running operation. */ - @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 +910,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 +926,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 +972,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 +1022,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,19 +1068,12 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getByResourceGroupWithResponseAsync(resourceGroupName, serverName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1109,7 +1100,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 +1115,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 +1163,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( @@ -1217,7 +1208,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1232,7 +1223,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1246,7 +1237,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1261,7 +1252,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1273,7 +1264,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 +1301,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) { @@ -1342,7 +1333,7 @@ private Mono> listSinglePageAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1356,7 +1347,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1368,7 +1359,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1382,7 +1373,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1397,7 +1388,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 +1437,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 +1483,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 PollerFlux} for polling of long-running operation. */ - @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 +1503,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 PollerFlux} for polling of long-running operation. */ - @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 +1523,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 SyncPoller} for polling of long-running operation. */ - @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 +1539,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 SyncPoller} for polling of long-running operation. */ - @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 +1555,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 +1571,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 +1617,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 +1666,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 +1712,15 @@ private Mono>> startWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.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 +1732,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 PollerFlux} for polling of long-running operation. */ - @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 +1752,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 SyncPoller} for polling of long-running operation. */ - @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 +1768,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 SyncPoller} for polling of long-running operation. */ - @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 +1783,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 +1799,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 +1845,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 +1894,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 +1940,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 PollerFlux} for polling of long-running operation. */ - @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 +1960,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 PollerFlux} for polling of long-running operation. */ - @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 +1980,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 SyncPoller} for polling of long-running operation. */ - @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 +1996,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 SyncPoller} for polling of long-running operation. */ - @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 +2011,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 +2027,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/ServersImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServersImpl.java index 7ae30fdf9940..e1c053ff62f6 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServersImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.ServerInner; import com.azure.resourcemanager.mariadb.models.Server; import com.azure.resourcemanager.mariadb.models.Servers; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ServersImpl implements Servers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ServersImpl.class); private final ServersClient innerClient; @@ -106,7 +105,7 @@ public void stop(String resourceGroupName, String serverName, Context context) { public Server getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -114,7 +113,7 @@ public Server getById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); @@ -125,7 +124,7 @@ public Server getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -133,7 +132,7 @@ public Response getByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); @@ -144,7 +143,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -152,7 +151,7 @@ public void deleteById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); @@ -163,7 +162,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -171,7 +170,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); 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..dbb82cab57bc 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 @@ -26,7 +26,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.TopQueryStatisticsClient; import com.azure.resourcemanager.mariadb.fluent.models.QueryStatisticInner; import com.azure.resourcemanager.mariadb.models.TopQueryStatisticsInput; @@ -35,8 +34,6 @@ /** An instance of this class provides access to all the operations defined in TopQueryStatisticsClient. */ public final class TopQueryStatisticsClientImpl implements TopQueryStatisticsClient { - private final ClientLogger logger = new ClientLogger(TopQueryStatisticsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final TopQueryStatisticsService service; @@ -113,7 +110,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 +166,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,19 +218,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getWithResponseAsync(resourceGroupName, serverName, queryStatisticId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -262,7 +252,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 +269,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 +335,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( @@ -407,7 +397,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -427,7 +417,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -446,7 +436,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -464,7 +454,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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -479,7 +469,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 +505,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/TopQueryStatisticsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/TopQueryStatisticsImpl.java index 6f290022c9f1..cacdedb9e672 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/TopQueryStatisticsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/TopQueryStatisticsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.mariadb.models.QueryStatistic; import com.azure.resourcemanager.mariadb.models.TopQueryStatistics; import com.azure.resourcemanager.mariadb.models.TopQueryStatisticsInput; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class TopQueryStatisticsImpl implements TopQueryStatistics { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TopQueryStatisticsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(TopQueryStatisticsImpl.class); private final TopQueryStatisticsClient innerClient; diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRuleImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRuleImpl.java index 3cc23a93ba15..bf68351c0922 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRuleImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRuleImpl.java @@ -39,6 +39,10 @@ public VirtualNetworkRuleState state() { return this.innerModel().state(); } + public String resourceGroupName() { + return resourceGroupName; + } + public VirtualNetworkRuleInner innerModel() { return this.innerObject; } 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..75fb449928c1 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 @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.VirtualNetworkRulesClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in VirtualNetworkRulesClient. */ public final class VirtualNetworkRulesClientImpl implements VirtualNetworkRulesClient { - private final ClientLogger logger = new ClientLogger(VirtualNetworkRulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final VirtualNetworkRulesService service; @@ -69,7 +66,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 +82,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 +99,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 +114,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 +147,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 +204,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,20 +257,13 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a virtual network rule. + * @return a virtual network rule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String serverName, String virtualNetworkRuleName) { return getWithResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -302,7 +292,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 +310,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 +377,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 +441,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 the {@link PollerFlux} for polling of a virtual network rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualNetworkRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, @@ -468,7 +458,7 @@ private PollerFlux, VirtualNetworkRuleInner> this.client.getHttpPipeline(), VirtualNetworkRuleInner.class, VirtualNetworkRuleInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -482,9 +472,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 the {@link PollerFlux} for polling of a virtual network rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, VirtualNetworkRuleInner> beginCreateOrUpdateAsync( String resourceGroupName, String serverName, @@ -514,9 +504,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 the {@link SyncPoller} for polling of a virtual network rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -537,9 +527,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 the {@link SyncPoller} for polling of a virtual network rule. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkRuleInner> beginCreateOrUpdate( String resourceGroupName, String serverName, @@ -560,7 +550,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 +574,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 +641,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 +696,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 +747,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 PollerFlux} for polling of long-running operation. */ - @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 +770,9 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String serverName, String virtualNetworkRuleName, Context context) { context = this.client.mergeContext(context); @@ -801,9 +792,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 SyncPoller} for polling of long-running operation. */ - @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 +810,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 SyncPoller} for polling of long-running operation. */ - @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 +827,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 +846,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 +895,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 +955,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( @@ -1018,7 +1011,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 virtual network rules in a server. + * @return a list of virtual network rules in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync(String resourceGroupName, String serverName) { @@ -1036,7 +1029,7 @@ private PagedFlux listByServerAsync(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 a list of virtual network rules in a server. + * @return a list of virtual network rules in a server as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -1054,7 +1047,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer(String resourceGroupName, String serverName) { @@ -1070,7 +1063,7 @@ public PagedIterable listByServer(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 a list of virtual network rules in a server. + * @return a list of virtual network rules in a server as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -1085,7 +1078,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 +1115,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/VirtualNetworkRulesImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRulesImpl.java index 77fa95f798d3..12d283c04ea9 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRulesImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/VirtualNetworkRulesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.mariadb.fluent.models.VirtualNetworkRuleInner; import com.azure.resourcemanager.mariadb.models.VirtualNetworkRule; import com.azure.resourcemanager.mariadb.models.VirtualNetworkRules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class VirtualNetworkRulesImpl implements VirtualNetworkRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRulesImpl.class); private final VirtualNetworkRulesClient innerClient; @@ -75,7 +74,7 @@ public PagedIterable listByServer( public VirtualNetworkRule getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -83,14 +82,14 @@ public VirtualNetworkRule getById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String virtualNetworkRuleName = Utils.getValueFromIdByName(id, "virtualNetworkRules"); if (virtualNetworkRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -103,7 +102,7 @@ public VirtualNetworkRule getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -111,14 +110,14 @@ public Response getByIdWithResponse(String id, Context conte } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String virtualNetworkRuleName = Utils.getValueFromIdByName(id, "virtualNetworkRules"); if (virtualNetworkRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -131,7 +130,7 @@ public Response getByIdWithResponse(String id, Context conte public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -139,14 +138,14 @@ public void deleteById(String id) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String virtualNetworkRuleName = Utils.getValueFromIdByName(id, "virtualNetworkRules"); if (virtualNetworkRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -159,7 +158,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -167,14 +166,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String serverName = Utils.getValueFromIdByName(id, "servers"); if (serverName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id))); } String virtualNetworkRuleName = Utils.getValueFromIdByName(id, "virtualNetworkRules"); if (virtualNetworkRuleName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String 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..dfeb81f79056 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 @@ -26,7 +26,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.WaitStatisticsClient; import com.azure.resourcemanager.mariadb.fluent.models.WaitStatisticInner; import com.azure.resourcemanager.mariadb.models.WaitStatisticsInput; @@ -35,8 +34,6 @@ /** An instance of this class provides access to all the operations defined in WaitStatisticsClient. */ public final class WaitStatisticsClientImpl implements WaitStatisticsClient { - private final ClientLogger logger = new ClientLogger(WaitStatisticsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final WaitStatisticsService service; @@ -113,7 +110,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 +166,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,19 +218,12 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { return getWithResponseAsync(resourceGroupName, serverName, waitStatisticsId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -262,7 +252,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 +269,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 +335,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( @@ -407,7 +397,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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -427,7 +417,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByServerAsync( @@ -446,7 +436,7 @@ private PagedFlux listByServerAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -464,7 +454,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 as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByServer( @@ -479,7 +469,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 +505,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/implementation/WaitStatisticsImpl.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/WaitStatisticsImpl.java index 053121a597c8..d339af4050c0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/WaitStatisticsImpl.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/WaitStatisticsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.mariadb.models.WaitStatistic; import com.azure.resourcemanager.mariadb.models.WaitStatistics; import com.azure.resourcemanager.mariadb.models.WaitStatisticsInput; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class WaitStatisticsImpl implements WaitStatistics { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(WaitStatisticsImpl.class); private final WaitStatisticsClient innerClient; 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..0193c605523f 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); @@ -45,7 +45,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 list of query statistics. + * @return a list of query statistics as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -58,7 +58,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 list of query statistics. + * @return a list of query statistics as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/AdvisorsResultList.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/AdvisorsResultList.java index 8b7b28db011f..bc86172d5f88 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/AdvisorsResultList.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/AdvisorsResultList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.AdvisorInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of query statistics. */ @Immutable public final class AdvisorsResultList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdvisorsResultList.class); - /* * The list of recommendation action advisors. */ 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/Configuration.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Configuration.java index 6d2831392237..929c4568aa31 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Configuration.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Configuration.java @@ -72,6 +72,13 @@ public interface Configuration { */ String source(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.mariadb.fluent.models.ConfigurationInner object. * 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..b69b96a7db2d 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); @@ -46,7 +46,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 list of server configurations. + * @return a list of server configurations as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -59,7 +59,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 list of server configurations. + * @return a list of server configurations as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, 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/CreateMode.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/CreateMode.java index 08605feda3d0..3f73dfbac2ec 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/CreateMode.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/CreateMode.java @@ -33,7 +33,11 @@ public static CreateMode fromString(String name) { return fromString(name, CreateMode.class); } - /** @return known CreateMode values. */ + /** + * Gets known CreateMode values. + * + * @return known CreateMode values. + */ public static Collection values() { return values(CreateMode.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Database.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Database.java index 034e3e35e391..1e03f011ea65 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Database.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Database.java @@ -44,6 +44,13 @@ public interface Database { */ String collation(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.mariadb.fluent.models.DatabaseInner object. * diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/DatabaseListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/DatabaseListResult.java index d774791b2a8b..013878616efe 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/DatabaseListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/DatabaseListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.DatabaseInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A List of databases. */ @Fluent public final class DatabaseListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseListResult.class); - /* * The list of databases housed in a server */ 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..af67a078615a 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); @@ -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 List of databases. + * @return a List of databases as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -84,7 +84,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 List of databases. + * @return a List of databases as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, 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/FirewallRule.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRule.java index 759beddf2163..f315637170c2 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRule.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRule.java @@ -44,6 +44,13 @@ public interface FirewallRule { */ String endIpAddress(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.mariadb.fluent.models.FirewallRuleInner object. * diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRuleListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRuleListResult.java index ab48ce181bee..ef378c9c6b5f 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRuleListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/FirewallRuleListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.FirewallRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of firewall rules. */ @Fluent public final class FirewallRuleListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FirewallRuleListResult.class); - /* * The list of firewall rules in a server. */ 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..410b4215b4aa 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); @@ -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 list of firewall rules. + * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -84,7 +84,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 list of firewall rules. + * @return a list of firewall rules as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, 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/GeoRedundantBackup.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/GeoRedundantBackup.java index 4c0777592c4c..80a05f8f02c0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/GeoRedundantBackup.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/GeoRedundantBackup.java @@ -27,7 +27,11 @@ public static GeoRedundantBackup fromString(String name) { return fromString(name, GeoRedundantBackup.class); } - /** @return known GeoRedundantBackup values. */ + /** + * Gets known GeoRedundantBackup values. + * + * @return known GeoRedundantBackup values. + */ public static Collection values() { return values(GeoRedundantBackup.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedPerformanceTiers.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedPerformanceTiers.java index d36db707093e..43db62bb336e 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedPerformanceTiers.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedPerformanceTiers.java @@ -16,7 +16,7 @@ public interface LocationBasedPerformanceTiers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String locationName); @@ -28,7 +28,7 @@ public interface LocationBasedPerformanceTiers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String locationName, 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/LocationBasedRecommendedActionSessionsResults.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedRecommendedActionSessionsResults.java index b74d074e1a18..aa383fd2ce1d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedRecommendedActionSessionsResults.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LocationBasedRecommendedActionSessionsResults.java @@ -17,7 +17,7 @@ public interface LocationBasedRecommendedActionSessionsResults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String locationName, String operationId); @@ -30,7 +30,7 @@ public interface LocationBasedRecommendedActionSessionsResults { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String locationName, String operationId, Context context); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LogFileListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LogFileListResult.java index 84ca1cd80bc7..2d04538a8457 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LogFileListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LogFileListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.LogFileInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of log files. */ @Fluent public final class LogFileListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogFileListResult.class); - /* * The list of log files. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LogFiles.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LogFiles.java index 890462833e5c..6e4486a75f23 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LogFiles.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/LogFiles.java @@ -17,7 +17,7 @@ public interface LogFiles { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -30,7 +30,7 @@ public interface LogFiles { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/MinimalTlsVersionEnum.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/MinimalTlsVersionEnum.java index 637305879fa2..b13d33f145ac 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/MinimalTlsVersionEnum.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/MinimalTlsVersionEnum.java @@ -33,7 +33,11 @@ public static MinimalTlsVersionEnum fromString(String name) { return fromString(name, MinimalTlsVersionEnum.class); } - /** @return known MinimalTlsVersionEnum values. */ + /** + * Gets known MinimalTlsVersionEnum values. + * + * @return known MinimalTlsVersionEnum values. + */ public static Collection values() { return values(MinimalTlsVersionEnum.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/NameAvailabilityRequest.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/NameAvailabilityRequest.java index ae8de46914d9..f61cf3ae9f34 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/NameAvailabilityRequest.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/NameAvailabilityRequest.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Request from client to check resource name availability. */ @Fluent public final class NameAvailabilityRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityRequest.class); - /* * Resource name to verify. */ @@ -73,9 +70,11 @@ public NameAvailabilityRequest withType(String type) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model NameAvailabilityRequest")); } } + + private static final ClientLogger LOGGER = new ClientLogger(NameAvailabilityRequest.class); } 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..d7a6daa2fdf1 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 @@ -5,16 +5,13 @@ package com.azure.resourcemanager.mariadb.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** REST API operation definition. */ @Immutable public final class Operation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Operation.class); - /* * The name of the operation being performed on this particular object. */ @@ -38,6 +35,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/OperationDisplay.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/OperationDisplay.java index 8d86c22a5ffe..06315be3d4e0 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/OperationDisplay.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mariadb.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; /** Display metadata associated with the operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Operation resource provider name. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/OperationOrigin.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/OperationOrigin.java index 96a2f62fceec..25664ff183d7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/OperationOrigin.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/OperationOrigin.java @@ -30,7 +30,11 @@ public static OperationOrigin fromString(String name) { return fromString(name, OperationOrigin.class); } - /** @return known OperationOrigin values. */ + /** + * Gets known OperationOrigin values. + * + * @return known OperationOrigin values. + */ public static Collection values() { return values(OperationOrigin.class); } 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/PerformanceTierListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PerformanceTierListResult.java index 3f3eaac0ea33..de8039c44e60 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PerformanceTierListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PerformanceTierListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.PerformanceTierPropertiesInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of performance tiers. */ @Fluent public final class PerformanceTierListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PerformanceTierListResult.class); - /* * The list of performance tiers */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PerformanceTierServiceLevelObjectives.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PerformanceTierServiceLevelObjectives.java index 9a827e222740..7af0f0994730 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PerformanceTierServiceLevelObjectives.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PerformanceTierServiceLevelObjectives.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mariadb.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; /** Service level objectives for performance tier. */ @Fluent public final class PerformanceTierServiceLevelObjectives { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PerformanceTierServiceLevelObjectives.class); - /* * ID for the service level objective. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnection.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnection.java index afd1e88a527b..4712a3841b28 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnection.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnection.java @@ -52,6 +52,13 @@ public interface PrivateEndpointConnection { */ String provisioningState(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.mariadb.fluent.models.PrivateEndpointConnectionInner object. * diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnectionListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnectionListResult.java index 47363f893de6..5e9b37ef1144 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnectionListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointConnectionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.PrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of private endpoint connections. */ @Immutable public final class PrivateEndpointConnectionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResult.class); - /* * Array of results. */ 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..5c3d4ec0a6aa 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); @@ -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 all private endpoint connections on a server. + * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -84,7 +84,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 all private endpoint connections on a server. + * @return all private endpoint connections on a server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, 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/PrivateEndpointProperty.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointProperty.java index d4cdb4e2beaa..be97d69990a7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointProperty.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointProperty.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mariadb.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 PrivateEndpointProperty model. */ @Fluent public final class PrivateEndpointProperty { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointProperty.class); - /* * Resource id of the private endpoint. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointProvisioningState.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointProvisioningState.java index aa011c5d2772..3f569a6fc1f3 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointProvisioningState.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateEndpointProvisioningState.java @@ -36,7 +36,11 @@ public static PrivateEndpointProvisioningState fromString(String name) { return fromString(name, PrivateEndpointProvisioningState.class); } - /** @return known PrivateEndpointProvisioningState values. */ + /** + * Gets known PrivateEndpointProvisioningState values. + * + * @return known PrivateEndpointProvisioningState values. + */ public static Collection values() { return values(PrivateEndpointProvisioningState.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResourceListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResourceListResult.java index 4469e07e1704..e4c5d8150424 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResourceListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResourceListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.PrivateLinkResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of private link resources. */ @Immutable public final class PrivateLinkResourceListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceListResult.class); - /* * Array of results. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResourceProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResourceProperties.java index a7fd0e923f1c..60c472b1aa81 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResourceProperties.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkResourceProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of a private link resource. */ @Immutable public final class PrivateLinkResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); - /* * The private link resource group id. */ 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..77d9bd5badf4 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 @@ -18,7 +18,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 the private link resources for MariaDB server. + * @return the private link resources for MariaDB server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -31,7 +31,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 the private link resources for MariaDB server. + * @return the private link resources for MariaDB server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, Context context); @@ -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/PrivateLinkServiceConnectionStateActionsRequire.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateActionsRequire.java index 549505e87f7c..caec62f047f5 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateActionsRequire.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateActionsRequire.java @@ -25,7 +25,11 @@ public static PrivateLinkServiceConnectionStateActionsRequire fromString(String return fromString(name, PrivateLinkServiceConnectionStateActionsRequire.class); } - /** @return known PrivateLinkServiceConnectionStateActionsRequire values. */ + /** + * Gets known PrivateLinkServiceConnectionStateActionsRequire values. + * + * @return known PrivateLinkServiceConnectionStateActionsRequire values. + */ public static Collection values() { return values(PrivateLinkServiceConnectionStateActionsRequire.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateProperty.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateProperty.java index 5f6c70039477..8fe4e7549c44 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateProperty.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateProperty.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The PrivateLinkServiceConnectionStateProperty model. */ @Fluent public final class PrivateLinkServiceConnectionStateProperty { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionStateProperty.class); - /* * The private link service connection status. */ @@ -88,16 +85,18 @@ public String actionsRequired() { */ public void validate() { if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property status in model PrivateLinkServiceConnectionStateProperty")); } if (description() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property description in model PrivateLinkServiceConnectionStateProperty")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkServiceConnectionStateProperty.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateStatus.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateStatus.java index 6a1cc7aba934..65855ea6211b 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateStatus.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PrivateLinkServiceConnectionStateStatus.java @@ -34,7 +34,11 @@ public static PrivateLinkServiceConnectionStateStatus fromString(String name) { return fromString(name, PrivateLinkServiceConnectionStateStatus.class); } - /** @return known PrivateLinkServiceConnectionStateStatus values. */ + /** + * Gets known PrivateLinkServiceConnectionStateStatus values. + * + * @return known PrivateLinkServiceConnectionStateStatus values. + */ public static Collection values() { return values(PrivateLinkServiceConnectionStateStatus.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PublicNetworkAccessEnum.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PublicNetworkAccessEnum.java index 0de3fd828e36..c0a7b19dd581 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PublicNetworkAccessEnum.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/PublicNetworkAccessEnum.java @@ -27,7 +27,11 @@ public static PublicNetworkAccessEnum fromString(String name) { return fromString(name, PublicNetworkAccessEnum.class); } - /** @return known PublicNetworkAccessEnum values. */ + /** + * Gets known PublicNetworkAccessEnum values. + * + * @return known PublicNetworkAccessEnum values. + */ public static Collection values() { return values(PublicNetworkAccessEnum.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryPerformanceInsightResetDataResultState.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryPerformanceInsightResetDataResultState.java index 1bf6932089e6..9fb2e2a65fe7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryPerformanceInsightResetDataResultState.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryPerformanceInsightResetDataResultState.java @@ -28,7 +28,11 @@ public static QueryPerformanceInsightResetDataResultState fromString(String name return fromString(name, QueryPerformanceInsightResetDataResultState.class); } - /** @return known QueryPerformanceInsightResetDataResultState values. */ + /** + * Gets known QueryPerformanceInsightResetDataResultState values. + * + * @return known QueryPerformanceInsightResetDataResultState values. + */ public static Collection values() { return values(QueryPerformanceInsightResetDataResultState.class); } 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..f05c2f97ed7b 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); @@ -47,7 +47,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 a list of query texts. + * @return a list of query texts as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, List queryIds); @@ -61,7 +61,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 a list of query texts. + * @return a list of query texts as paginated response with {@link PagedIterable}. */ PagedIterable listByServer( String resourceGroupName, String serverName, List queryIds, Context context); diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryTextsResultList.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryTextsResultList.java index a856fe8359a7..283edbafc9d7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryTextsResultList.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/QueryTextsResultList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.QueryTextInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of query texts. */ @Immutable public final class QueryTextsResultList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryTextsResultList.class); - /* * The list of query texts. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecommendationActionsResultList.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecommendationActionsResultList.java index f3028dfd460b..a09605a1c7d3 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecommendationActionsResultList.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/RecommendationActionsResultList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.RecommendationActionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of recommendation actions. */ @Immutable public final class RecommendationActionsResultList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationActionsResultList.class); - /* * The list of recommendation action advisors. */ 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..f85525e98b43 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); @@ -50,7 +50,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 list of recommendation actions. + * @return a list of recommendation actions as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, String advisorName); @@ -65,7 +65,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 list of recommendation actions. + * @return a list of recommendation actions as paginated response with {@link PagedIterable}. */ PagedIterable listByServer( String resourceGroupName, String serverName, String advisorName, String sessionId, 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/Replicas.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Replicas.java index 0ee3891323d9..620537147607 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Replicas.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Replicas.java @@ -17,7 +17,7 @@ public interface Replicas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -30,7 +30,7 @@ public interface Replicas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(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/SecurityAlertPolicyName.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/SecurityAlertPolicyName.java index e82be3cdf381..ae5d2c462924 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/SecurityAlertPolicyName.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/SecurityAlertPolicyName.java @@ -24,7 +24,11 @@ public static SecurityAlertPolicyName fromString(String name) { return fromString(name, SecurityAlertPolicyName.class); } - /** @return known SecurityAlertPolicyName values. */ + /** + * Gets known SecurityAlertPolicyName values. + * + * @return known SecurityAlertPolicyName values. + */ public static Collection values() { return values(SecurityAlertPolicyName.class); } 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..d0f3befcc41d 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 @@ -162,6 +162,13 @@ public interface Server { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.mariadb.fluent.models.ServerInner object. * @@ -403,4 +410,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/ServerBasedPerformanceTiers.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerBasedPerformanceTiers.java index a0ce87d01869..bfe3e3189513 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerBasedPerformanceTiers.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerBasedPerformanceTiers.java @@ -17,7 +17,7 @@ public interface ServerBasedPerformanceTiers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String serverName); @@ -30,7 +30,7 @@ public interface ServerBasedPerformanceTiers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String serverName, 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..c196503e0078 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 @@ -6,15 +6,13 @@ 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; /** Represents a server to be created. */ @Fluent public final class ServerForCreate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerForCreate.class); - /* * The SKU (pricing tier) of the server. */ @@ -37,6 +35,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; /** @@ -129,16 +128,18 @@ public void validate() { sku().validate(); } if (properties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property properties in model ServerForCreate")); } else { properties().validate(); } if (location() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property location in model ServerForCreate")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServerForCreate.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerListResult.java index 274234484a65..c00a6172fc29 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.ServerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of servers. */ @Fluent public final class ServerListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerListResult.class); - /* * The list of servers */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateEndpointConnection.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateEndpointConnection.java index 2f4a8666c39f..c075a459a77d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateEndpointConnection.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateEndpointConnection.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mariadb.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; /** A private endpoint connection under a server. */ @Immutable public final class ServerPrivateEndpointConnection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerPrivateEndpointConnection.class); - /* * Resource Id of the private endpoint connection. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateEndpointConnectionProperties.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateEndpointConnectionProperties.java index 9912937cceeb..3c86758380df 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateEndpointConnectionProperties.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateEndpointConnectionProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mariadb.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; /** Properties of a private endpoint connection. */ @Fluent public final class ServerPrivateEndpointConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerPrivateEndpointConnectionProperties.class); - /* * Private endpoint which the connection belongs to. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateLinkServiceConnectionStateProperty.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateLinkServiceConnectionStateProperty.java index aef6a64f0a67..37999631b041 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateLinkServiceConnectionStateProperty.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPrivateLinkServiceConnectionStateProperty.java @@ -6,15 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The ServerPrivateLinkServiceConnectionStateProperty model. */ @Fluent public final class ServerPrivateLinkServiceConnectionStateProperty { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ServerPrivateLinkServiceConnectionStateProperty.class); - /* * The private link service connection status. */ @@ -89,17 +85,19 @@ public PrivateLinkServiceConnectionStateActionsRequire actionsRequired() { */ public void validate() { if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property status in model ServerPrivateLinkServiceConnectionStateProperty")); } if (description() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property description in model" + " ServerPrivateLinkServiceConnectionStateProperty")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServerPrivateLinkServiceConnectionStateProperty.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForCreate.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForCreate.java index 954138f7b31a..2badbb4daee2 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForCreate.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForCreate.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.mariadb.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 com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -27,8 +25,6 @@ }) @Fluent public class ServerPropertiesForCreate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerPropertiesForCreate.class); - /* * Server version. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForDefaultCreate.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForDefaultCreate.java index 1feadae40f8c..1641c6c56958 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForDefaultCreate.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForDefaultCreate.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("Default") @Fluent public final class ServerPropertiesForDefaultCreate extends ServerPropertiesForCreate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerPropertiesForDefaultCreate.class); - /* * The administrator's login name of a server. Can only be specified when * the server is being created (and is required for creation). @@ -117,17 +114,19 @@ public ServerPropertiesForDefaultCreate withStorageProfile(StorageProfile storag public void validate() { super.validate(); if (administratorLogin() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property administratorLogin in model ServerPropertiesForDefaultCreate")); } if (administratorLoginPassword() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property administratorLoginPassword in model" + " ServerPropertiesForDefaultCreate")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServerPropertiesForDefaultCreate.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForGeoRestore.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForGeoRestore.java index b7d52d3a8d5b..b70afbdfd45c 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForGeoRestore.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForGeoRestore.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("GeoRestore") @Fluent public final class ServerPropertiesForGeoRestore extends ServerPropertiesForCreate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerPropertiesForGeoRestore.class); - /* * The source server id to restore from. */ @@ -88,10 +85,12 @@ public ServerPropertiesForGeoRestore withStorageProfile(StorageProfile storagePr public void validate() { super.validate(); if (sourceServerId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceServerId in model ServerPropertiesForGeoRestore")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServerPropertiesForGeoRestore.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForReplica.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForReplica.java index c01a23cd1ac9..76d1fff0350c 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForReplica.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForReplica.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -16,8 +15,6 @@ @JsonTypeName("Replica") @Fluent public final class ServerPropertiesForReplica extends ServerPropertiesForCreate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerPropertiesForReplica.class); - /* * The master server id to create replica from. */ @@ -88,10 +85,12 @@ public ServerPropertiesForReplica withStorageProfile(StorageProfile storageProfi public void validate() { super.validate(); if (sourceServerId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceServerId in model ServerPropertiesForReplica")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServerPropertiesForReplica.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForRestore.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForRestore.java index 8af82e51e8c6..3d19c8ee9c45 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForRestore.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerPropertiesForRestore.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -17,8 +16,6 @@ @JsonTypeName("PointInTimeRestore") @Fluent public final class ServerPropertiesForRestore extends ServerPropertiesForCreate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerPropertiesForRestore.class); - /* * The source server id to restore from. */ @@ -118,16 +115,18 @@ public ServerPropertiesForRestore withStorageProfile(StorageProfile storageProfi public void validate() { super.validate(); if (sourceServerId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sourceServerId in model ServerPropertiesForRestore")); } if (restorePointInTime() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property restorePointInTime in model ServerPropertiesForRestore")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ServerPropertiesForRestore.class); } 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..e8420ebf37bc 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); @@ -47,7 +47,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the server's threat detection policies. + * @return the server's threat detection policies as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -60,7 +60,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the server's threat detection policies. + * @return the server's threat detection policies as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, 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/ServerSecurityAlertPolicy.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicy.java index 066ccf70bd4c..ef812bc5b1aa 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicy.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicy.java @@ -83,6 +83,13 @@ public interface ServerSecurityAlertPolicy { */ Integer retentionDays(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner object. * diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicyListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicyListResult.java index bab5a38f6a8f..7861f4369262 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicyListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerSecurityAlertPolicyListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of the server's security alert policies. */ @Immutable public final class ServerSecurityAlertPolicyListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPolicyListResult.class); - /* * Array of results. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerState.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerState.java index 298b7a9fe37e..49d0a463aa0f 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerState.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerState.java @@ -30,7 +30,11 @@ public static ServerState fromString(String name) { return fromString(name, ServerState.class); } - /** @return known ServerState values. */ + /** + * Gets known ServerState values. + * + * @return known ServerState values. + */ public static Collection values() { return values(ServerState.class); } 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..e7c38efc866b 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,18 +5,14 @@ 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.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.mariadb.fluent.models.ServerUpdateParametersProperties; +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 { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerUpdateParameters.class); - +public final class ServerUpdateParameters { /* * The SKU (pricing tier) of the server. */ @@ -24,53 +20,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 +52,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 +87,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 +97,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 +110,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 +120,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 +133,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 +143,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 +156,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 +166,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 +179,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 +189,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 +203,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 +214,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 +227,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 +237,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 +253,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/ServerVersion.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerVersion.java index fa66e6c1b806..473572076262 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerVersion.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/ServerVersion.java @@ -27,7 +27,11 @@ public static ServerVersion fromString(String name) { return fromString(name, ServerVersion.class); } - /** @return known ServerVersion values. */ + /** + * Gets known ServerVersion values. + * + * @return known ServerVersion values. + */ public static Collection values() { return values(ServerVersion.class); } 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..82d4074eebdc 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); @@ -65,7 +65,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 a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -77,7 +77,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 a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -86,7 +86,7 @@ public interface Servers { * * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -97,7 +97,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 a list of servers. + * @return a list of servers as paginated response with {@link PagedIterable}. */ PagedIterable list(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/Sku.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Sku.java index 7903b4ff2e34..508bbe9695dd 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Sku.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/Sku.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Billing information related properties of a server. */ @Fluent public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - /* * The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, * GP_Gen5_8. @@ -152,8 +149,10 @@ public Sku withFamily(String family) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/SkuTier.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/SkuTier.java index 31591c2f70eb..73ee58f25f36 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/SkuTier.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/SkuTier.java @@ -30,7 +30,11 @@ public static SkuTier fromString(String name) { return fromString(name, SkuTier.class); } - /** @return known SkuTier values. */ + /** + * Gets known SkuTier values. + * + * @return known SkuTier values. + */ public static Collection values() { return values(SkuTier.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/StorageAutogrow.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/StorageAutogrow.java index 5d986e11ce3a..16c0ea479961 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/StorageAutogrow.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/StorageAutogrow.java @@ -27,7 +27,11 @@ public static StorageAutogrow fromString(String name) { return fromString(name, StorageAutogrow.class); } - /** @return known StorageAutogrow values. */ + /** + * Gets known StorageAutogrow values. + * + * @return known StorageAutogrow values. + */ public static Collection values() { return values(StorageAutogrow.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/StorageProfile.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/StorageProfile.java index 4123af8135f6..8cac5ee79745 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/StorageProfile.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/StorageProfile.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.mariadb.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; /** Storage Profile properties of a server. */ @Fluent public final class StorageProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageProfile.class); - /* * Backup retention days for the server. */ 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..95c819a4f41e 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 @@ -5,20 +5,18 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Tags object for patch operations. */ @Fluent public final class TagsObject { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsObject.class); - /* * 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..33ebdbd6315b 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); @@ -47,7 +47,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 list of query statistics. + * @return a list of query statistics as paginated response with {@link PagedIterable}. */ PagedIterable listByServer( String resourceGroupName, String serverName, TopQueryStatisticsInput parameters); @@ -62,7 +62,7 @@ PagedIterable listByServer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable listByServer( String resourceGroupName, String serverName, TopQueryStatisticsInput parameters, 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..dda8c0ccbc41 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,28 @@ 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.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.mariadb.fluent.models.TopQueryStatisticsInputProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Input to get top query statistics. */ -@JsonFlatten @Fluent -public class TopQueryStatisticsInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TopQueryStatisticsInput.class); - - /* - * Max number of top queries to return. - */ - @JsonProperty(value = "properties.numberOfTopQueries", required = true) - private int numberOfTopQueries; - - /* - * Aggregation function name. - */ - @JsonProperty(value = "properties.aggregationFunction", required = true) - private String aggregationFunction; - - /* - * Observed metric name. - */ - @JsonProperty(value = "properties.observedMetric", required = true) - private String observedMetric; - +public final class TopQueryStatisticsInput { /* - * 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 TopQueryStatisticsInputProperties innerProperties = new TopQueryStatisticsInputProperties(); - /* - * 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 +34,7 @@ public class TopQueryStatisticsInput { * @return the numberOfTopQueries value. */ public int numberOfTopQueries() { - return this.numberOfTopQueries; + return this.innerProperties() == null ? 0 : this.innerProperties().numberOfTopQueries(); } /** @@ -69,7 +44,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 +57,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 +67,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 +80,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 +90,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 +103,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 +113,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 +126,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 +136,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 +149,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 +159,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 +172,15 @@ 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 + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property observationEndTime in model TopQueryStatisticsInput")); - } - if (aggregationWindow() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property aggregationWindow in model TopQueryStatisticsInput")); + "Missing required property innerProperties in model TopQueryStatisticsInput")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TopQueryStatisticsInput.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatisticsResultList.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatisticsResultList.java index 34259725d838..492b3064b846 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatisticsResultList.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/TopQueryStatisticsResultList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.QueryStatisticInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of query statistics. */ @Immutable public final class TopQueryStatisticsResultList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TopQueryStatisticsResultList.class); - /* * The list of top query statistics. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRule.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRule.java index 659f6d999945..8a109f0ee3c7 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRule.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRule.java @@ -52,6 +52,13 @@ public interface VirtualNetworkRule { */ VirtualNetworkRuleState state(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.mariadb.fluent.models.VirtualNetworkRuleInner object. * diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRuleListResult.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRuleListResult.java index 295513846dc3..f3d07270a73d 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRuleListResult.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRuleListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.VirtualNetworkRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of virtual network rules. */ @Immutable public final class VirtualNetworkRuleListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRuleListResult.class); - /* * Array of results. */ diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRuleState.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRuleState.java index f90722f19bcf..d321a18ae3c6 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRuleState.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/VirtualNetworkRuleState.java @@ -36,7 +36,11 @@ public static VirtualNetworkRuleState fromString(String name) { return fromString(name, VirtualNetworkRuleState.class); } - /** @return known VirtualNetworkRuleState values. */ + /** + * Gets known VirtualNetworkRuleState values. + * + * @return known VirtualNetworkRuleState values. + */ public static Collection values() { return values(VirtualNetworkRuleState.class); } 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..ee9d25e181b6 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); @@ -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 list of virtual network rules in a server. + * @return a list of virtual network rules in a server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName); @@ -84,7 +84,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 list of virtual network rules in a server. + * @return a list of virtual network rules in a server as paginated response with {@link PagedIterable}. */ PagedIterable listByServer(String resourceGroupName, String serverName, 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..c89bba61309d 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); @@ -47,7 +47,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 list of wait statistics. + * @return a list of wait statistics as paginated response with {@link PagedIterable}. */ PagedIterable listByServer( String resourceGroupName, String serverName, WaitStatisticsInput parameters); @@ -62,7 +62,7 @@ PagedIterable listByServer( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if 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 as paginated response with {@link PagedIterable}. */ PagedIterable listByServer( String resourceGroupName, String serverName, WaitStatisticsInput parameters, 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..0dad813c74c8 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,28 @@ 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.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.mariadb.fluent.models.WaitStatisticsInputProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Input to get wait statistics. */ -@JsonFlatten @Fluent -public class WaitStatisticsInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticsInput.class); - +public final class WaitStatisticsInput { /* - * 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 +34,7 @@ public class WaitStatisticsInput { * @return the observationStartTime value. */ public OffsetDateTime observationStartTime() { - return this.observationStartTime; + return this.innerProperties() == null ? null : this.innerProperties().observationStartTime(); } /** @@ -51,7 +44,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 +57,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 +67,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 +80,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 +90,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 +103,15 @@ 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 + if (innerProperties() == null) { + throw LOGGER .logExceptionAsError( new IllegalArgumentException( - "Missing required property observationEndTime in model WaitStatisticsInput")); - } - if (aggregationWindow() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property aggregationWindow in model WaitStatisticsInput")); + "Missing required property innerProperties in model WaitStatisticsInput")); + } else { + innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(WaitStatisticsInput.class); } diff --git a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatisticsResultList.java b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatisticsResultList.java index e3a46a2ede10..6d76098f32e9 100644 --- a/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatisticsResultList.java +++ b/sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/models/WaitStatisticsResultList.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.mariadb.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.mariadb.fluent.models.WaitStatisticInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of wait statistics. */ @Immutable public final class WaitStatisticsResultList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WaitStatisticsResultList.class); - /* * The list of wait statistics. */ 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); + } +}