diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 6bf7c0b885b3..6ed4c83cd344 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -453,7 +453,7 @@ com.azure.resourcemanager:azure-resourcemanager-deviceregistry;1.0.0;1.1.0-beta. com.azure.resourcemanager:azure-resourcemanager-standbypool;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-edgezones;1.0.0-beta.2;1.0.0-beta.3 com.azure.resourcemanager:azure-resourcemanager-devopsinfrastructure;1.0.0;1.1.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-oracledatabase;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-oracledatabase;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-informaticadatamanagement;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-mongocluster;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-computefleet;1.0.0;1.1.0-beta.1 diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md index a06f079f8052..8ad49a2d6dd9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md @@ -1,14 +1,478 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0 (2025-06-04) -### Features Added +- Azure Resource Manager Oracle Database client library for Java. This package contains Microsoft Azure SDK for Oracle Database Management SDK. Package api-version 2025-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.DnsPrivateZoneListResult` was removed + +#### `models.GiVersionListResult` was removed + +#### `models.VirtualNetworkAddressListResult` was removed + +#### `models.DbServerListResult` was removed + +#### `models.AutonomousDbVersionListResult` was removed + +#### `models.SystemVersionListResult` was removed + +#### `models.AutonomousDatabaseListResult` was removed + +#### `models.DbNodeListResult` was removed + +#### `models.DnsPrivateViewListResult` was removed + +#### `models.AutonomousDatabaseCharacterSetListResult` was removed + +#### `models.DayOfWeekUpdate` was removed + +#### `models.AutonomousDatabaseBackupListResult` was removed + +#### `models.DbSystemShapeListResult` was removed + +#### `models.CloudVmClusterListResult` was removed + +#### `models.AutonomousDatabaseNationalCharacterSetListResult` was removed + +#### `models.OperationListResult` was removed + +#### `models.OracleSubscriptionListResult` was removed + +#### `models.CloudExadataInfrastructureListResult` was removed + +#### `models.ScheduledOperationsTypeUpdate` was removed + +#### `models.AllConnectionStringType` was modified + +* `withMedium(java.lang.String)` was removed +* `withHigh(java.lang.String)` was removed +* `withLow(java.lang.String)` was removed + +#### `models.CloudVmClusterProperties` was modified + +* `java.lang.Float ocpuCount()` -> `java.lang.Double ocpuCount()` +* `withOcpuCount(java.lang.Float)` was removed + +#### `models.ProfileType` was modified + +* `withProtocol(models.ProtocolType)` was removed +* `withIsRegional(java.lang.Boolean)` was removed +* `withTlsAuthentication(models.TlsAuthenticationType)` was removed +* `withDisplayName(java.lang.String)` was removed +* `withValue(java.lang.String)` was removed +* `withConsumerGroup(models.ConsumerGroup)` was removed +* `withSyntaxFormat(models.SyntaxFormatType)` was removed +* `withHostFormat(models.HostFormatType)` was removed +* `withSessionMode(models.SessionModeType)` was removed + +#### `models.DbSystemShapeProperties` was modified + +* `java.lang.Integer availableCoreCount()` -> `int availableCoreCount()` + +#### `models.ApexDetailsType` was modified + +* `withOrdsVersion(java.lang.String)` was removed +* `withApexVersion(java.lang.String)` was removed + +#### `models.DbSystemShapes` was modified + +* `listByLocation(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.AutonomousDatabaseCloneProperties` was modified + +* `localStandbyDb()` was removed +* `availableUpgradeVersions()` was removed +* `privateEndpoint()` was removed +* `memoryPerOracleComputeUnitInGbs()` was removed +* `supportedRegionsToCloneTo()` was removed +* `connectionStrings()` was removed +* `actualUsedDataStorageSizeInTbs()` was removed +* `nextLongTermBackupTimestamp()` was removed +* `lifecycleState()` was removed +* `lifecycleDetails()` was removed +* `timeReclamationOfFreeAutonomousDatabase()` was removed +* `inMemoryAreaInGbs()` was removed +* `apexDetails()` was removed +* `failedDataRecoveryInSeconds()` was removed +* `connectionUrls()` was removed +* `provisioningState()` was removed +* `dataSafeStatus()` was removed +* `sqlWebDeveloperUrl()` was removed +* `timeCreated()` was removed +* `isPreview()` was removed +* `peerDbIds()` was removed +* `usedDataStorageSizeInTbs()` was removed +* `timeDeletionOfFreeAutonomousDatabase()` was removed +* `timeMaintenanceEnd()` was removed +* `ociUrl()` was removed +* `withComputeCount(java.lang.Float)` was removed +* `localDisasterRecoveryType()` was removed +* `timeDataGuardRoleChanged()` was removed +* `timeOfLastRefreshPoint()` was removed +* `usedDataStorageSizeInGbs()` was removed +* `isRemoteDataGuardEnabled()` was removed +* `timeOfLastRefresh()` was removed +* `allocatedStorageSizeInTbs()` was removed +* `operationsInsightsStatus()` was removed +* `timeOfLastSwitchover()` was removed +* `serviceConsoleUrl()` was removed +* `timeLocalDataGuardEnabled()` was removed +* `timeMaintenanceBegin()` was removed +* `timeOfLastFailover()` was removed +* `ocid()` was removed +* `provisionableCpus()` was removed + +#### `models.ExadataIormConfig` was modified + +* `withLifecycleDetails(java.lang.String)` was removed +* `withObjective(models.Objective)` was removed +* `withDbPlans(java.util.List)` was removed +* `withLifecycleState(models.IormLifecycleState)` was removed + +#### `models.DnsPrivateZoneProperties` was modified + +* `java.lang.Boolean isProtected()` -> `boolean isProtected()` +* `java.lang.Integer serial()` -> `int serial()` + +#### `models.AutonomousDatabaseUpdateProperties` was modified + +* `models.ScheduledOperationsTypeUpdate scheduledOperations()` -> `models.ScheduledOperationsType scheduledOperations()` +* `withScheduledOperations(models.ScheduledOperationsTypeUpdate)` was removed +* `withComputeCount(java.lang.Float)` was removed +* `java.lang.Float computeCount()` -> `java.lang.Double computeCount()` + +#### `models.GiVersions` was modified + +* `listByLocation(java.lang.String,com.azure.core.util.Context)` was removed + +#### `OracleDatabaseManager` was modified + +* `fluent.OracleDatabaseResourceManager serviceClient()` -> `fluent.OracleDatabaseManagementClient serviceClient()` + +#### `models.AutonomousDatabaseBaseProperties` was modified + +* `java.lang.Float computeCount()` -> `java.lang.Double computeCount()` +* `withComputeCount(java.lang.Float)` was removed + +#### `models.DbIormConfig` was modified + +* `withShare(java.lang.Integer)` was removed +* `withFlashCacheLimit(java.lang.String)` was removed +* `withDbName(java.lang.String)` was removed + +#### `models.ConnectionUrlType` was modified + +* `withSqlDevWebUrl(java.lang.String)` was removed +* `withApexUrl(java.lang.String)` was removed +* `withOrdsUrl(java.lang.String)` was removed +* `withGraphStudioUrl(java.lang.String)` was removed +* `withMongoDbUrl(java.lang.String)` was removed +* `withMachineLearningNotebookUrl(java.lang.String)` was removed +* `withDatabaseTransformsUrl(java.lang.String)` was removed + +#### `models.AutonomousDatabaseProperties` was modified + +* `timeOfLastFailover()` was removed +* `allocatedStorageSizeInTbs()` was removed +* `isRemoteDataGuardEnabled()` was removed +* `actualUsedDataStorageSizeInTbs()` was removed +* `timeLocalDataGuardEnabled()` was removed +* `failedDataRecoveryInSeconds()` was removed +* `provisionableCpus()` was removed +* `timeMaintenanceBegin()` was removed +* `sqlWebDeveloperUrl()` was removed +* `timeOfLastSwitchover()` was removed +* `provisioningState()` was removed +* `withComputeCount(java.lang.Float)` was removed +* `ocid()` was removed +* `timeMaintenanceEnd()` was removed +* `isPreview()` was removed +* `availableUpgradeVersions()` was removed +* `usedDataStorageSizeInGbs()` was removed +* `connectionStrings()` was removed +* `serviceConsoleUrl()` was removed +* `privateEndpoint()` was removed +* `timeCreated()` was removed +* `peerDbIds()` was removed +* `memoryPerOracleComputeUnitInGbs()` was removed +* `timeOfLastRefreshPoint()` was removed +* `dataSafeStatus()` was removed +* `nextLongTermBackupTimestamp()` was removed +* `timeReclamationOfFreeAutonomousDatabase()` was removed +* `timeDeletionOfFreeAutonomousDatabase()` was removed +* `lifecycleState()` was removed +* `localDisasterRecoveryType()` was removed +* `operationsInsightsStatus()` was removed +* `connectionUrls()` was removed +* `timeOfLastRefresh()` was removed +* `timeDataGuardRoleChanged()` was removed +* `localStandbyDb()` was removed +* `inMemoryAreaInGbs()` was removed +* `apexDetails()` was removed +* `lifecycleDetails()` was removed +* `supportedRegionsToCloneTo()` was removed +* `ociUrl()` was removed +* `usedDataStorageSizeInTbs()` was removed + +#### `models.DnsPrivateViewProperties` was modified + +* `java.lang.Boolean isProtected()` -> `boolean isProtected()` + +#### `models.AutonomousDatabaseStandbySummary` was modified + +* `withLifecycleDetails(java.lang.String)` was removed +* `withLifecycleState(models.AutonomousDatabaseLifecycleState)` was removed +* `withLagTimeInSeconds(java.lang.Integer)` was removed +* `withTimeDataGuardRoleChanged(java.lang.String)` was removed +* `withTimeDisasterRecoveryRoleChanged(java.lang.String)` was removed + +#### `models.ConnectionStringType` was modified + +* `withMedium(java.lang.String)` was removed +* `withProfiles(java.util.List)` was removed +* `withHigh(java.lang.String)` was removed +* `withAllConnectionStrings(models.AllConnectionStringType)` was removed +* `withLow(java.lang.String)` was removed +* `withDedicated(java.lang.String)` was removed + +#### `models.CloudVmClusterUpdateProperties` was modified + +* `java.lang.Float ocpuCount()` -> `java.lang.Double ocpuCount()` +* `withOcpuCount(java.lang.Float)` was removed + +### Features Added + +* `models.DefinedFileSystemConfiguration` was added + +* `models.ExadbVmClusterProperties` was added + +* `models.GridImageType` was added + +* `models.ExascaleDbStorageVault` was added + +* `implementation.models.ExascaleDbStorageVaultListResult` was added + +* `implementation.models.AutonomousDatabaseBackupListResult` was added + +* `models.DbNodeDetails` was added + +* `models.ExascaleDbStorageVault$UpdateStages` was added + +* `models.FlexComponent` was added + +* `models.ExascaleDbStorageVaults` was added + +* `implementation.models.ExascaleDbNodeListResult` was added + +* `implementation.models.CloudExadataInfrastructureListResult` was added + +* `models.ExascaleDbStorageDetails` was added + +* `models.ExadbVmClusters` was added + +* `implementation.models.GiMinorVersionListResult` was added + +* `models.AutonomousDatabaseCrossRegionDisasterRecoveryProperties` was added + +* `implementation.models.OracleSubscriptionListResult` was added + +* `models.RemoveVirtualMachineFromExadbVmClusterDetails` was added + +* `models.FlexComponents` was added + +* `models.AutonomousDatabaseFromBackupTimestampProperties` was added + +* `models.AzureSubscriptions` was added + +* `models.ExadbVmClusterUpdate` was added + +* `models.ExascaleDbStorageVaultLifecycleState` was added + +* `models.DisasterRecoveryConfigurationDetails` was added + +* `models.ShapeFamily` was added + +* `implementation.models.AutonomousDatabaseCharacterSetListResult` was added + +* `implementation.models.DnsPrivateZoneListResult` was added + +* `implementation.models.DbSystemShapeListResult` was added + +* `implementation.models.DnsPrivateViewListResult` was added + +* `models.ExadbVmClusterUpdateProperties` was added + +* `models.ExadbVmCluster` was added + +* `models.ExadbVmCluster$UpdateStages` was added + +* `models.GiMinorVersions` was added + +* `implementation.models.OperationListResult` was added + +* `implementation.models.DbServerListResult` was added + +* `models.ExascaleDbStorageVault$DefinitionStages` was added + +* `models.ExadbVmCluster$Definition` was added + +* `implementation.models.GiVersionListResult` was added + +* `models.FileSystemConfigurationDetails` was added + +* `implementation.models.DbNodeListResult` was added + +* `implementation.models.FlexComponentListResult` was added + +* `models.ExascaleDbNodeProperties` was added + +* `models.SystemShapes` was added + +* `models.AddSubscriptionOperationState` was added + +* `models.ExadbVmClusterLifecycleState` was added + +* `implementation.models.CloudVmClusterListResult` was added + +* `models.ExadbVmCluster$DefinitionStages` was added + +* `models.FlexComponentProperties` was added + +* `models.ExascaleDbNodes` was added + +* `models.HardwareType` was added + +* `models.ExascaleDbStorageVault$Definition` was added + +* `implementation.models.ExadbVmClusterListResult` was added + +* `implementation.models.AutonomousDatabaseNationalCharacterSetListResult` was added + +* `models.GiMinorVersionProperties` was added + +* `models.ExadbVmClusterStorageDetails` was added + +* `models.ExascaleDbStorageVaultProperties` was added + +* `models.ExascaleDbStorageVaultTagsUpdate` was added + +* `models.DbActionResponse` was added + +* `implementation.models.AutonomousDbVersionListResult` was added + +* `implementation.models.AutonomousDatabaseListResult` was added + +* `models.ExascaleDbStorageInputDetails` was added + +* `models.GiMinorVersion` was added + +* `models.ExascaleDbStorageVault$Update` was added + +* `implementation.models.VirtualNetworkAddressListResult` was added + +* `models.ExascaleDbNode` was added + +* `implementation.models.SystemVersionListResult` was added + +* `models.ExadbVmCluster$Update` was added + +#### `models.CloudVmClusterProperties` was modified + +* `withOcpuCount(java.lang.Double)` was added +* `fileSystemConfigurationDetails()` was added +* `computeModel()` was added +* `withFileSystemConfigurationDetails(java.util.List)` was added + +#### `models.DbServerProperties` was modified + +* `computeModel()` was added + +#### `models.OracleSubscriptions` was modified + +* `addAzureSubscriptions(models.AzureSubscriptions)` was added +* `addAzureSubscriptions(models.AzureSubscriptions,com.azure.core.util.Context)` was added + +#### `models.PeerDbDetails` was modified + +* `withPeerDbLocation(java.lang.String)` was added +* `peerDbLocation()` was added +* `withPeerDbOcid(java.lang.String)` was added +* `peerDbOcid()` was added + +#### `models.DbSystemShapeProperties` was modified + +* `areServerTypesSupported()` was added +* `displayName()` was added +* `shapeName()` was added +* `computeModel()` was added + +#### `models.AutonomousDatabase` was modified + +* `changeDisasterRecoveryConfiguration(models.DisasterRecoveryConfigurationDetails)` was added +* `changeDisasterRecoveryConfiguration(models.DisasterRecoveryConfigurationDetails,com.azure.core.util.Context)` was added + +#### `models.DbSystemShapes` was modified + +* `listByLocation(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.AutonomousDatabaseCloneProperties` was modified + +* `withComputeCount(java.lang.Double)` was added + +#### `models.AutonomousDatabaseUpdateProperties` was modified + +* `withScheduledOperations(models.ScheduledOperationsType)` was added +* `withComputeCount(java.lang.Double)` was added + +#### `models.GiVersions` was modified + +* `listByLocation(java.lang.String,models.SystemShapes,java.lang.String,com.azure.core.util.Context)` was added + +#### `OracleDatabaseManager` was modified + +* `exascaleDbNodes()` was added +* `exadbVmClusters()` was added +* `flexComponents()` was added +* `giMinorVersions()` was added +* `exascaleDbStorageVaults()` was added + +#### `models.OracleSubscriptionProperties` was modified + +* `addSubscriptionOperationState()` was added +* `lastOperationStatusDetail()` was added +* `azureSubscriptionIds()` was added + +#### `models.CloudExadataInfrastructureProperties` was modified + +* `computeModel()` was added +* `databaseServerType()` was added +* `withStorageServerType(java.lang.String)` was added +* `storageServerType()` was added +* `withDatabaseServerType(java.lang.String)` was added +* `definedFileSystemConfiguration()` was added + +#### `models.AutonomousDatabases` was modified + +* `changeDisasterRecoveryConfiguration(java.lang.String,java.lang.String,models.DisasterRecoveryConfigurationDetails)` was added +* `changeDisasterRecoveryConfiguration(java.lang.String,java.lang.String,models.DisasterRecoveryConfigurationDetails,com.azure.core.util.Context)` was added + +#### `models.AutonomousDatabaseBaseProperties` was modified + +* `remoteDisasterRecoveryConfiguration()` was added +* `timeDisasterRecoveryRoleChanged()` was added +* `withComputeCount(java.lang.Double)` was added + +#### `models.AutonomousDatabaseProperties` was modified + +* `withComputeCount(java.lang.Double)` was added + +#### `models.CloudVmClusterUpdateProperties` was modified -### Other Changes +* `withFileSystemConfigurationDetails(java.util.List)` was added +* `withOcpuCount(java.lang.Double)` was added +* `fileSystemConfigurationDetails()` was added ## 1.0.0 (2024-07-04) diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/README.md b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/README.md index 6f63d61f0465..5d13be7ec2f6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/README.md +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/README.md @@ -1,8 +1,8 @@ -# Azure Resource Manager OracleDatabase client library for Java +# Azure Resource Manager Oracle Database client library for Java -Azure Resource Manager OracleDatabase client library for Java. +Azure Resource Manager Oracle Database client library for Java. -This package contains Microsoft Azure SDK for OracleDatabase Management SDK. Package tag package-2023-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Oracle Database Management SDK. Package api-version 2025-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-oracledatabase - 1.1.0-beta.1 + 1.1.0 ``` [//]: # ({x-version-update-end}) @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ OracleDatabaseManager manager = OracleDatabaseManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md index aaab69e3b790..d95fc1259660 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md @@ -3,92 +3,70 @@ ## AutonomousDatabaseBackups -- [CreateOrUpdate](#autonomousdatabasebackups_createorupdate) -- [Delete](#autonomousdatabasebackups_delete) -- [Get](#autonomousdatabasebackups_get) - [ListByAutonomousDatabase](#autonomousdatabasebackups_listbyautonomousdatabase) - [Update](#autonomousdatabasebackups_update) -## AutonomousDatabaseCharacterSets - -- [Get](#autonomousdatabasecharactersets_get) -- [ListByLocation](#autonomousdatabasecharactersets_listbylocation) - -## AutonomousDatabaseNationalCharacterSets - -- [Get](#autonomousdatabasenationalcharactersets_get) -- [ListByLocation](#autonomousdatabasenationalcharactersets_listbylocation) - -## AutonomousDatabaseVersions - -- [Get](#autonomousdatabaseversions_get) -- [ListByLocation](#autonomousdatabaseversions_listbylocation) - ## AutonomousDatabases -- [CreateOrUpdate](#autonomousdatabases_createorupdate) -- [Delete](#autonomousdatabases_delete) +- [ChangeDisasterRecoveryConfiguration](#autonomousdatabases_changedisasterrecoveryconfiguration) - [Failover](#autonomousdatabases_failover) - [GenerateWallet](#autonomousdatabases_generatewallet) -- [GetByResourceGroup](#autonomousdatabases_getbyresourcegroup) -- [List](#autonomousdatabases_list) -- [ListByResourceGroup](#autonomousdatabases_listbyresourcegroup) - [Restore](#autonomousdatabases_restore) -- [Shrink](#autonomousdatabases_shrink) - [Switchover](#autonomousdatabases_switchover) -- [Update](#autonomousdatabases_update) ## CloudExadataInfrastructures - [AddStorageCapacity](#cloudexadatainfrastructures_addstoragecapacity) -- [CreateOrUpdate](#cloudexadatainfrastructures_createorupdate) -- [Delete](#cloudexadatainfrastructures_delete) -- [GetByResourceGroup](#cloudexadatainfrastructures_getbyresourcegroup) -- [List](#cloudexadatainfrastructures_list) -- [ListByResourceGroup](#cloudexadatainfrastructures_listbyresourcegroup) -- [Update](#cloudexadatainfrastructures_update) ## CloudVmClusters - [AddVms](#cloudvmclusters_addvms) -- [CreateOrUpdate](#cloudvmclusters_createorupdate) -- [Delete](#cloudvmclusters_delete) -- [GetByResourceGroup](#cloudvmclusters_getbyresourcegroup) -- [List](#cloudvmclusters_list) -- [ListByResourceGroup](#cloudvmclusters_listbyresourcegroup) - [ListPrivateIpAddresses](#cloudvmclusters_listprivateipaddresses) - [RemoveVms](#cloudvmclusters_removevms) -- [Update](#cloudvmclusters_update) ## DbNodes - [Action](#dbnodes_action) -- [Get](#dbnodes_get) - [ListByCloudVmCluster](#dbnodes_listbycloudvmcluster) ## DbServers -- [Get](#dbservers_get) - [ListByCloudExadataInfrastructure](#dbservers_listbycloudexadatainfrastructure) ## DbSystemShapes -- [Get](#dbsystemshapes_get) - [ListByLocation](#dbsystemshapes_listbylocation) -## DnsPrivateViews +## ExadbVmClusters + +- [RemoveVms](#exadbvmclusters_removevms) + +## ExascaleDbNodes -- [Get](#dnsprivateviews_get) -- [ListByLocation](#dnsprivateviews_listbylocation) +- [Action](#exascaledbnodes_action) +- [ListByParent](#exascaledbnodes_listbyparent) -## DnsPrivateZones +## ExascaleDbStorageVaults -- [Get](#dnsprivatezones_get) -- [ListByLocation](#dnsprivatezones_listbylocation) +- [Create](#exascaledbstoragevaults_create) +- [Delete](#exascaledbstoragevaults_delete) +- [GetByResourceGroup](#exascaledbstoragevaults_getbyresourcegroup) +- [List](#exascaledbstoragevaults_list) +- [ListByResourceGroup](#exascaledbstoragevaults_listbyresourcegroup) +- [Update](#exascaledbstoragevaults_update) + +## FlexComponents + +- [Get](#flexcomponents_get) +- [ListByParent](#flexcomponents_listbyparent) + +## GiMinorVersions + +- [Get](#giminorversions_get) +- [ListByParent](#giminorversions_listbyparent) ## GiVersions -- [Get](#giversions_get) - [ListByLocation](#giversions_listbylocation) ## Operations @@ -97,199 +75,79 @@ ## OracleSubscriptions -- [CreateOrUpdate](#oraclesubscriptions_createorupdate) -- [Delete](#oraclesubscriptions_delete) -- [Get](#oraclesubscriptions_get) -- [List](#oraclesubscriptions_list) +- [AddAzureSubscriptions](#oraclesubscriptions_addazuresubscriptions) - [ListActivationLinks](#oraclesubscriptions_listactivationlinks) - [ListCloudAccountDetails](#oraclesubscriptions_listcloudaccountdetails) - [ListSaasSubscriptionDetails](#oraclesubscriptions_listsaassubscriptiondetails) - [Update](#oraclesubscriptions_update) -## SystemVersions - -- [Get](#systemversions_get) -- [ListByLocation](#systemversions_listbylocation) - ## VirtualNetworkAddresses -- [CreateOrUpdate](#virtualnetworkaddresses_createorupdate) -- [Delete](#virtualnetworkaddresses_delete) -- [Get](#virtualnetworkaddresses_get) - [ListByCloudVmCluster](#virtualnetworkaddresses_listbycloudvmcluster) -### AutonomousDatabaseBackups_CreateOrUpdate +### AutonomousDatabaseBackups_ListByAutonomousDatabase ```java -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties; - /** - * Samples for AutonomousDatabaseBackups CreateOrUpdate. + * Samples for CloudExadataInfrastructures AddStorageCapacity. */ -public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create. - * json - */ - /** - * Sample code: Create Autonomous Database Backup. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createAutonomousDatabaseBackup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .define("1711644130") - .withExistingAutonomousDatabase("rg000", "databasedb1") - .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("Nightly Backup") - .withRetentionPeriodInDays(365)) - .create(); - } - +public final class CloudExadataInfrastructuresAddStorageCapacitySamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create. - * json + * x-ms-original-file: 2025-03-01/exaInfra_addStorageCapacity.json */ /** - * Sample code: AutonomousDatabaseBackups_CreateOrUpdate. + * Sample code: CloudExadataInfrastructures_addStorageCapacity. * * @param manager Entry point to OracleDatabaseManager. */ - public static void autonomousDatabaseBackupsCreateOrUpdate( + public static void cloudExadataInfrastructuresAddStorageCapacity( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .define("1711644130") - .withExistingAutonomousDatabase("rg000", "databasedb1") - .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("Nightly Backup") - .withRetentionPeriodInDays(365)) - .create(); - } -} -``` - -### AutonomousDatabaseBackups_Delete - -```java -/** - * Samples for AutonomousDatabaseBackups Delete. - */ -public final class AutonomousDatabaseBackupsDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete. - * json - */ - /** - * Sample code: Delete Autonomous Database Backup. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - deleteAutonomousDatabaseBackup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .delete("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete. - * json - */ - /** - * Sample code: AutonomousDatabaseBackups_Delete. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabaseBackupsDelete(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .delete("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + manager.cloudExadataInfrastructures().addStorageCapacity("rg000", "infra1", com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabaseBackups_Get +### AutonomousDatabaseBackups_Update ```java -/** - * Samples for AutonomousDatabaseBackups Get. - */ -public final class AutonomousDatabaseBackupsGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get. - * json - */ - /** - * Sample code: Get Autonomous Database Backup. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getAutonomousDatabaseBackup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get. - * json - */ - /** - * Sample code: AutonomousDatabaseBackups_Get. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabaseBackupsGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabaseBackups_ListByAutonomousDatabase +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import java.util.HashMap; +import java.util.Map; -```java /** - * Samples for AutonomousDatabaseBackups ListByAutonomousDatabase. + * Samples for ExascaleDbStorageVaults Update. */ -public final class AutonomousDatabaseBackupsListByAutonomousDatabaseSamples { +public final class ExascaleDbStorageVaultsUpdateSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseBackup_listByParent.json + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_Update_MaximumSet_Gen.json */ /** - * Sample code: List Autonomous Database Backups by Autonomous Database. + * Sample code: ExascaleDbStorageVaults_Update_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listAutonomousDatabaseBackupsByAutonomousDatabase( + public static void exascaleDbStorageVaultsUpdateMaximumSet( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .listByAutonomousDatabase("rg000", "databasedb1", com.azure.core.util.Context.NONE); + ExascaleDbStorageVault resource = manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key6179", "fakeTokenPlaceholder")).apply(); } - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseBackup_listByParent.json - */ - /** - * Sample code: AutonomousDatabaseBackups_ListByAutonomousDatabase. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void autonomousDatabaseBackupsListByAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .listByAutonomousDatabase("rg000", "databasedb1", com.azure.core.util.Context.NONE); + // Use "Map.of" if available + @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; } } ``` -### AutonomousDatabaseBackups_Update +### AutonomousDatabases_ChangeDisasterRecoveryConfiguration ```java import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackup; @@ -299,27 +157,7 @@ import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackup; */ public final class AutonomousDatabaseBackupsUpdateSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch. - * json - */ - /** - * Sample code: Patch Autonomous Database Backup. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - patchAutonomousDatabaseBackup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - AutonomousDatabaseBackup resource = manager.autonomousDatabaseBackups() - .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch. - * json + * x-ms-original-file: 2025-03-01/autonomousDatabaseBackup_patch.json */ /** * Sample code: AutonomousDatabaseBackups_Update. @@ -336,1050 +174,131 @@ public final class AutonomousDatabaseBackupsUpdateSamples { } ``` -### AutonomousDatabaseCharacterSets_Get - -```java -/** - * Samples for AutonomousDatabaseCharacterSets Get. - */ -public final class AutonomousDatabaseCharacterSetsGetSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseCharacterSet_get.json - */ - /** - * Sample code: Get autonomous db character set. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getAutonomousDbCharacterSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseCharacterSets() - .getWithResponse("eastus", "DATABASE", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabaseCharacterSets_ListByLocation +### AutonomousDatabases_Failover ```java -/** - * Samples for AutonomousDatabaseCharacterSets ListByLocation. - */ -public final class AutonomousDatabaseCharacterSetsListByLocationSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseCharacterSet_listByLocation.json - */ - /** - * Sample code: List autonomous db character sets by location. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listAutonomousDbCharacterSetsByLocation( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabaseNationalCharacterSets_Get +import com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails; +import com.azure.resourcemanager.oracledatabase.models.GenerateType; -```java /** - * Samples for AutonomousDatabaseNationalCharacterSets Get. + * Samples for AutonomousDatabases GenerateWallet. */ -public final class AutonomousDatabaseNationalCharacterSetsGetSamples { +public final class AutonomousDatabasesGenerateWalletSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseNationalCharacterSet_get.json + * x-ms-original-file: 2025-03-01/autonomousDatabase_generateWallet.json */ /** - * Sample code: Get autonomous db national character set. + * Sample code: AutonomousDatabases_generateWallet. * * @param manager Entry point to OracleDatabaseManager. */ public static void - getAutonomousDbNationalCharacterSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseNationalCharacterSets() - .getWithResponse("eastus", "NATIONAL", com.azure.core.util.Context.NONE); + autonomousDatabasesGenerateWallet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .generateWalletWithResponse("rg000", "databasedb1", + new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) + .withIsRegional(false) + .withPassword("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } ``` -### AutonomousDatabaseNationalCharacterSets_ListByLocation +### AutonomousDatabases_GenerateWallet ```java /** - * Samples for AutonomousDatabaseNationalCharacterSets ListByLocation. + * Samples for ExascaleDbStorageVaults List. */ -public final class AutonomousDatabaseNationalCharacterSetsListByLocationSamples { +public final class ExascaleDbStorageVaultsListSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseNationalCharacterSet_listByLocation.json + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_ListBySubscription_MaximumSet_Gen.json */ /** - * Sample code: List autonomous db national character sets by location. + * Sample code: ExascaleDbStorageVaults_ListBySubscription_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listAutonomousDbNationalCharacterSetsByLocation( + public static void exascaleDbStorageVaultsListBySubscriptionMaximumSet( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseNationalCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabaseVersions_Get - -```java -/** - * Samples for AutonomousDatabaseVersions Get. - */ -public final class AutonomousDatabaseVersionsGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get. - * json - */ - /** - * Sample code: Get an autonomous version. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getAnAutonomousVersion(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseVersions().getWithResponse("eastus", "18.4.0.0", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabaseVersions_ListByLocation - -```java -/** - * Samples for AutonomousDatabaseVersions ListByLocation. - */ -public final class AutonomousDatabaseVersionsListByLocationSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseVersion_listByLocation.json - */ - /** - * Sample code: List an autonomous versions by location. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listAnAutonomousVersionsByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_CreateOrUpdate - -```java -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCloneProperties; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseProperties; -import com.azure.resourcemanager.oracledatabase.models.CloneType; -import com.azure.resourcemanager.oracledatabase.models.ComputeModel; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for AutonomousDatabases CreateOrUpdate. - */ -public final class AutonomousDatabasesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json - */ - /** - * Sample code: AutonomousDatabases_CreateOrUpdate. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabasesCreateOrUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .define("databasedb1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new AutonomousDatabaseProperties().withAdminPassword("fakeTokenPlaceholder") - .withCharacterSet("AL32UTF8") - .withComputeCount(2.0F) - .withComputeModel(ComputeModel.ECPU) - .withDataStorageSizeInTbs(1) - .withDbVersion("18.4.0.0") - .withDisplayName("example_autonomous_databasedb1") - .withNcharacterSet("AL16UTF16") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1")) - .create(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json - */ - /** - * Sample code: Create Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .define("databasedb1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new AutonomousDatabaseProperties().withAdminPassword("fakeTokenPlaceholder") - .withCharacterSet("AL32UTF8") - .withComputeCount(2.0F) - .withComputeModel(ComputeModel.ECPU) - .withDataStorageSizeInTbs(1) - .withDbVersion("18.4.0.0") - .withDisplayName("example_autonomous_databasedb1") - .withNcharacterSet("AL16UTF16") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1")) - .create(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create. - * json - */ - /** - * Sample code: Create clone Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createCloneAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .define("databasedb1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new AutonomousDatabaseCloneProperties().withAdminPassword("fakeTokenPlaceholder") - .withCharacterSet("AL32UTF8") - .withComputeCount(2.0F) - .withComputeModel(ComputeModel.ECPU) - .withDataStorageSizeInTbs(1) - .withDisplayName("example_autonomous_databasedb1_clone") - .withNcharacterSet("AL16UTF16") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") - .withSourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1") - .withCloneType(CloneType.FULL)) - .create(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create. - * json - */ - /** - * Sample code: AutonomousDatabases_CreateOrUpdate_clone. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabasesCreateOrUpdateClone(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .define("databasedb1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new AutonomousDatabaseCloneProperties().withAdminPassword("fakeTokenPlaceholder") - .withCharacterSet("AL32UTF8") - .withComputeCount(2.0F) - .withComputeModel(ComputeModel.ECPU) - .withDataStorageSizeInTbs(1) - .withDisplayName("example_autonomous_databasedb1_clone") - .withNcharacterSet("AL16UTF16") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") - .withSourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1") - .withCloneType(CloneType.FULL)) - .create(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### AutonomousDatabases_Delete - -```java -/** - * Samples for AutonomousDatabases Delete. - */ -public final class AutonomousDatabasesDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_delete.json - */ - /** - * Sample code: Delete Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - deleteAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().delete("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_Failover - -```java -import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; - -/** - * Samples for AutonomousDatabases Failover. - */ -public final class AutonomousDatabasesFailoverSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json - */ - /** - * Sample code: AutonomousDatabases_Failover. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabasesFailover(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json - */ - /** - * Sample code: Perform failover action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performFailoverActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), - com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_GenerateWallet - -```java -import com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails; -import com.azure.resourcemanager.oracledatabase.models.GenerateType; - -/** - * Samples for AutonomousDatabases GenerateWallet. - */ -public final class AutonomousDatabasesGenerateWalletSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabase_generateWallet.json - */ - /** - * Sample code: Generate wallet action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void generateWalletActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .generateWalletWithResponse("rg000", "databasedb1", - new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) - .withIsRegional(false) - .withPassword("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_GetByResourceGroup - -```java -/** - * Samples for AutonomousDatabases GetByResourceGroup. - */ -public final class AutonomousDatabasesGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json - */ - /** - * Sample code: Get Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json - */ - /** - * Sample code: AutonomousDatabases_Get. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void autonomousDatabasesGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_List - -```java -/** - * Samples for AutonomousDatabases List. - */ -public final class AutonomousDatabasesListSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabase_listBySubscription.json - */ - /** - * Sample code: List Autonomous Database by subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listAutonomousDatabaseBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().list(com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_ListByResourceGroup - -```java -/** - * Samples for AutonomousDatabases ListByResourceGroup. - */ -public final class AutonomousDatabasesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabase_listByResourceGroup.json - */ - /** - * Sample code: List Autonomous Database by resource group. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listAutonomousDatabaseByResourceGroup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_Restore - -```java -import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; -import java.time.OffsetDateTime; - -/** - * Samples for AutonomousDatabases Restore. - */ -public final class AutonomousDatabasesRestoreSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json - */ - /** - * Sample code: AutonomousDatabases_Restore. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabasesRestore(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .restore("rg000", "databasedb1", - new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json - */ - /** - * Sample code: Perform restore action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performRestoreActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .restore("rg000", "databasedb1", - new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), - com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_Shrink - -```java -/** - * Samples for AutonomousDatabases Shrink. - */ -public final class AutonomousDatabasesShrinkSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_shrink.json - */ - /** - * Sample code: Perform shrink action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performShrinkActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().shrink("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_Switchover - -```java -import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; - -/** - * Samples for AutonomousDatabases Switchover. - */ -public final class AutonomousDatabasesSwitchoverSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover. - * json - */ - /** - * Sample code: Perform switchover action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performSwitchoverActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .switchover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover. - * json - */ - /** - * Sample code: AutonomousDatabases_Switchover. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabasesSwitchover(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .switchover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), - com.azure.core.util.Context.NONE); - } -} -``` - -### AutonomousDatabases_Update - -```java -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabase; - -/** - * Samples for AutonomousDatabases Update. - */ -public final class AutonomousDatabasesUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_patch.json - */ - /** - * Sample code: Patch Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void patchAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - AutonomousDatabase resource = manager.autonomousDatabases() - .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } -} -``` - -### CloudExadataInfrastructures_AddStorageCapacity - -```java -/** - * Samples for CloudExadataInfrastructures AddStorageCapacity. - */ -public final class CloudExadataInfrastructuresAddStorageCapacitySamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_addStorageCapacity.json - */ - /** - * Sample code: Perform add storage capacity on exadata infra. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performAddStorageCapacityOnExadataInfra( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures().addStorageCapacity("rg000", "infra1", com.azure.core.util.Context.NONE); - } -} -``` - -### CloudExadataInfrastructures_CreateOrUpdate - -```java -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for CloudExadataInfrastructures CreateOrUpdate. - */ -public final class CloudExadataInfrastructuresCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_create.json - */ - /** - * Sample code: Create Exadata Infrastructure. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures() - .define("infra1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withZones(Arrays.asList("1")) - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new CloudExadataInfrastructureProperties().withComputeCount(100) - .withStorageCount(10) - .withShape("EXADATA.X9M") - .withDisplayName("infra 1")) - .create(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### CloudExadataInfrastructures_Delete - -```java -/** - * Samples for CloudExadataInfrastructures Delete. - */ -public final class CloudExadataInfrastructuresDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_delete.json - */ - /** - * Sample code: Delete Exadata Infrastructure. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - deleteExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures().delete("rg000", "infra1", com.azure.core.util.Context.NONE); - } -} -``` - -### CloudExadataInfrastructures_GetByResourceGroup - -```java -/** - * Samples for CloudExadataInfrastructures GetByResourceGroup. - */ -public final class CloudExadataInfrastructuresGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json - */ - /** - * Sample code: Get Exadata Infrastructure. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures() - .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE); - } -} -``` - -### CloudExadataInfrastructures_List - -```java -/** - * Samples for CloudExadataInfrastructures List. - */ -public final class CloudExadataInfrastructuresListSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listBySubscription.json - */ - /** - * Sample code: List Exadata Infrastructure by subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listExadataInfrastructureBySubscription( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures().list(com.azure.core.util.Context.NONE); - } -} -``` - -### CloudExadataInfrastructures_ListByResourceGroup - -```java -/** - * Samples for CloudExadataInfrastructures ListByResourceGroup. - */ -public final class CloudExadataInfrastructuresListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listByResourceGroup. - * json - */ - /** - * Sample code: List Exadata Infrastructure by resource group. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listExadataInfrastructureByResourceGroup( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); - } -} -``` - -### CloudExadataInfrastructures_Update - -```java -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructure; - -/** - * Samples for CloudExadataInfrastructures Update. - */ -public final class CloudExadataInfrastructuresUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_patch.json - */ - /** - * Sample code: Patch Exadata Infrastructure. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - patchExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - CloudExadataInfrastructure resource = manager.cloudExadataInfrastructures() - .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } -} -``` - -### CloudVmClusters_AddVms - -```java -import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; -import java.util.Arrays; - -/** - * Samples for CloudVmClusters AddVms. - */ -public final class CloudVmClustersAddVmsSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_addVms.json - */ - /** - * Sample code: Add VMs to VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void addVMsToVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .addVms("rg000", "cluster1", - new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), - com.azure.core.util.Context.NONE); - } -} -``` - -### CloudVmClusters_CreateOrUpdate - -```java -import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterProperties; -import com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions; -import com.azure.resourcemanager.oracledatabase.models.LicenseModel; -import com.azure.resourcemanager.oracledatabase.models.NsgCidr; -import com.azure.resourcemanager.oracledatabase.models.PortRange; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for CloudVmClusters CreateOrUpdate. - */ -public final class CloudVmClustersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_create.json - */ - /** - * Sample code: Create VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void createVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .define("cluster1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new CloudVmClusterProperties().withDataStorageSizeInTbs(1000.0D) - .withDbNodeStorageSizeInGbs(1000) - .withMemorySizeInGbs(1000) - .withTimeZone("UTC") - .withHostname("hostname1") - .withDomain("domain1") - .withCpuCoreCount(2) - .withOcpuCount(3.0F) - .withClusterName("cluster1") - .withDataStoragePercentage(100) - .withIsLocalBackupEnabled(false) - .withCloudExadataInfrastructureId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/cloudExadataInfrastructures/infra1") - .withIsSparseDiskgroupEnabled(false) - .withSshPublicKeys(Arrays.asList("ssh-key 1")) - .withLicenseModel(LicenseModel.LICENSE_INCLUDED) - .withScanListenerPortTcp(1050) - .withScanListenerPortTcpSsl(1025) - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") - .withGiVersion("19.0.0.0") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withBackupSubnetCidr("172.17.5.0/24") - .withNsgCidrs(Arrays.asList( - new NsgCidr().withSource("10.0.0.0/16") - .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)), - new NsgCidr().withSource("10.10.0.0/24"))) - .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(false) - .withIsHealthMonitoringEnabled(false) - .withIsIncidentLogsEnabled(false)) - .withDisplayName("cluster 1") - .withDbServers(Arrays.asList("ocid1..aaaa"))) - .create(); - } - - // Use "Map.of" if available - @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; - } -} -``` - -### CloudVmClusters_Delete - -```java -/** - * Samples for CloudVmClusters Delete. - */ -public final class CloudVmClustersDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_delete.json - */ - /** - * Sample code: Delete VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void deleteVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters().delete("rg000", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### CloudVmClusters_GetByResourceGroup - -```java -/** - * Samples for CloudVmClusters GetByResourceGroup. - */ -public final class CloudVmClustersGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json - */ - /** - * Sample code: Get VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters().getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE); + manager.exascaleDbStorageVaults().list(com.azure.core.util.Context.NONE); } } ``` -### CloudVmClusters_List +### AutonomousDatabases_Restore ```java +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; + /** - * Samples for CloudVmClusters List. + * Samples for DbNodes Action. */ -public final class CloudVmClustersListSamples { +public final class DbNodesActionSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listBySubscription. - * json + * x-ms-original-file: 2025-03-01/dbNodes_action.json */ /** - * Sample code: List VM Clusters by subscription. + * Sample code: DbNodes_Action. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - listVMClustersBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters().list(com.azure.core.util.Context.NONE); + public static void dbNodesAction(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes() + .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), + com.azure.core.util.Context.NONE); } } ``` -### CloudVmClusters_ListByResourceGroup +### AutonomousDatabases_Switchover ```java /** - * Samples for CloudVmClusters ListByResourceGroup. + * Samples for DbSystemShapes ListByLocation. */ -public final class CloudVmClustersListByResourceGroupSamples { +public final class DbSystemShapesListByLocationSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listByResourceGroup. - * json + * x-ms-original-file: 2025-03-01/dbSystemShapes_listByLocation.json */ /** - * Sample code: List VM Clusters by resource group. + * Sample code: DbSystemShapes_listByLocation. * * @param manager Entry point to OracleDatabaseManager. */ public static void - listVMClustersByResourceGroup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + dbSystemShapesListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystemShapes().listByLocation("eastus", null, com.azure.core.util.Context.NONE); } } ``` -### CloudVmClusters_ListPrivateIpAddresses +### CloudExadataInfrastructures_AddStorageCapacity ```java -import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; +import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; /** - * Samples for CloudVmClusters ListPrivateIpAddresses. + * Samples for OracleSubscriptions Update. */ -public final class CloudVmClustersListPrivateIpAddressesSamples { +public final class OracleSubscriptionsUpdateSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * vmClusters_listPrivateIpAddresses.json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_patch.json */ /** - * Sample code: List Private IP Addresses for VM Cluster. + * Sample code: OracleSubscriptions_update. * * @param manager Entry point to OracleDatabaseManager. */ public static void - listPrivateIPAddressesForVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .listPrivateIpAddressesWithResponse("rg000", "cluster1", - new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), - com.azure.core.util.Context.NONE); + oracleSubscriptionsUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); } } ``` -### CloudVmClusters_RemoveVms +### CloudVmClusters_AddVms ```java import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; @@ -1390,15 +309,15 @@ import java.util.Arrays; */ public final class CloudVmClustersRemoveVmsSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_removeVms.json + * x-ms-original-file: 2025-03-01/vmClusters_removeVms.json */ /** - * Sample code: Remove VMs from VM Cluster. + * Sample code: CloudVmClusters_removeVms. * * @param manager Entry point to OracleDatabaseManager. */ - public static void removeVMsFromVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void + cloudVmClustersRemoveVms(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.cloudVmClusters() .removeVms("rg000", "cluster1", new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa")), com.azure.core.util.Context.NONE); @@ -1406,94 +325,86 @@ public final class CloudVmClustersRemoveVmsSamples { } ``` -### CloudVmClusters_Update +### CloudVmClusters_ListPrivateIpAddresses ```java -import com.azure.resourcemanager.oracledatabase.models.CloudVmCluster; +import com.azure.resourcemanager.oracledatabase.models.DbNodeDetails; +import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; +import java.util.Arrays; /** - * Samples for CloudVmClusters Update. + * Samples for ExadbVmClusters RemoveVms. */ -public final class CloudVmClustersUpdateSamples { +public final class ExadbVmClustersRemoveVmsSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_patch.json + * x-ms-original-file: 2025-03-01/ExadbVmClusters_RemoveVms_MaximumSet_Gen.json */ /** - * Sample code: Patch VM Cluster. + * Sample code: ExadbVmClusters_RemoveVms_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void patchVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - CloudVmCluster resource = manager.cloudVmClusters() - .getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); + public static void + exadbVmClustersRemoveVmsMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .removeVms("rgopenapi", "vmClusterName", new RemoveVirtualMachineFromExadbVmClusterDetails() + .withDbNodes(Arrays.asList(new DbNodeDetails().withDbNodeId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName"))), + com.azure.core.util.Context.NONE); } } ``` -### DbNodes_Action +### CloudVmClusters_RemoveVms ```java -import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; -import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; +import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; +import java.util.Arrays; /** - * Samples for DbNodes Action. + * Samples for CloudVmClusters AddVms. */ -public final class DbNodesActionSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json - */ - /** - * Sample code: DbNodes_Action. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void dbNodesAction(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes() - .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), - com.azure.core.util.Context.NONE); - } - +public final class CloudVmClustersAddVmsSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + * x-ms-original-file: 2025-03-01/vmClusters_addVms.json */ /** - * Sample code: VM actions on DbNodes of VM Cluster. + * Sample code: CloudVmClusters_addVms. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - vmActionsOnDbNodesOfVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes() - .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), + public static void cloudVmClustersAddVms(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .addVms("rg000", "cluster1", + new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), com.azure.core.util.Context.NONE); } } ``` -### DbNodes_Get +### DbNodes_Action ```java +import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; + /** - * Samples for DbNodes Get. + * Samples for CloudVmClusters ListPrivateIpAddresses. */ -public final class DbNodesGetSamples { +public final class CloudVmClustersListPrivateIpAddressesSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + * x-ms-original-file: 2025-03-01/vmClusters_listPrivateIpAddresses.json */ /** - * Sample code: Get DbNode. + * Sample code: CloudVmClusters_listPrivateIpAddresses. * * @param manager Entry point to OracleDatabaseManager. */ - public static void getDbNode(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes().getWithResponse("rg000", "cluster1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + public static void + cloudVmClustersListPrivateIpAddresses(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.cloudVmClusters() + .listPrivateIpAddressesWithResponse("rg000", "cluster1", + new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), + com.azure.core.util.Context.NONE); } } ``` @@ -1501,43 +412,26 @@ public final class DbNodesGetSamples { ### DbNodes_ListByCloudVmCluster ```java -/** - * Samples for DbNodes ListByCloudVmCluster. - */ -public final class DbNodesListByCloudVmClusterSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_listByParent.json - */ - /** - * Sample code: List DbNodes by VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listDbNodesByVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### DbServers_Get +import com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions; +import java.util.Arrays; -```java /** - * Samples for DbServers Get. + * Samples for OracleSubscriptions AddAzureSubscriptions. */ -public final class DbServersGetSamples { +public final class OracleSubscriptionsAddAzureSubscriptionsSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_addAzureSubscriptions.json */ /** - * Sample code: Get DbServer by parent. + * Sample code: OracleSubscriptions_addAzureSubscriptions. * * @param manager Entry point to OracleDatabaseManager. */ - public static void getDbServerByParent(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbServers().getWithResponse("rg000", "infra1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + public static void oracleSubscriptionsAddAzureSubscriptions( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions() + .addAzureSubscriptions(new AzureSubscriptions().withAzureSubscriptionIds( + Arrays.asList("00000000-0000-0000-0000-000000000001")), com.azure.core.util.Context.NONE); } } ``` @@ -1546,578 +440,565 @@ public final class DbServersGetSamples { ```java /** - * Samples for DbServers ListByCloudExadataInfrastructure. + * Samples for ExascaleDbStorageVaults ListByResourceGroup. */ -public final class DbServersListByCloudExadataInfrastructureSamples { +public final class ExascaleDbStorageVaultsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_listByParent.json + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet_Gen.json */ /** - * Sample code: List DbServers by Exadata Infrastructure. + * Sample code: ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - listDbServersByExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); + public static void exascaleDbStorageVaultsListByResourceGroupMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); } } ``` -### DbSystemShapes_Get +### DbSystemShapes_ListByLocation ```java /** - * Samples for DbSystemShapes Get. + * Samples for AutonomousDatabaseBackups ListByAutonomousDatabase. */ -public final class DbSystemShapesGetSamples { +public final class AutonomousDatabaseBackupsListByAutonomousDatabaseSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + * x-ms-original-file: 2025-03-01/autonomousDatabaseBackup_listByParent.json */ /** - * Sample code: Get a DbSystemShape by name. + * Sample code: AutonomousDatabaseBackups_ListByAutonomousDatabase. * * @param manager Entry point to OracleDatabaseManager. */ - public static void getADbSystemShapeByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().getWithResponse("eastus", "EXADATA.X9M", com.azure.core.util.Context.NONE); + public static void autonomousDatabaseBackupsListByAutonomousDatabase( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabaseBackups() + .listByAutonomousDatabase("rg000", "databasedb1", com.azure.core.util.Context.NONE); } } ``` -### DbSystemShapes_ListByLocation +### ExadbVmClusters_RemoveVms ```java +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; + /** - * Samples for DbSystemShapes ListByLocation. + * Samples for ExascaleDbNodes Action. */ -public final class DbSystemShapesListByLocationSamples { +public final class ExascaleDbNodesActionSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_listByLocation. - * json + * x-ms-original-file: 2025-03-01/ExascaleDbNodes_Action_MaximumSet_Gen.json */ /** - * Sample code: List DbSystemShapes by location. + * Sample code: ExascaleDbNodes_Action_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ public static void - listDbSystemShapesByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().listByLocation("eastus", com.azure.core.util.Context.NONE); + exascaleDbNodesActionMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes() + .action("rgopenapi", "vmClusterName", "dbNodeName", new DbNodeAction().withAction(DbNodeActionEnum.START), + com.azure.core.util.Context.NONE); } } ``` -### DnsPrivateViews_Get +### ExascaleDbNodes_Action ```java /** - * Samples for DnsPrivateViews Get. + * Samples for ExascaleDbNodes ListByParent. */ -public final class DnsPrivateViewsGetSamples { +public final class ExascaleDbNodesListByParentSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + * x-ms-original-file: 2025-03-01/ExascaleDbNodes_ListByParent_MaximumSet_Gen.json */ /** - * Sample code: Get a DnsPrivateView by name. + * Sample code: ExascaleDbNodes_ListByParent_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ public static void - getADnsPrivateViewByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dnsPrivateViews().getWithResponse("eastus", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + exascaleDbNodesListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes().listByParent("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE); } } ``` -### DnsPrivateViews_ListByLocation +### ExascaleDbNodes_ListByParent ```java /** - * Samples for DnsPrivateViews ListByLocation. + * Samples for OracleSubscriptions ListSaasSubscriptionDetails. */ -public final class DnsPrivateViewsListByLocationSamples { +public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_listByLocation. - * json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_listSaasSubscriptionDetails.json */ /** - * Sample code: List DnsPrivateViews by location. + * Sample code: OracleSubscriptions_listSaasSubscriptionDetails. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - listDnsPrivateViewsByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dnsPrivateViews().listByLocation("eastus", com.azure.core.util.Context.NONE); + public static void oracleSubscriptionsListSaasSubscriptionDetails( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); } } ``` -### DnsPrivateZones_Get +### ExascaleDbStorageVaults_Create ```java /** - * Samples for DnsPrivateZones Get. + * Samples for DbNodes ListByCloudVmCluster. */ -public final class DnsPrivateZonesGetSamples { +public final class DbNodesListByCloudVmClusterSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + * x-ms-original-file: 2025-03-01/dbNodes_listByParent.json */ /** - * Sample code: Get a DnsPrivateZone by name. + * Sample code: DbNodes_listByCloudVmCluster. * * @param manager Entry point to OracleDatabaseManager. */ public static void - getADnsPrivateZoneByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dnsPrivateZones() - .getWithResponse("eastus", "example-dns-private-zone", com.azure.core.util.Context.NONE); + dbNodesListByCloudVmCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbNodes().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); } } ``` -### DnsPrivateZones_ListByLocation +### ExascaleDbStorageVaults_Delete ```java /** - * Samples for DnsPrivateZones ListByLocation. + * Samples for ExascaleDbStorageVaults GetByResourceGroup. */ -public final class DnsPrivateZonesListByLocationSamples { +public final class ExascaleDbStorageVaultsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_listByLocation. - * json + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json */ /** - * Sample code: List DnsPrivateZones by location. + * Sample code: ExascaleDbStorageVaults_Get_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ public static void - listDnsPrivateZonesByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dnsPrivateZones().listByLocation("eastus", com.azure.core.util.Context.NONE); + exascaleDbStorageVaultsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE); } } ``` -### GiVersions_Get +### ExascaleDbStorageVaults_GetByResourceGroup ```java +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + /** - * Samples for GiVersions Get. + * Samples for FlexComponents ListByParent. */ -public final class GiVersionsGetSamples { +public final class FlexComponentsListByParentSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + * x-ms-original-file: 2025-03-01/FlexComponents_ListByParent_MaximumSet_Gen.json */ /** - * Sample code: Get a GiVersion by name. + * Sample code: FlexComponents_ListByParent_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void getAGiVersionByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giVersions().getWithResponse("eastus", "19.0.0.0", com.azure.core.util.Context.NONE); + public static void + flexComponentsListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.flexComponents().listByParent("eastus", SystemShapes.EXADATA_X11M, com.azure.core.util.Context.NONE); } } ``` -### GiVersions_ListByLocation +### ExascaleDbStorageVaults_List ```java +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + /** * Samples for GiVersions ListByLocation. */ public final class GiVersionsListByLocationSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_listByLocation.json + * x-ms-original-file: 2025-03-01/GiVersions_ListByLocation_MaximumSet_Gen.json */ /** - * Sample code: List GiVersions by location. + * Sample code: List GiVersions by location - generated by [MaximumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - listGiVersionsByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + public static void listGiVersionsByLocationGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions() + .listByLocation("eastus", SystemShapes.fromString( + "osixsklyaauhoqnkxvnvsqeqenhzogntqnpubldrrfvqncwetdtwqwjjcvspwhgecbimdlulwcubikebrdzmidrucgtsuqvytkqutmbyrvvyioxpocpmuwiivyanjzucaegihztluuvpznzaoakfsselumhhsvrtrbzwpjhcihsvyouonlxdluwhqfxoqvgthkaxppbydtqjntscgzbivfdcaobbkthrbdjwpejirqmbly"), + null, com.azure.core.util.Context.NONE); } -} -``` - -### Operations_List -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/operations_list.json + * x-ms-original-file: 2025-03-01/GiVersions_ListByLocation_MinimumSet_Gen.json */ /** - * Sample code: List Operations. + * Sample code: List GiVersions by location - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listOperations(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void listGiVersionsByLocationGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().listByLocation("eastus", null, null, com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_CreateOrUpdate +### ExascaleDbStorageVaults_ListByResourceGroup ```java -import com.azure.resourcemanager.oracledatabase.fluent.models.OracleSubscriptionInner; -import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionProperties; -import com.azure.resourcemanager.oracledatabase.models.Plan; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType; /** - * Samples for OracleSubscriptions CreateOrUpdate. + * Samples for AutonomousDatabases ChangeDisasterRecoveryConfiguration. */ -public final class OracleSubscriptionsCreateOrUpdateSamples { +public final class AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_create.json + * x-ms-original-file: 2025-03-01/autonomousDatabase_changeDisasterRecoveryConfiguration.json */ /** - * Sample code: Create or Update Oracle Subscription. + * Sample code: AutonomousDatabases_ChangeDisasterRecoveryConfiguration. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - createOrUpdateOracleSubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions() - .createOrUpdate(new OracleSubscriptionInner().withProperties(new OracleSubscriptionProperties()) - .withPlan(new Plan().withName("plan1") - .withPublisher("publisher1") - .withProduct("product1") - .withPromotionCode("fakeTokenPlaceholder") - .withVersion("alpha")), + public static void autonomousDatabasesChangeDisasterRecoveryConfiguration( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .changeDisasterRecoveryConfiguration("rg000", "databasedb1", + new DisasterRecoveryConfigurationDetails().withDisasterRecoveryType(DisasterRecoveryType.ADG) + .withIsReplicateAutomaticBackups(false), com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_Delete +### ExascaleDbStorageVaults_Update ```java /** - * Samples for OracleSubscriptions Delete. + * Samples for OracleSubscriptions ListActivationLinks. */ -public final class OracleSubscriptionsDeleteSamples { +public final class OracleSubscriptionsListActivationLinksSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_delete.json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_listActivationLinks.json */ /** - * Sample code: Delete Oracle Subscription. + * Sample code: OracleSubscriptions_listActivationLinks. * * @param manager Entry point to OracleDatabaseManager. */ public static void - deleteOracleSubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().delete(com.azure.core.util.Context.NONE); + oracleSubscriptionsListActivationLinks(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_Get +### FlexComponents_Get ```java /** - * Samples for OracleSubscriptions Get. + * Samples for ExascaleDbStorageVaults Delete. */ -public final class OracleSubscriptionsGetSamples { +public final class ExascaleDbStorageVaultsDeleteSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_get.json + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_Delete_MaximumSet_Gen.json */ /** - * Sample code: Get Oracle Subscription. + * Sample code: ExascaleDbStorageVaults_Delete_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void getOracleSubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().getWithResponse(com.azure.core.util.Context.NONE); + public static void exascaleDbStorageVaultsDeleteMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().delete("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_List +### FlexComponents_ListByParent ```java +import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; +import java.time.OffsetDateTime; + /** - * Samples for OracleSubscriptions List. + * Samples for AutonomousDatabases Restore. */ -public final class OracleSubscriptionsListSamples { +public final class AutonomousDatabasesRestoreSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * oracleSubscriptions_listBySubscription.json + * x-ms-original-file: 2025-03-01/autonomousDatabase_restore.json */ /** - * Sample code: List Oracle Subscriptions by subscription. + * Sample code: AutonomousDatabases_Restore. * * @param manager Entry point to OracleDatabaseManager. */ public static void - listOracleSubscriptionsBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().list(com.azure.core.util.Context.NONE); + autonomousDatabasesRestore(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .restore("rg000", "databasedb1", + new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), + com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_ListActivationLinks +### GiMinorVersions_Get ```java +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageInputDetails; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for OracleSubscriptions ListActivationLinks. + * Samples for ExascaleDbStorageVaults Create. */ -public final class OracleSubscriptionsListActivationLinksSamples { +public final class ExascaleDbStorageVaultsCreateSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * oracleSubscriptions_listActivationLinks.json + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_Create_MaximumSet_Gen.json */ /** - * Sample code: List Activation Links for the Oracle Subscription. + * Sample code: ExascaleDbStorageVaults_Create_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listActivationLinksForTheOracleSubscription( + public static void exascaleDbStorageVaultsCreateMaximumSet( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); + manager.exascaleDbStorageVaults() + .define("vmClusterName") + .withRegion("ltguhzffucaytqg") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key7827", "fakeTokenPlaceholder")) + .withProperties(new ExascaleDbStorageVaultProperties().withAdditionalFlashCacheInPercent(0) + .withDescription("dmnvnnduldfmrmkkvvsdtuvmsmruxzzpsfdydgytlckutfozephjygjetrauvbdfcwmti") + .withDisplayName( + "hbsybtelyvhpalemszcvartlhwvskrnpiveqfblvkdihoytqaotdgsgauvgivzaftfgeiwlyeqzssicwrrnlxtsmeakbcsxabjlt") + .withHighCapacityDatabaseStorageInput(new ExascaleDbStorageInputDetails().withTotalSizeInGbs(21)) + .withTimeZone( + "ltrbozwxjunncicrtzjrpqnqrcjgghohztrdlbfjrbkpenopyldwolslwgrgumjfkyovvkzcuxjujuxtjjzubvqvnhrswnbdgcbslopeofmtepbrrlymqwwszvsglmyuvlcuejshtpokirwklnwpcykhyinjmlqvxtyixlthtdishhmtipbygsayvgqzfrprgppylydlcskbmvwctxifdltippfvsxiughqbojqpqrekxsotnqsk")) + .withZones(Arrays.asList("qk")) + .create(); + } + + // Use "Map.of" if available + @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; } } ``` -### OracleSubscriptions_ListCloudAccountDetails +### GiMinorVersions_ListByParent ```java /** - * Samples for OracleSubscriptions ListCloudAccountDetails. + * Samples for Operations List. */ -public final class OracleSubscriptionsListCloudAccountDetailsSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * oracleSubscriptions_listCloudAccountDetails.json + * x-ms-original-file: 2025-03-01/operations_list.json */ /** - * Sample code: List Cloud Account details for the Oracle Subscription. + * Sample code: Operations_list. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listCloudAccountDetailsForTheOracleSubscription( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); + public static void operationsList(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_ListSaasSubscriptionDetails +### GiVersions_ListByLocation ```java +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; + /** - * Samples for OracleSubscriptions ListSaasSubscriptionDetails. + * Samples for GiMinorVersions ListByParent. */ -public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { +public final class GiMinorVersionsListByParentSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * oracleSubscriptions_listSaasSubscriptionDetails.json + * x-ms-original-file: 2025-03-01/GiMinorVersions_ListByParent_MaximumSet_Gen.json */ /** - * Sample code: List Saas Subscription details for the Oracle Subscription. + * Sample code: GiMinorVersions_ListByParent_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listSaasSubscriptionDetailsForTheOracleSubscription( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); + public static void + giMinorVersionsListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giMinorVersions() + .listByParent("eastus", "giVersionName", ShapeFamily.fromString("rtfcosvtlpeeqoicsjqggtgc"), null, + com.azure.core.util.Context.NONE); } } ``` -### OracleSubscriptions_Update +### Operations_List ```java -import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; +import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; /** - * Samples for OracleSubscriptions Update. + * Samples for AutonomousDatabases Switchover. */ -public final class OracleSubscriptionsUpdateSamples { +public final class AutonomousDatabasesSwitchoverSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_patch.json + * x-ms-original-file: 2025-03-01/autonomousDatabase_switchover.json */ /** - * Sample code: Patch Oracle Subscription. + * Sample code: AutonomousDatabases_Switchover. * * @param manager Entry point to OracleDatabaseManager. */ - public static void patchOracleSubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); + public static void + autonomousDatabasesSwitchover(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .switchover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), + com.azure.core.util.Context.NONE); } } ``` -### SystemVersions_Get +### OracleSubscriptions_AddAzureSubscriptions ```java +import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; + /** - * Samples for SystemVersions Get. + * Samples for AutonomousDatabases Failover. */ -public final class SystemVersionsGetSamples { +public final class AutonomousDatabasesFailoverSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + * x-ms-original-file: 2025-03-01/autonomousDatabase_failover.json */ /** - * Sample code: systemVersions_listSystemVersions. + * Sample code: AutonomousDatabases_Failover. * * @param manager Entry point to OracleDatabaseManager. */ public static void - systemVersionsListSystemVersions(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.systemVersions().getWithResponse("eastus", "22.x", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json - */ - /** - * Sample code: Get Exadata System Version. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getExadataSystemVersion(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.systemVersions().getWithResponse("eastus", "22.x", com.azure.core.util.Context.NONE); + autonomousDatabasesFailover(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), + com.azure.core.util.Context.NONE); } } ``` -### SystemVersions_ListByLocation +### OracleSubscriptions_ListActivationLinks ```java /** - * Samples for SystemVersions ListByLocation. + * Samples for FlexComponents Get. */ -public final class SystemVersionsListByLocationSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation. - * json - */ - /** - * Sample code: List Exadata System Versions by the provided filter. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listExadataSystemVersionsByTheProvidedFilter( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.systemVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); - } - +public final class FlexComponentsGetSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation. - * json + * x-ms-original-file: 2025-03-01/FlexComponents_Get_MaximumSet_Gen.json */ /** - * Sample code: systemVersions_listByLocation. + * Sample code: FlexComponents_Get_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ public static void - systemVersionsListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.systemVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + flexComponentsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.flexComponents().getWithResponse("eastus", "flexComponent", com.azure.core.util.Context.NONE); } } ``` -### VirtualNetworkAddresses_CreateOrUpdate +### OracleSubscriptions_ListCloudAccountDetails ```java -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProperties; - /** - * Samples for VirtualNetworkAddresses CreateOrUpdate. + * Samples for DbServers ListByCloudExadataInfrastructure. */ -public final class VirtualNetworkAddressesCreateOrUpdateSamples { +public final class DbServersListByCloudExadataInfrastructureSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_create. - * json + * x-ms-original-file: 2025-03-01/dbServers_listByParent.json */ /** - * Sample code: Create Virtual Network Address. + * Sample code: DbServers_listByCloudExadataInfrastructure. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - createVirtualNetworkAddress(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.virtualNetworkAddresses() - .define("hostname1") - .withExistingCloudVmCluster("rg000", "cluster1") - .withProperties( - new VirtualNetworkAddressProperties().withIpAddress("192.168.0.1").withVmOcid("ocid1..aaaa")) - .create(); + public static void dbServersListByCloudExadataInfrastructure( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); } } ``` -### VirtualNetworkAddresses_Delete +### OracleSubscriptions_ListSaasSubscriptionDetails ```java /** - * Samples for VirtualNetworkAddresses Delete. + * Samples for OracleSubscriptions ListCloudAccountDetails. */ -public final class VirtualNetworkAddressesDeleteSamples { +public final class OracleSubscriptionsListCloudAccountDetailsSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_delete. - * json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_listCloudAccountDetails.json */ /** - * Sample code: Delete Virtual Network Address. + * Sample code: OracleSubscriptions_listCloudAccountDetails. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - deleteVirtualNetworkAddress(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.virtualNetworkAddresses().delete("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); + public static void oracleSubscriptionsListCloudAccountDetails( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); } } ``` -### VirtualNetworkAddresses_Get +### OracleSubscriptions_Update ```java /** - * Samples for VirtualNetworkAddresses Get. + * Samples for GiMinorVersions Get. */ -public final class VirtualNetworkAddressesGetSamples { +public final class GiMinorVersionsGetSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + * x-ms-original-file: 2025-03-01/GiMinorVersions_Get_MaximumSet_Gen.json */ /** - * Sample code: Get Virtual Network Address. + * Sample code: GiMinorVersions_Get_MaximumSet. * * @param manager Entry point to OracleDatabaseManager. */ public static void - getVirtualNetworkAddress(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.virtualNetworkAddresses() - .getWithResponse("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); + giMinorVersionsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giMinorVersions() + .getWithResponse("eastus", "giVersionName", "giMinorVersionName", com.azure.core.util.Context.NONE); } } ``` @@ -2130,16 +1011,15 @@ public final class VirtualNetworkAddressesGetSamples { */ public final class VirtualNetworkAddressesListByCloudVmClusterSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * virtualNetworkAddresses_listByParent.json + * x-ms-original-file: 2025-03-01/virtualNetworkAddresses_listByParent.json */ /** - * Sample code: List Virtual Network Addresses by VM Cluster. + * Sample code: VirtualNetworkAddresses_listByCloudVmCluster. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - listVirtualNetworkAddressesByVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void virtualNetworkAddressesListByCloudVmCluster( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.virtualNetworkAddresses().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/pom.xml b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/pom.xml index 9e28f17338a5..51ba511943c2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/pom.xml +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-oracledatabase - 1.1.0-beta.1 + 1.1.0 jar - Microsoft Azure SDK for OracleDatabase Management - This package contains Microsoft Azure SDK for OracleDatabase Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-09-01. + Microsoft Azure SDK for Oracle Database Management + This package contains Microsoft Azure SDK for Oracle Database Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2025-03-01. https://github.com/Azure/azure-sdk-for-java @@ -47,11 +47,6 @@ 0 - - com.azure - azure-json - 1.5.0 - com.azure azure-core @@ -74,5 +69,10 @@ 1.16.1 test + + com.azure + azure-json + 1.5.0 + diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/OracleDatabaseManager.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/OracleDatabaseManager.java index 18d1874303e1..0692a8127a2d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/OracleDatabaseManager.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/OracleDatabaseManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase; @@ -11,24 +11,25 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; 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.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.oracledatabase.fluent.OracleDatabaseResourceManager; +import com.azure.resourcemanager.oracledatabase.fluent.OracleDatabaseManagementClient; import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseBackupsImpl; import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseCharacterSetsImpl; import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseNationalCharacterSetsImpl; -import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabasesImpl; import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseVersionsImpl; +import com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabasesImpl; import com.azure.resourcemanager.oracledatabase.implementation.CloudExadataInfrastructuresImpl; import com.azure.resourcemanager.oracledatabase.implementation.CloudVmClustersImpl; import com.azure.resourcemanager.oracledatabase.implementation.DbNodesImpl; @@ -36,17 +37,22 @@ import com.azure.resourcemanager.oracledatabase.implementation.DbSystemShapesImpl; import com.azure.resourcemanager.oracledatabase.implementation.DnsPrivateViewsImpl; import com.azure.resourcemanager.oracledatabase.implementation.DnsPrivateZonesImpl; +import com.azure.resourcemanager.oracledatabase.implementation.ExadbVmClustersImpl; +import com.azure.resourcemanager.oracledatabase.implementation.ExascaleDbNodesImpl; +import com.azure.resourcemanager.oracledatabase.implementation.ExascaleDbStorageVaultsImpl; +import com.azure.resourcemanager.oracledatabase.implementation.FlexComponentsImpl; +import com.azure.resourcemanager.oracledatabase.implementation.GiMinorVersionsImpl; import com.azure.resourcemanager.oracledatabase.implementation.GiVersionsImpl; import com.azure.resourcemanager.oracledatabase.implementation.OperationsImpl; -import com.azure.resourcemanager.oracledatabase.implementation.OracleDatabaseResourceManagerBuilder; +import com.azure.resourcemanager.oracledatabase.implementation.OracleDatabaseManagementClientBuilder; import com.azure.resourcemanager.oracledatabase.implementation.OracleSubscriptionsImpl; import com.azure.resourcemanager.oracledatabase.implementation.SystemVersionsImpl; import com.azure.resourcemanager.oracledatabase.implementation.VirtualNetworkAddressesImpl; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackups; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSets; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSets; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabases; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseVersions; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabases; import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructures; import com.azure.resourcemanager.oracledatabase.models.CloudVmClusters; import com.azure.resourcemanager.oracledatabase.models.DbNodes; @@ -54,6 +60,11 @@ import com.azure.resourcemanager.oracledatabase.models.DbSystemShapes; import com.azure.resourcemanager.oracledatabase.models.DnsPrivateViews; import com.azure.resourcemanager.oracledatabase.models.DnsPrivateZones; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusters; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodes; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaults; +import com.azure.resourcemanager.oracledatabase.models.FlexComponents; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersions; import com.azure.resourcemanager.oracledatabase.models.GiVersions; import com.azure.resourcemanager.oracledatabase.models.Operations; import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptions; @@ -63,6 +74,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -72,17 +84,23 @@ public final class OracleDatabaseManager { private Operations operations; - private AutonomousDatabases autonomousDatabases; - private CloudExadataInfrastructures cloudExadataInfrastructures; + private DbServers dbServers; + private CloudVmClusters cloudVmClusters; - private AutonomousDatabaseCharacterSets autonomousDatabaseCharacterSets; + private VirtualNetworkAddresses virtualNetworkAddresses; - private AutonomousDatabaseNationalCharacterSets autonomousDatabaseNationalCharacterSets; + private SystemVersions systemVersions; - private AutonomousDatabaseVersions autonomousDatabaseVersions; + private OracleSubscriptions oracleSubscriptions; + + private DbNodes dbNodes; + + private GiVersions giVersions; + + private GiMinorVersions giMinorVersions; private DbSystemShapes dbSystemShapes; @@ -90,26 +108,30 @@ public final class OracleDatabaseManager { private DnsPrivateZones dnsPrivateZones; - private GiVersions giVersions; - - private SystemVersions systemVersions; + private FlexComponents flexComponents; - private OracleSubscriptions oracleSubscriptions; + private AutonomousDatabases autonomousDatabases; private AutonomousDatabaseBackups autonomousDatabaseBackups; - private DbServers dbServers; + private AutonomousDatabaseCharacterSets autonomousDatabaseCharacterSets; - private DbNodes dbNodes; + private AutonomousDatabaseNationalCharacterSets autonomousDatabaseNationalCharacterSets; - private VirtualNetworkAddresses virtualNetworkAddresses; + private AutonomousDatabaseVersions autonomousDatabaseVersions; + + private ExadbVmClusters exadbVmClusters; + + private ExascaleDbNodes exascaleDbNodes; + + private ExascaleDbStorageVaults exascaleDbStorageVaults; - private final OracleDatabaseResourceManager clientObject; + private final OracleDatabaseManagementClient clientObject; private OracleDatabaseManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new OracleDatabaseResourceManagerBuilder().pipeline(httpPipeline) + this.clientObject = new OracleDatabaseManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -117,11 +139,11 @@ private OracleDatabaseManager(HttpPipeline httpPipeline, AzureProfile profile, D } /** - * Creates an instance of OracleDatabase service API entry point. + * Creates an instance of Oracle Database service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the OracleDatabase service API instance. + * @return the Oracle Database service API instance. */ public static OracleDatabaseManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); @@ -130,11 +152,11 @@ public static OracleDatabaseManager authenticate(TokenCredential credential, Azu } /** - * Creates an instance of OracleDatabase service API entry point. + * Creates an instance of Oracle Database service API entry point. * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. - * @return the OracleDatabase service API instance. + * @return the Oracle Database service API instance. */ public static OracleDatabaseManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); @@ -156,6 +178,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-oracledatabase.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -253,22 +278,24 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { } /** - * Creates an instance of OracleDatabase service API entry point. + * Creates an instance of Oracle Database service API entry point. * * @param credential the credential to use. * @param profile the Azure profile for client. - * @return the OracleDatabase service API instance. + * @return the Oracle Database service API instance. */ public OracleDatabaseManager authenticate(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.oracledatabase") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -301,7 +328,7 @@ public OracleDatabaseManager authenticate(TokenCredential credential, AzureProfi 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, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -326,18 +353,6 @@ public Operations operations() { return operations; } - /** - * Gets the resource collection API of AutonomousDatabases. It manages AutonomousDatabase. - * - * @return Resource collection API of AutonomousDatabases. - */ - public AutonomousDatabases autonomousDatabases() { - if (this.autonomousDatabases == null) { - this.autonomousDatabases = new AutonomousDatabasesImpl(clientObject.getAutonomousDatabases(), this); - } - return autonomousDatabases; - } - /** * Gets the resource collection API of CloudExadataInfrastructures. It manages CloudExadataInfrastructure. * @@ -351,6 +366,18 @@ public CloudExadataInfrastructures cloudExadataInfrastructures() { return cloudExadataInfrastructures; } + /** + * Gets the resource collection API of DbServers. + * + * @return Resource collection API of DbServers. + */ + public DbServers dbServers() { + if (this.dbServers == null) { + this.dbServers = new DbServersImpl(clientObject.getDbServers(), this); + } + return dbServers; + } + /** * Gets the resource collection API of CloudVmClusters. It manages CloudVmCluster. * @@ -364,42 +391,76 @@ public CloudVmClusters cloudVmClusters() { } /** - * Gets the resource collection API of AutonomousDatabaseCharacterSets. + * Gets the resource collection API of VirtualNetworkAddresses. It manages VirtualNetworkAddress. * - * @return Resource collection API of AutonomousDatabaseCharacterSets. + * @return Resource collection API of VirtualNetworkAddresses. */ - public AutonomousDatabaseCharacterSets autonomousDatabaseCharacterSets() { - if (this.autonomousDatabaseCharacterSets == null) { - this.autonomousDatabaseCharacterSets - = new AutonomousDatabaseCharacterSetsImpl(clientObject.getAutonomousDatabaseCharacterSets(), this); + public VirtualNetworkAddresses virtualNetworkAddresses() { + if (this.virtualNetworkAddresses == null) { + this.virtualNetworkAddresses + = new VirtualNetworkAddressesImpl(clientObject.getVirtualNetworkAddresses(), this); } - return autonomousDatabaseCharacterSets; + return virtualNetworkAddresses; } /** - * Gets the resource collection API of AutonomousDatabaseNationalCharacterSets. + * Gets the resource collection API of SystemVersions. * - * @return Resource collection API of AutonomousDatabaseNationalCharacterSets. + * @return Resource collection API of SystemVersions. */ - public AutonomousDatabaseNationalCharacterSets autonomousDatabaseNationalCharacterSets() { - if (this.autonomousDatabaseNationalCharacterSets == null) { - this.autonomousDatabaseNationalCharacterSets = new AutonomousDatabaseNationalCharacterSetsImpl( - clientObject.getAutonomousDatabaseNationalCharacterSets(), this); + public SystemVersions systemVersions() { + if (this.systemVersions == null) { + this.systemVersions = new SystemVersionsImpl(clientObject.getSystemVersions(), this); } - return autonomousDatabaseNationalCharacterSets; + return systemVersions; } /** - * Gets the resource collection API of AutonomousDatabaseVersions. + * Gets the resource collection API of OracleSubscriptions. * - * @return Resource collection API of AutonomousDatabaseVersions. + * @return Resource collection API of OracleSubscriptions. */ - public AutonomousDatabaseVersions autonomousDatabaseVersions() { - if (this.autonomousDatabaseVersions == null) { - this.autonomousDatabaseVersions - = new AutonomousDatabaseVersionsImpl(clientObject.getAutonomousDatabaseVersions(), this); + public OracleSubscriptions oracleSubscriptions() { + if (this.oracleSubscriptions == null) { + this.oracleSubscriptions = new OracleSubscriptionsImpl(clientObject.getOracleSubscriptions(), this); } - return autonomousDatabaseVersions; + return oracleSubscriptions; + } + + /** + * Gets the resource collection API of DbNodes. + * + * @return Resource collection API of DbNodes. + */ + public DbNodes dbNodes() { + if (this.dbNodes == null) { + this.dbNodes = new DbNodesImpl(clientObject.getDbNodes(), this); + } + return dbNodes; + } + + /** + * Gets the resource collection API of GiVersions. + * + * @return Resource collection API of GiVersions. + */ + public GiVersions giVersions() { + if (this.giVersions == null) { + this.giVersions = new GiVersionsImpl(clientObject.getGiVersions(), this); + } + return giVersions; + } + + /** + * Gets the resource collection API of GiMinorVersions. + * + * @return Resource collection API of GiMinorVersions. + */ + public GiMinorVersions giMinorVersions() { + if (this.giMinorVersions == null) { + this.giMinorVersions = new GiMinorVersionsImpl(clientObject.getGiMinorVersions(), this); + } + return giMinorVersions; } /** @@ -439,39 +500,27 @@ public DnsPrivateZones dnsPrivateZones() { } /** - * Gets the resource collection API of GiVersions. + * Gets the resource collection API of FlexComponents. * - * @return Resource collection API of GiVersions. + * @return Resource collection API of FlexComponents. */ - public GiVersions giVersions() { - if (this.giVersions == null) { - this.giVersions = new GiVersionsImpl(clientObject.getGiVersions(), this); + public FlexComponents flexComponents() { + if (this.flexComponents == null) { + this.flexComponents = new FlexComponentsImpl(clientObject.getFlexComponents(), this); } - return giVersions; + return flexComponents; } /** - * Gets the resource collection API of SystemVersions. - * - * @return Resource collection API of SystemVersions. - */ - public SystemVersions systemVersions() { - if (this.systemVersions == null) { - this.systemVersions = new SystemVersionsImpl(clientObject.getSystemVersions(), this); - } - return systemVersions; - } - - /** - * Gets the resource collection API of OracleSubscriptions. + * Gets the resource collection API of AutonomousDatabases. It manages AutonomousDatabase. * - * @return Resource collection API of OracleSubscriptions. + * @return Resource collection API of AutonomousDatabases. */ - public OracleSubscriptions oracleSubscriptions() { - if (this.oracleSubscriptions == null) { - this.oracleSubscriptions = new OracleSubscriptionsImpl(clientObject.getOracleSubscriptions(), this); + public AutonomousDatabases autonomousDatabases() { + if (this.autonomousDatabases == null) { + this.autonomousDatabases = new AutonomousDatabasesImpl(clientObject.getAutonomousDatabases(), this); } - return oracleSubscriptions; + return autonomousDatabases; } /** @@ -488,49 +537,88 @@ public AutonomousDatabaseBackups autonomousDatabaseBackups() { } /** - * Gets the resource collection API of DbServers. + * Gets the resource collection API of AutonomousDatabaseCharacterSets. * - * @return Resource collection API of DbServers. + * @return Resource collection API of AutonomousDatabaseCharacterSets. */ - public DbServers dbServers() { - if (this.dbServers == null) { - this.dbServers = new DbServersImpl(clientObject.getDbServers(), this); + public AutonomousDatabaseCharacterSets autonomousDatabaseCharacterSets() { + if (this.autonomousDatabaseCharacterSets == null) { + this.autonomousDatabaseCharacterSets + = new AutonomousDatabaseCharacterSetsImpl(clientObject.getAutonomousDatabaseCharacterSets(), this); } - return dbServers; + return autonomousDatabaseCharacterSets; } /** - * Gets the resource collection API of DbNodes. + * Gets the resource collection API of AutonomousDatabaseNationalCharacterSets. * - * @return Resource collection API of DbNodes. + * @return Resource collection API of AutonomousDatabaseNationalCharacterSets. */ - public DbNodes dbNodes() { - if (this.dbNodes == null) { - this.dbNodes = new DbNodesImpl(clientObject.getDbNodes(), this); + public AutonomousDatabaseNationalCharacterSets autonomousDatabaseNationalCharacterSets() { + if (this.autonomousDatabaseNationalCharacterSets == null) { + this.autonomousDatabaseNationalCharacterSets = new AutonomousDatabaseNationalCharacterSetsImpl( + clientObject.getAutonomousDatabaseNationalCharacterSets(), this); } - return dbNodes; + return autonomousDatabaseNationalCharacterSets; } /** - * Gets the resource collection API of VirtualNetworkAddresses. It manages VirtualNetworkAddress. + * Gets the resource collection API of AutonomousDatabaseVersions. * - * @return Resource collection API of VirtualNetworkAddresses. + * @return Resource collection API of AutonomousDatabaseVersions. */ - public VirtualNetworkAddresses virtualNetworkAddresses() { - if (this.virtualNetworkAddresses == null) { - this.virtualNetworkAddresses - = new VirtualNetworkAddressesImpl(clientObject.getVirtualNetworkAddresses(), this); + public AutonomousDatabaseVersions autonomousDatabaseVersions() { + if (this.autonomousDatabaseVersions == null) { + this.autonomousDatabaseVersions + = new AutonomousDatabaseVersionsImpl(clientObject.getAutonomousDatabaseVersions(), this); } - return virtualNetworkAddresses; + return autonomousDatabaseVersions; + } + + /** + * Gets the resource collection API of ExadbVmClusters. It manages ExadbVmCluster. + * + * @return Resource collection API of ExadbVmClusters. + */ + public ExadbVmClusters exadbVmClusters() { + if (this.exadbVmClusters == null) { + this.exadbVmClusters = new ExadbVmClustersImpl(clientObject.getExadbVmClusters(), this); + } + return exadbVmClusters; + } + + /** + * Gets the resource collection API of ExascaleDbNodes. + * + * @return Resource collection API of ExascaleDbNodes. + */ + public ExascaleDbNodes exascaleDbNodes() { + if (this.exascaleDbNodes == null) { + this.exascaleDbNodes = new ExascaleDbNodesImpl(clientObject.getExascaleDbNodes(), this); + } + return exascaleDbNodes; + } + + /** + * Gets the resource collection API of ExascaleDbStorageVaults. It manages ExascaleDbStorageVault. + * + * @return Resource collection API of ExascaleDbStorageVaults. + */ + public ExascaleDbStorageVaults exascaleDbStorageVaults() { + if (this.exascaleDbStorageVaults == null) { + this.exascaleDbStorageVaults + = new ExascaleDbStorageVaultsImpl(clientObject.getExascaleDbStorageVaults(), this); + } + return exascaleDbStorageVaults; } /** - * Gets wrapped service client OracleDatabaseResourceManager providing direct access to the underlying + * Gets wrapped service client OracleDatabaseManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. * - * @return Wrapped service client OracleDatabaseResourceManager. + * @return Wrapped service client OracleDatabaseManagementClient. */ - public OracleDatabaseResourceManager serviceClient() { + public OracleDatabaseManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseBackupsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseBackupsClient.java index faa94b35ece4..c9aad645365e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseBackupsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseBackupsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -19,35 +19,72 @@ */ public interface AutonomousDatabaseBackupsClient { /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource); /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation as paginated response with - * {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource, Context context); + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource); + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource, Context context); /** * Get a AutonomousDatabaseBackup. @@ -80,72 +117,62 @@ Response getWithResponse(String resourceGroupName AutonomousDatabaseBackupInner get(String resourceGroupName, String autonomousdatabasename, String adbbackupid); /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( - String resourceGroupName, String autonomousdatabasename, String adbbackupid, - AutonomousDatabaseBackupInner resource); + SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + String adbbackupid); /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( - String resourceGroupName, String autonomousdatabasename, String adbbackupid, - AutonomousDatabaseBackupInner resource, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context); /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, AutonomousDatabaseBackupInner resource); + void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid); /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, AutonomousDatabaseBackupInner resource, Context context); + void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context); /** * Update a AutonomousDatabaseBackup. @@ -216,60 +243,33 @@ AutonomousDatabaseBackupInner update(String resourceGroupName, String autonomous AutonomousDatabaseBackupUpdate properties, Context context); /** - * Delete a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, - String adbbackupid); - - /** - * Delete a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, Context context); - - /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename); /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseCharacterSetsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseCharacterSetsClient.java index dfff81868729..6e90d173e8a9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseCharacterSetsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseCharacterSetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -16,57 +16,57 @@ */ public interface AutonomousDatabaseCharacterSetsClient { /** - * List AutonomousDatabaseCharacterSet resources by Location. + * Get a AutonomousDatabaseCharacterSet. * * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseCharacterSet along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String adbscharsetname, + Context context); /** - * List AutonomousDatabaseCharacterSet resources by Location. + * Get a AutonomousDatabaseCharacterSet. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseCharacterSet. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseCharacterSetInner get(String location, String adbscharsetname); /** - * Get a AutonomousDatabaseCharacterSet. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet along with {@link Response}. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String adbscharsetname, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); /** - * Get a AutonomousDatabaseCharacterSet. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutonomousDatabaseCharacterSetInner get(String location, String adbscharsetname); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseNationalCharacterSetsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseNationalCharacterSetsClient.java index 8cce386ff1ff..7b6b7dca95b0 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseNationalCharacterSetsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseNationalCharacterSetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -17,57 +17,57 @@ */ public interface AutonomousDatabaseNationalCharacterSetsClient { /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * Get a AutonomousDatabaseNationalCharacterSet. * * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String adbsncharsetname, + Context context); /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * Get a AutonomousDatabaseNationalCharacterSet. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseNationalCharacterSet. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseNationalCharacterSetInner get(String location, String adbsncharsetname); /** - * Get a AutonomousDatabaseNationalCharacterSet. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String adbsncharsetname, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); /** - * Get a AutonomousDatabaseNationalCharacterSet. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutonomousDatabaseNationalCharacterSetInner get(String location, String adbsncharsetname); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseVersionsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseVersionsClient.java index b566726c0582..b4a27dd556d2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseVersionsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabaseVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -16,55 +16,55 @@ */ public interface AutonomousDatabaseVersionsClient { /** - * List AutonomousDbVersion resources by Location. + * Get a AutonomousDbVersion. * * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + * @return a AutonomousDbVersion along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String autonomousdbversionsname, + Context context); /** - * List AutonomousDbVersion resources by Location. + * Get a AutonomousDbVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param autonomousdbversionsname AutonomousDbVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + * @return a AutonomousDbVersion. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDbVersionInner get(String location, String autonomousdbversionsname); /** - * Get a AutonomousDbVersion. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion along with {@link Response}. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String autonomousdbversionsname, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); /** - * Get a AutonomousDbVersion. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutonomousDbVersionInner get(String location, String autonomousdbversionsname); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabasesClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabasesClient.java index 291fe709a02d..5f0753b343ce 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabasesClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/AutonomousDatabasesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -14,6 +14,7 @@ import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseInner; import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseWalletFileInner; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdate; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails; import com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails; import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; @@ -44,59 +45,6 @@ public interface AutonomousDatabasesClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - /** - * List AutonomousDatabase resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List AutonomousDatabase resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a AutonomousDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabase along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String autonomousdatabasename, Context context); - - /** - * Get a AutonomousDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabase. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AutonomousDatabaseInner getByResourceGroup(String resourceGroupName, String autonomousdatabasename); - /** * Create a AutonomousDatabase. * @@ -159,6 +107,34 @@ AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String autonomo AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource, Context context); + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String autonomousdatabasename, Context context); + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseInner getByResourceGroup(String resourceGroupName, String autonomousdatabasename); + /** * Update a AutonomousDatabase. * @@ -274,6 +250,92 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String autonomousdatabasename, Context context); + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseInner> beginSwitchover(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseInner> beginSwitchover(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body, Context context); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context); + /** * Perform failover action on Autonomous Database. * @@ -283,7 +345,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AutonomousDatabaseInner> beginFailover(String resourceGroupName, @@ -299,7 +361,7 @@ SyncPoller, AutonomousDatabaseInner> beginFa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AutonomousDatabaseInner> beginFailover(String resourceGroupName, @@ -314,7 +376,7 @@ SyncPoller, AutonomousDatabaseInner> beginFa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AutonomousDatabaseInner failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); @@ -329,7 +391,7 @@ SyncPoller, AutonomousDatabaseInner> beginFa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AutonomousDatabaseInner failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, @@ -375,7 +437,7 @@ AutonomousDatabaseWalletFileInner generateWallet(String resourceGroupName, Strin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AutonomousDatabaseInner> beginRestore(String resourceGroupName, @@ -391,7 +453,7 @@ SyncPoller, AutonomousDatabaseInner> beginRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AutonomousDatabaseInner> beginRestore(String resourceGroupName, @@ -406,7 +468,7 @@ SyncPoller, AutonomousDatabaseInner> beginRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AutonomousDatabaseInner restore(String resourceGroupName, String autonomousdatabasename, @@ -422,7 +484,7 @@ AutonomousDatabaseInner restore(String resourceGroupName, String autonomousdatab * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AutonomousDatabaseInner restore(String resourceGroupName, String autonomousdatabasename, @@ -436,7 +498,7 @@ AutonomousDatabaseInner restore(String resourceGroupName, String autonomousdatab * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AutonomousDatabaseInner> beginShrink(String resourceGroupName, @@ -451,7 +513,7 @@ SyncPoller, AutonomousDatabaseInner> beginSh * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AutonomousDatabaseInner> beginShrink(String resourceGroupName, @@ -465,7 +527,7 @@ SyncPoller, AutonomousDatabaseInner> beginSh * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AutonomousDatabaseInner shrink(String resourceGroupName, String autonomousdatabasename); @@ -479,13 +541,13 @@ SyncPoller, AutonomousDatabaseInner> beginSh * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) AutonomousDatabaseInner shrink(String resourceGroupName, String autonomousdatabasename, Context context); /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -493,14 +555,14 @@ SyncPoller, AutonomousDatabaseInner> beginSh * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AutonomousDatabaseInner> beginSwitchover(String resourceGroupName, - String autonomousdatabasename, PeerDbDetails body); + SyncPoller, AutonomousDatabaseInner> beginChangeDisasterRecoveryConfiguration( + String resourceGroupName, String autonomousdatabasename, DisasterRecoveryConfigurationDetails body); /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -509,14 +571,15 @@ SyncPoller, AutonomousDatabaseInner> beginSw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AutonomousDatabaseInner> beginSwitchover(String resourceGroupName, - String autonomousdatabasename, PeerDbDetails body, Context context); + SyncPoller, AutonomousDatabaseInner> beginChangeDisasterRecoveryConfiguration( + String resourceGroupName, String autonomousdatabasename, DisasterRecoveryConfigurationDetails body, + Context context); /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -524,13 +587,14 @@ SyncPoller, AutonomousDatabaseInner> beginSw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); + AutonomousDatabaseInner changeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body); /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -539,9 +603,9 @@ SyncPoller, AutonomousDatabaseInner> beginSw * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, - Context context); + AutonomousDatabaseInner changeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/CloudExadataInfrastructuresClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/CloudExadataInfrastructuresClient.java index cec943dd427a..6515bc1882cd 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/CloudExadataInfrastructuresClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/CloudExadataInfrastructuresClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -42,61 +42,6 @@ public interface CloudExadataInfrastructuresClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - /** - * List CloudExadataInfrastructure resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List CloudExadataInfrastructure resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a CloudExadataInfrastructure. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String cloudexadatainfrastructurename, Context context); - - /** - * Get a CloudExadataInfrastructure. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CloudExadataInfrastructureInner getByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); - /** * Create a CloudExadataInfrastructure. * @@ -160,6 +105,34 @@ CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, String CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context); + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, Context context); + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudExadataInfrastructureInner getByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); + /** * Update a CloudExadataInfrastructure. * @@ -276,6 +249,33 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context); + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** * Perform add storage capacity on exadata infra. * @@ -284,7 +284,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CloudExadataInfrastructureInner> @@ -299,7 +299,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CloudExadataInfrastructureInner> @@ -313,7 +313,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename); @@ -327,7 +327,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename, diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/CloudVmClustersClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/CloudVmClustersClient.java index 96df1fbfc801..394c122b405a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/CloudVmClustersClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/CloudVmClustersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -44,59 +44,6 @@ public interface CloudVmClustersClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - /** - * List CloudVmCluster resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List CloudVmCluster resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudVmCluster along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, - Context context); - - /** - * Get a CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudVmCluster. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CloudVmClusterInner getByResourceGroup(String resourceGroupName, String cloudvmclustername); - /** * Create a CloudVmCluster. * @@ -159,6 +106,34 @@ CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclust CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource, Context context); + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, + Context context); + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner getByResourceGroup(String resourceGroupName, String cloudvmclustername); + /** * Update a CloudVmCluster. * @@ -273,6 +248,31 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String cloudvmclustername, Context context); + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** * Add VMs to the VM Cluster. * @@ -282,7 +282,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, @@ -298,7 +298,7 @@ SyncPoller, CloudVmClusterInner> beginAddVms(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, @@ -313,7 +313,7 @@ SyncPoller, CloudVmClusterInner> beginAddVms(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); @@ -328,42 +328,42 @@ SyncPoller, CloudVmClusterInner> beginAddVms(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, Context context); /** - * List Private IP Addresses by the provided filter. + * Remove VMs from the VM Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response> listPrivateIpAddressesWithResponse(String resourceGroupName, - String cloudvmclustername, PrivateIpAddressesFilter body, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body); /** - * List Private IP Addresses by the provided filter. + * Remove VMs from the VM Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - List listPrivateIpAddresses(String resourceGroupName, String cloudvmclustername, - PrivateIpAddressesFilter body); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context); /** * Remove VMs from the VM Cluster. @@ -374,11 +374,10 @@ List listPrivateIpAddresses(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the response. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, - String cloudvmclustername, AddRemoveDbNode body); + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); /** * Remove VMs from the VM Cluster. @@ -390,39 +389,40 @@ SyncPoller, CloudVmClusterInner> beginRemoveVms( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the response. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, - String cloudvmclustername, AddRemoveDbNode body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context); /** - * Remove VMs from the VM Cluster. + * List Private IP Addresses by the provided filter. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); + Response> listPrivateIpAddressesWithResponse(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body, Context context); /** - * Remove VMs from the VM Cluster. + * List Private IP Addresses by the provided filter. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, - Context context); + List listPrivateIpAddresses(String resourceGroupName, String cloudvmclustername, + PrivateIpAddressesFilter body); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbNodesClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbNodesClient.java index ba9772186d10..0174b669290a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbNodesClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbNodesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -19,62 +19,62 @@ */ public interface DbNodesClient { /** - * List DbNode resources by CloudVmCluster. + * Get a DbNode. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + * @return a DbNode along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + Context context); /** - * List DbNode resources by CloudVmCluster. + * Get a DbNode. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. + * @param dbnodeocid DbNode OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + * @return a DbNode. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DbNodeInner get(String resourceGroupName, String cloudvmclustername, String dbnodeocid); /** - * Get a DbNode. + * List DbNode resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode along with {@link Response}. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); /** - * Get a DbNode. + * List DbNode resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DbNodeInner get(String resourceGroupName, String cloudvmclustername, String dbnodeocid); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context); /** * VM actions on DbNode of VM Cluster by the provided filter. @@ -86,7 +86,7 @@ Response getWithResponse(String resourceGroupName, String cloudvmcl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the DbNode resource belonging to vmCluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DbNodeInner> beginAction(String resourceGroupName, String cloudvmclustername, @@ -103,7 +103,7 @@ SyncPoller, DbNodeInner> beginAction(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the DbNode resource belonging to vmCluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DbNodeInner> beginAction(String resourceGroupName, String cloudvmclustername, @@ -119,7 +119,7 @@ SyncPoller, DbNodeInner> beginAction(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DbNode resource belonging to vmCluster. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) DbNodeInner action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body); @@ -135,7 +135,7 @@ SyncPoller, DbNodeInner> beginAction(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DbNode resource belonging to vmCluster. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) DbNodeInner action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body, diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbServersClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbServersClient.java index 2f8f51f1f019..74c9b6ecb237 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbServersClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbServersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -16,61 +16,61 @@ */ public interface DbServersClient { /** - * List DbServer resources by CloudExadataInfrastructure. + * Get a DbServer. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + * @return a DbServer along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid, Context context); /** - * List DbServer resources by CloudExadataInfrastructure. + * Get a DbServer. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. + * @param dbserverocid DbServer OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + * @return a DbServer. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DbServerInner get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid); /** - * Get a DbServer. + * List DbServer resources by CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer along with {@link Response}. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, - String dbserverocid, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename); /** - * Get a DbServer. + * List DbServer resources by CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DbServerInner get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbSystemShapesClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbSystemShapesClient.java index fb3cc6c33d49..fef679a32b54 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbSystemShapesClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DbSystemShapesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -16,54 +16,55 @@ */ public interface DbSystemShapesClient { /** - * List DbSystemShape resources by Location. + * Get a DbSystemShape. * * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. + * @return a DbSystemShape along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String dbsystemshapename, Context context); /** - * List DbSystemShape resources by Location. + * Get a DbSystemShape. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dbsystemshapename DbSystemShape name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. + * @return a DbSystemShape. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DbSystemShapeInner get(String location, String dbsystemshapename); /** - * Get a DbSystemShape. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape along with {@link Response}. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String dbsystemshapename, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); /** - * Get a DbSystemShape. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. + * @param zone Filters the result for the given Azure Availability Zone. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DbSystemShapeInner get(String location, String dbsystemshapename); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, String zone, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DnsPrivateViewsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DnsPrivateViewsClient.java index 5e6b80e6efed..e98edc3aeb3d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DnsPrivateViewsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DnsPrivateViewsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -16,54 +16,54 @@ */ public interface DnsPrivateViewsClient { /** - * List DnsPrivateView resources by Location. + * Get a DnsPrivateView. * * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + * @return a DnsPrivateView along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String dnsprivateviewocid, Context context); /** - * List DnsPrivateView resources by Location. + * Get a DnsPrivateView. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dnsprivateviewocid DnsPrivateView OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + * @return a DnsPrivateView. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DnsPrivateViewInner get(String location, String dnsprivateviewocid); /** - * Get a DnsPrivateView. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView along with {@link Response}. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String dnsprivateviewocid, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); /** - * Get a DnsPrivateView. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsPrivateViewInner get(String location, String dnsprivateviewocid); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DnsPrivateZonesClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DnsPrivateZonesClient.java index 19a9ebcb3e8b..d28b6eea8bd9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DnsPrivateZonesClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/DnsPrivateZonesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -16,54 +16,54 @@ */ public interface DnsPrivateZonesClient { /** - * List DnsPrivateZone resources by Location. + * Get a DnsPrivateZone. * * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + * @return a DnsPrivateZone along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String dnsprivatezonename, Context context); /** - * List DnsPrivateZone resources by Location. + * Get a DnsPrivateZone. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dnsprivatezonename DnsPrivateZone name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + * @return a DnsPrivateZone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DnsPrivateZoneInner get(String location, String dnsprivatezonename); /** - * Get a DnsPrivateZone. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone along with {@link Response}. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String dnsprivatezonename, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); /** - * Get a DnsPrivateZone. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DnsPrivateZoneInner get(String location, String dnsprivatezonename); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExadbVmClustersClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExadbVmClustersClient.java new file mode 100644 index 000000000000..d1fd88967404 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExadbVmClustersClient.java @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdate; +import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; + +/** + * An instance of this class provides access to all the operations defined in ExadbVmClustersClient. + */ +public interface ExadbVmClustersClient { + /** + * List ExadbVmCluster resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List ExadbVmCluster resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExadbVmClusterInner> beginCreateOrUpdate(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterInner resource); + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExadbVmClusterInner> beginCreateOrUpdate(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterInner resource, Context context); + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExadbVmClusterInner createOrUpdate(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterInner resource); + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExadbVmClusterInner createOrUpdate(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterInner resource, Context context); + + /** + * Get a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String exadbVmClusterName, + Context context); + + /** + * Get a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExadbVmClusterInner getByResourceGroup(String resourceGroupName, String exadbVmClusterName); + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExadbVmClusterInner> beginUpdate(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterUpdate properties); + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExadbVmClusterInner> beginUpdate(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterUpdate properties, Context context); + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExadbVmClusterInner update(String resourceGroupName, String exadbVmClusterName, ExadbVmClusterUpdate properties); + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExadbVmClusterInner update(String resourceGroupName, String exadbVmClusterName, ExadbVmClusterUpdate properties, + Context context); + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String exadbVmClusterName); + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String exadbVmClusterName, + Context context); + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String exadbVmClusterName); + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String exadbVmClusterName, Context context); + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExadbVmClusterInner> beginRemoveVms(String resourceGroupName, + String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExadbVmClusterInner> beginRemoveVms(String resourceGroupName, + String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body, Context context); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExadbVmClusterInner removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExadbVmClusterInner removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body, Context context); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExascaleDbNodesClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExascaleDbNodesClient.java new file mode 100644 index 000000000000..de6ad7ff58af --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExascaleDbNodesClient.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.oracledatabase.fluent.models.DbActionResponseInner; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner; +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; + +/** + * An instance of this class provides access to all the operations defined in ExascaleDbNodesClient. + */ +public interface ExascaleDbNodesClient { + /** + * Get a ExascaleDbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbNode along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName, Context context); + + /** + * Get a ExascaleDbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbNode. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExascaleDbNodeInner get(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName); + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String exadbVmClusterName); + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String resourceGroupName, String exadbVmClusterName, + Context context); + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DbActionResponseInner> beginAction(String resourceGroupName, + String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body); + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DbActionResponseInner> beginAction(String resourceGroupName, + String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body, Context context); + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DbActionResponseInner action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body); + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DbActionResponseInner action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body, Context context); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExascaleDbStorageVaultsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExascaleDbStorageVaultsClient.java new file mode 100644 index 000000000000..4b3bf87ef537 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/ExascaleDbStorageVaultsClient.java @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultTagsUpdate; + +/** + * An instance of this class provides access to all the operations defined in ExascaleDbStorageVaultsClient. + */ +public interface ExascaleDbStorageVaultsClient { + /** + * Get a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String exascaleDbStorageVaultName, Context context); + + /** + * Get a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExascaleDbStorageVaultInner getByResourceGroup(String resourceGroupName, String exascaleDbStorageVaultName); + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExascaleDbStorageVaultInner> + beginCreate(String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultInner resource); + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExascaleDbStorageVaultInner> beginCreate( + String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultInner resource, + Context context); + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExascaleDbStorageVaultInner create(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultInner resource); + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExascaleDbStorageVaultInner create(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultInner resource, Context context); + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExascaleDbStorageVaultInner> beginUpdate( + String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultTagsUpdate properties); + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ExascaleDbStorageVaultInner> beginUpdate( + String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultTagsUpdate properties, + Context context); + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExascaleDbStorageVaultInner update(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultTagsUpdate properties); + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExascaleDbStorageVaultInner update(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultTagsUpdate properties, Context context); + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String exascaleDbStorageVaultName); + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String exascaleDbStorageVaultName, + Context context); + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String exascaleDbStorageVaultName); + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String exascaleDbStorageVaultName, Context context); + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/FlexComponentsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/FlexComponentsClient.java new file mode 100644 index 000000000000..b25f65496f9e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/FlexComponentsClient.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + +/** + * An instance of this class provides access to all the operations defined in FlexComponentsClient. + */ +public interface FlexComponentsClient { + /** + * Get a FlexComponent. + * + * @param location The name of the Azure region. + * @param flexComponentName The name of the FlexComponent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FlexComponent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String flexComponentName, Context context); + + /** + * Get a FlexComponent. + * + * @param location The name of the Azure region. + * @param flexComponentName The name of the FlexComponent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FlexComponent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FlexComponentInner get(String location, String flexComponentName); + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String location); + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @param shape If provided, filters the results for the given shape. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String location, SystemShapes shape, Context context); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/GiMinorVersionsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/GiMinorVersionsClient.java new file mode 100644 index 000000000000..ba59abdb514d --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/GiMinorVersionsClient.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner; +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; + +/** + * An instance of this class provides access to all the operations defined in GiMinorVersionsClient. + */ +public interface GiMinorVersionsClient { + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String location, String giversionname); + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param shapeFamily If provided, filters the results to the set of database versions which are supported for the + * given shape family. + * @param zone Filters the result for the given Azure Availability Zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByParent(String location, String giversionname, ShapeFamily shapeFamily, + String zone, Context context); + + /** + * Get a GiMinorVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param giMinorVersionName The name of the GiMinorVersion. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiMinorVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String giversionname, String giMinorVersionName, + Context context); + + /** + * Get a GiMinorVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param giMinorVersionName The name of the GiMinorVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiMinorVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GiMinorVersionInner get(String location, String giversionname, String giMinorVersionName); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/GiVersionsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/GiVersionsClient.java index fdc722e20fc0..eb1da495c8fa 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/GiVersionsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/GiVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -10,60 +10,63 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.oracledatabase.fluent.models.GiVersionInner; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; /** * An instance of this class provides access to all the operations defined in GiVersionsClient. */ public interface GiVersionsClient { /** - * List GiVersion resources by Location. + * Get a GiVersion. * * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. + * @return a GiVersion along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String giversionname, Context context); /** - * List GiVersion resources by Location. + * Get a GiVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param giversionname GiVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. + * @return a GiVersion. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + GiVersionInner get(String location, String giversionname); /** - * Get a GiVersion. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param giversionname GiVersion name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion along with {@link Response}. + * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String giversionname, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); /** - * Get a GiVersion. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param giversionname GiVersion name. + * @param shape If provided, filters the results for the given shape. + * @param zone Filters the result for the given Azure Availability Zone. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion. + * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - GiVersionInner get(String location, String giversionname); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, SystemShapes shape, String zone, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OperationsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OperationsClient.java index 4eeb2a41bb36..78b023ae49cc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OperationsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleDatabaseResourceManager.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleDatabaseManagementClient.java similarity index 78% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleDatabaseResourceManager.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleDatabaseManagementClient.java index 09cc41dda2cb..a9639a16d442 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleDatabaseResourceManager.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleDatabaseManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for OracleDatabaseResourceManager class. + * The interface for OracleDatabaseManagementClient class. */ -public interface OracleDatabaseResourceManager { +public interface OracleDatabaseManagementClient { /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -54,18 +54,18 @@ public interface OracleDatabaseResourceManager { OperationsClient getOperations(); /** - * Gets the AutonomousDatabasesClient object to access its operations. + * Gets the CloudExadataInfrastructuresClient object to access its operations. * - * @return the AutonomousDatabasesClient object. + * @return the CloudExadataInfrastructuresClient object. */ - AutonomousDatabasesClient getAutonomousDatabases(); + CloudExadataInfrastructuresClient getCloudExadataInfrastructures(); /** - * Gets the CloudExadataInfrastructuresClient object to access its operations. + * Gets the DbServersClient object to access its operations. * - * @return the CloudExadataInfrastructuresClient object. + * @return the DbServersClient object. */ - CloudExadataInfrastructuresClient getCloudExadataInfrastructures(); + DbServersClient getDbServers(); /** * Gets the CloudVmClustersClient object to access its operations. @@ -75,25 +75,46 @@ public interface OracleDatabaseResourceManager { CloudVmClustersClient getCloudVmClusters(); /** - * Gets the AutonomousDatabaseCharacterSetsClient object to access its operations. + * Gets the VirtualNetworkAddressesClient object to access its operations. * - * @return the AutonomousDatabaseCharacterSetsClient object. + * @return the VirtualNetworkAddressesClient object. */ - AutonomousDatabaseCharacterSetsClient getAutonomousDatabaseCharacterSets(); + VirtualNetworkAddressesClient getVirtualNetworkAddresses(); /** - * Gets the AutonomousDatabaseNationalCharacterSetsClient object to access its operations. + * Gets the SystemVersionsClient object to access its operations. * - * @return the AutonomousDatabaseNationalCharacterSetsClient object. + * @return the SystemVersionsClient object. */ - AutonomousDatabaseNationalCharacterSetsClient getAutonomousDatabaseNationalCharacterSets(); + SystemVersionsClient getSystemVersions(); /** - * Gets the AutonomousDatabaseVersionsClient object to access its operations. + * Gets the OracleSubscriptionsClient object to access its operations. * - * @return the AutonomousDatabaseVersionsClient object. + * @return the OracleSubscriptionsClient object. */ - AutonomousDatabaseVersionsClient getAutonomousDatabaseVersions(); + OracleSubscriptionsClient getOracleSubscriptions(); + + /** + * Gets the DbNodesClient object to access its operations. + * + * @return the DbNodesClient object. + */ + DbNodesClient getDbNodes(); + + /** + * Gets the GiVersionsClient object to access its operations. + * + * @return the GiVersionsClient object. + */ + GiVersionsClient getGiVersions(); + + /** + * Gets the GiMinorVersionsClient object to access its operations. + * + * @return the GiMinorVersionsClient object. + */ + GiMinorVersionsClient getGiMinorVersions(); /** * Gets the DbSystemShapesClient object to access its operations. @@ -117,51 +138,65 @@ public interface OracleDatabaseResourceManager { DnsPrivateZonesClient getDnsPrivateZones(); /** - * Gets the GiVersionsClient object to access its operations. + * Gets the FlexComponentsClient object to access its operations. * - * @return the GiVersionsClient object. + * @return the FlexComponentsClient object. */ - GiVersionsClient getGiVersions(); + FlexComponentsClient getFlexComponents(); /** - * Gets the SystemVersionsClient object to access its operations. + * Gets the AutonomousDatabasesClient object to access its operations. * - * @return the SystemVersionsClient object. + * @return the AutonomousDatabasesClient object. */ - SystemVersionsClient getSystemVersions(); + AutonomousDatabasesClient getAutonomousDatabases(); /** - * Gets the OracleSubscriptionsClient object to access its operations. + * Gets the AutonomousDatabaseBackupsClient object to access its operations. * - * @return the OracleSubscriptionsClient object. + * @return the AutonomousDatabaseBackupsClient object. */ - OracleSubscriptionsClient getOracleSubscriptions(); + AutonomousDatabaseBackupsClient getAutonomousDatabaseBackups(); /** - * Gets the AutonomousDatabaseBackupsClient object to access its operations. + * Gets the AutonomousDatabaseCharacterSetsClient object to access its operations. * - * @return the AutonomousDatabaseBackupsClient object. + * @return the AutonomousDatabaseCharacterSetsClient object. */ - AutonomousDatabaseBackupsClient getAutonomousDatabaseBackups(); + AutonomousDatabaseCharacterSetsClient getAutonomousDatabaseCharacterSets(); /** - * Gets the DbServersClient object to access its operations. + * Gets the AutonomousDatabaseNationalCharacterSetsClient object to access its operations. * - * @return the DbServersClient object. + * @return the AutonomousDatabaseNationalCharacterSetsClient object. */ - DbServersClient getDbServers(); + AutonomousDatabaseNationalCharacterSetsClient getAutonomousDatabaseNationalCharacterSets(); /** - * Gets the DbNodesClient object to access its operations. + * Gets the AutonomousDatabaseVersionsClient object to access its operations. * - * @return the DbNodesClient object. + * @return the AutonomousDatabaseVersionsClient object. */ - DbNodesClient getDbNodes(); + AutonomousDatabaseVersionsClient getAutonomousDatabaseVersions(); /** - * Gets the VirtualNetworkAddressesClient object to access its operations. + * Gets the ExadbVmClustersClient object to access its operations. * - * @return the VirtualNetworkAddressesClient object. + * @return the ExadbVmClustersClient object. */ - VirtualNetworkAddressesClient getVirtualNetworkAddresses(); + ExadbVmClustersClient getExadbVmClusters(); + + /** + * Gets the ExascaleDbNodesClient object to access its operations. + * + * @return the ExascaleDbNodesClient object. + */ + ExascaleDbNodesClient getExascaleDbNodes(); + + /** + * Gets the ExascaleDbStorageVaultsClient object to access its operations. + * + * @return the ExascaleDbStorageVaultsClient object. + */ + ExascaleDbStorageVaultsClient getExascaleDbStorageVaults(); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleSubscriptionsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleSubscriptionsClient.java index a6802e7fc889..0db8dc9a0096 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleSubscriptionsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/OracleSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -15,6 +15,7 @@ import com.azure.resourcemanager.oracledatabase.fluent.models.CloudAccountDetailsInner; import com.azure.resourcemanager.oracledatabase.fluent.models.OracleSubscriptionInner; import com.azure.resourcemanager.oracledatabase.fluent.models.SaasSubscriptionDetailsInner; +import com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions; import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; /** @@ -43,28 +44,6 @@ public interface OracleSubscriptionsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - /** - * Get a OracleSubscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(Context context); - - /** - * Get a OracleSubscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OracleSubscriptionInner get(); - /** * Create a OracleSubscription. * @@ -117,6 +96,28 @@ public interface OracleSubscriptionsClient { @ServiceMethod(returns = ReturnType.SINGLE) OracleSubscriptionInner createOrUpdate(OracleSubscriptionInner resource, Context context); + /** + * Get a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(Context context); + + /** + * Get a OracleSubscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OracleSubscriptionInner get(); + /** * Update a OracleSubscription. * @@ -212,137 +213,185 @@ public interface OracleSubscriptionsClient { void delete(Context context); /** - * List Activation Links. + * List Cloud Account Details. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of activation Links model. + * @return the {@link SyncPoller} for polling of cloud Account Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ActivationLinksInner> beginListActivationLinks(); + SyncPoller, CloudAccountDetailsInner> beginListCloudAccountDetails(); /** - * List Activation Links. + * List Cloud Account Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of activation Links model. + * @return the {@link SyncPoller} for polling of cloud Account Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ActivationLinksInner> beginListActivationLinks(Context context); + SyncPoller, CloudAccountDetailsInner> + beginListCloudAccountDetails(Context context); /** - * List Activation Links. + * List Cloud Account Details. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model. + * @return cloud Account Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActivationLinksInner listActivationLinks(); + CloudAccountDetailsInner listCloudAccountDetails(); /** - * List Activation Links. + * List Cloud Account Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model. + * @return cloud Account Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - ActivationLinksInner listActivationLinks(Context context); + CloudAccountDetailsInner listCloudAccountDetails(Context context); /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloud Account Details model. + * @return the {@link SyncPoller} for polling of saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudAccountDetailsInner> beginListCloudAccountDetails(); + SyncPoller, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetails(); /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloud Account Details model. + * @return the {@link SyncPoller} for polling of saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudAccountDetailsInner> - beginListCloudAccountDetails(Context context); + SyncPoller, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetails(Context context); /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model. + * @return saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudAccountDetailsInner listCloudAccountDetails(); + SaasSubscriptionDetailsInner listSaasSubscriptionDetails(); /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model. + * @return saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudAccountDetailsInner listCloudAccountDetails(Context context); + SaasSubscriptionDetailsInner listSaasSubscriptionDetails(Context context); /** - * List Saas Subscription Details. + * List Activation Links. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of saaS Subscription Details model. + * @return the {@link SyncPoller} for polling of activation Links model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SaasSubscriptionDetailsInner> - beginListSaasSubscriptionDetails(); + SyncPoller, ActivationLinksInner> beginListActivationLinks(); /** - * List Saas Subscription Details. + * List Activation Links. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of saaS Subscription Details model. + * @return the {@link SyncPoller} for polling of activation Links model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SaasSubscriptionDetailsInner> - beginListSaasSubscriptionDetails(Context context); + SyncPoller, ActivationLinksInner> beginListActivationLinks(Context context); /** - * List Saas Subscription Details. + * List Activation Links. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model. + * @return activation Links model. */ @ServiceMethod(returns = ReturnType.SINGLE) - SaasSubscriptionDetailsInner listSaasSubscriptionDetails(); + ActivationLinksInner listActivationLinks(); /** - * List Saas Subscription Details. + * List Activation Links. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model. + * @return activation Links model. */ @ServiceMethod(returns = ReturnType.SINGLE) - SaasSubscriptionDetailsInner listSaasSubscriptionDetails(Context context); + ActivationLinksInner listActivationLinks(Context context); + + /** + * Add Azure Subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAddAzureSubscriptions(AzureSubscriptions body); + + /** + * Add Azure Subscriptions. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginAddAzureSubscriptions(AzureSubscriptions body, Context context); + + /** + * Add Azure Subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void addAzureSubscriptions(AzureSubscriptions body); + + /** + * Add Azure Subscriptions. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void addAzureSubscriptions(AzureSubscriptions body, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/SystemVersionsClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/SystemVersionsClient.java index 87dfb0fc7314..0d1d7fecdc60 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/SystemVersionsClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/SystemVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -16,54 +16,54 @@ */ public interface SystemVersionsClient { /** - * List SystemVersion resources by Location. + * Get a SystemVersion. * * @param location The name of the Azure region. + * @param systemversionname SystemVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. + * @return a SystemVersion along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String systemversionname, Context context); /** - * List SystemVersion resources by Location. + * Get a SystemVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param systemversionname SystemVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. + * @return a SystemVersion. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + SystemVersionInner get(String location, String systemversionname); /** - * Get a SystemVersion. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion along with {@link Response}. + * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String systemversionname, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); /** - * Get a SystemVersion. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion. + * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - SystemVersionInner get(String location, String systemversionname); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/VirtualNetworkAddressesClient.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/VirtualNetworkAddressesClient.java index 81c39d5de245..75c86c9bbc4f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/VirtualNetworkAddressesClient.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/VirtualNetworkAddressesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent; @@ -17,65 +17,6 @@ * An instance of this class provides access to all the operations defined in VirtualNetworkAddressesClient. */ public interface VirtualNetworkAddressesClient { - /** - * List VirtualNetworkAddress resources by CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); - - /** - * List VirtualNetworkAddress resources by CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, - Context context); - - /** - * Get a VirtualNetworkAddress. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname, Context context); - - /** - * Get a VirtualNetworkAddress. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VirtualNetworkAddressInner get(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname); - /** * Create a VirtualNetworkAddress. * @@ -144,6 +85,37 @@ VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloud VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, VirtualNetworkAddressInner resource, Context context); + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context); + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkAddressInner get(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname); + /** * Delete a VirtualNetworkAddress. * @@ -201,4 +173,32 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, Context context); + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ActivationLinksInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ActivationLinksInner.java index 69b4c463752e..ec527edaa8a8 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ActivationLinksInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ActivationLinksInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseBackupInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseBackupInner.java index a06276999428..3eaa38af4c12 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseBackupInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseBackupInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; @@ -29,9 +29,9 @@ public final class AutonomousDatabaseBackupInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class AutonomousDatabaseBackupInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of AutonomousDatabaseBackupInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseCharacterSetInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseCharacterSetInner.java index e6b6eb9eaf9f..51b9f007b446 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseCharacterSetInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseCharacterSetInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * AutonomousDatabaseCharacterSets resource definition. */ -@Fluent +@Immutable public final class AutonomousDatabaseCharacterSetInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class AutonomousDatabaseCharacterSetInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class AutonomousDatabaseCharacterSetInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of AutonomousDatabaseCharacterSetInner class. */ - public AutonomousDatabaseCharacterSetInner() { + private AutonomousDatabaseCharacterSetInner() { } /** @@ -58,17 +58,6 @@ public AutonomousDatabaseCharacterSetProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the AutonomousDatabaseCharacterSetInner object itself. - */ - public AutonomousDatabaseCharacterSetInner withProperties(AutonomousDatabaseCharacterSetProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseInner.java index 91f2bdaff8f8..b0eb2a493366 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; @@ -30,9 +30,9 @@ public final class AutonomousDatabaseInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class AutonomousDatabaseInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of AutonomousDatabaseInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseNationalCharacterSetInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseNationalCharacterSetInner.java index c3865dce778b..a40ea37ca841 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseNationalCharacterSetInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseNationalCharacterSetInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * AutonomousDatabaseNationalCharacterSets resource definition. */ -@Fluent +@Immutable public final class AutonomousDatabaseNationalCharacterSetInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class AutonomousDatabaseNationalCharacterSetInner extends ProxyReso private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class AutonomousDatabaseNationalCharacterSetInner extends ProxyReso private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of AutonomousDatabaseNationalCharacterSetInner class. */ - public AutonomousDatabaseNationalCharacterSetInner() { + private AutonomousDatabaseNationalCharacterSetInner() { } /** @@ -58,18 +58,6 @@ public AutonomousDatabaseNationalCharacterSetProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the AutonomousDatabaseNationalCharacterSetInner object itself. - */ - public AutonomousDatabaseNationalCharacterSetInner - withProperties(AutonomousDatabaseNationalCharacterSetProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -80,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseWalletFileInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseWalletFileInner.java index b72e2e369b56..1edb60ea3348 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseWalletFileInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseWalletFileInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDbVersionInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDbVersionInner.java index b7a2c1950a65..71601e465f04 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDbVersionInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDbVersionInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * AutonomousDbVersion resource definition. */ -@Fluent +@Immutable public final class AutonomousDbVersionInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class AutonomousDbVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class AutonomousDbVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of AutonomousDbVersionInner class. */ - public AutonomousDbVersionInner() { + private AutonomousDbVersionInner() { } /** @@ -58,17 +58,6 @@ public AutonomousDbVersionProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the AutonomousDbVersionInner object itself. - */ - public AutonomousDbVersionInner withProperties(AutonomousDbVersionProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudAccountDetailsInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudAccountDetailsInner.java index 371aa0783264..870960ede696 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudAccountDetailsInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudAccountDetailsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudExadataInfrastructureInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudExadataInfrastructureInner.java index c421e958d139..93799846fa91 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudExadataInfrastructureInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudExadataInfrastructureInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; @@ -37,9 +37,9 @@ public final class CloudExadataInfrastructureInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -47,9 +47,9 @@ public final class CloudExadataInfrastructureInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CloudExadataInfrastructureInner class. @@ -107,13 +107,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -127,13 +127,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudVmClusterInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudVmClusterInner.java index c78d2e797251..18651b65ce49 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudVmClusterInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudVmClusterInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; @@ -30,9 +30,9 @@ public final class CloudVmClusterInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class CloudVmClusterInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CloudVmClusterInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbActionResponseInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbActionResponseInner.java new file mode 100644 index 000000000000..30fb6c1ca15d --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbActionResponseInner.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.AzureResourceProvisioningState; +import java.io.IOException; + +/** + * ExascaleDbNode action response. + */ +@Immutable +public final class DbActionResponseInner implements JsonSerializable { + /* + * ExascaleDbNode provisioning state + */ + private AzureResourceProvisioningState provisioningState; + + /** + * Creates an instance of DbActionResponseInner class. + */ + private DbActionResponseInner() { + } + + /** + * Get the provisioningState property: ExascaleDbNode provisioning state. + * + * @return the provisioningState value. + */ + public AzureResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provisioningState", + this.provisioningState == null ? null : this.provisioningState.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DbActionResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DbActionResponseInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DbActionResponseInner. + */ + public static DbActionResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DbActionResponseInner deserializedDbActionResponseInner = new DbActionResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedDbActionResponseInner.provisioningState + = AzureResourceProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDbActionResponseInner; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbNodeInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbNodeInner.java index 703e6f7d5371..9135b63c1469 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbNodeInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbNodeInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * The DbNode resource belonging to vmCluster. */ -@Fluent +@Immutable public final class DbNodeInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class DbNodeInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class DbNodeInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DbNodeInner class. */ - public DbNodeInner() { + private DbNodeInner() { } /** @@ -58,17 +58,6 @@ public DbNodeProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the DbNodeInner object itself. - */ - public DbNodeInner withProperties(DbNodeProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbServerInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbServerInner.java index 598033963610..3fde2eea6613 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbServerInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbServerInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * DbServer resource model. */ -@Fluent +@Immutable public final class DbServerInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class DbServerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class DbServerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DbServerInner class. */ - public DbServerInner() { + private DbServerInner() { } /** @@ -58,17 +58,6 @@ public DbServerProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the DbServerInner object itself. - */ - public DbServerInner withProperties(DbServerProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbSystemShapeInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbSystemShapeInner.java index d4e2485e6359..f291559c10a3 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbSystemShapeInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbSystemShapeInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * DbSystemShape resource definition. */ -@Fluent +@Immutable public final class DbSystemShapeInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class DbSystemShapeInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class DbSystemShapeInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DbSystemShapeInner class. */ - public DbSystemShapeInner() { + private DbSystemShapeInner() { } /** @@ -58,17 +58,6 @@ public DbSystemShapeProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the DbSystemShapeInner object itself. - */ - public DbSystemShapeInner withProperties(DbSystemShapeProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateViewInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateViewInner.java index 1c91ac38a9f5..2b51d246b32e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateViewInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateViewInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * DnsPrivateView resource definition. */ -@Fluent +@Immutable public final class DnsPrivateViewInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class DnsPrivateViewInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class DnsPrivateViewInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DnsPrivateViewInner class. */ - public DnsPrivateViewInner() { + private DnsPrivateViewInner() { } /** @@ -58,17 +58,6 @@ public DnsPrivateViewProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the DnsPrivateViewInner object itself. - */ - public DnsPrivateViewInner withProperties(DnsPrivateViewProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateZoneInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateZoneInner.java index 9ebf6d9d21cb..2efe9c7eeac1 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateZoneInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateZoneInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * DnsPrivateZone resource definition. */ -@Fluent +@Immutable public final class DnsPrivateZoneInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class DnsPrivateZoneInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class DnsPrivateZoneInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DnsPrivateZoneInner class. */ - public DnsPrivateZoneInner() { + private DnsPrivateZoneInner() { } /** @@ -58,17 +58,6 @@ public DnsPrivateZoneProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the DnsPrivateZoneInner object itself. - */ - public DnsPrivateZoneInner withProperties(DnsPrivateZoneProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExadbVmClusterInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExadbVmClusterInner.java new file mode 100644 index 000000000000..1754f738d1cb --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExadbVmClusterInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * ExadbVmCluster resource definition. + */ +@Fluent +public final class ExadbVmClusterInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ExadbVmClusterProperties properties; + + /* + * The availability zones. + */ + private List zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ExadbVmClusterInner class. + */ + public ExadbVmClusterInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExadbVmClusterProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ExadbVmClusterInner object itself. + */ + public ExadbVmClusterInner withProperties(ExadbVmClusterProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ExadbVmClusterInner object itself. + */ + public ExadbVmClusterInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ExadbVmClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ExadbVmClusterInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExadbVmClusterInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExadbVmClusterInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExadbVmClusterInner. + */ + public static ExadbVmClusterInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExadbVmClusterInner deserializedExadbVmClusterInner = new ExadbVmClusterInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExadbVmClusterInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExadbVmClusterInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExadbVmClusterInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedExadbVmClusterInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExadbVmClusterInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedExadbVmClusterInner.properties = ExadbVmClusterProperties.fromJson(reader); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedExadbVmClusterInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedExadbVmClusterInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExadbVmClusterInner; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExascaleDbNodeInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExascaleDbNodeInner.java new file mode 100644 index 000000000000..63b953c4d54d --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExascaleDbNodeInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodeProperties; +import java.io.IOException; + +/** + * The DbNode resource belonging to ExadbVmCluster. + */ +@Immutable +public final class ExascaleDbNodeInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ExascaleDbNodeProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ExascaleDbNodeInner class. + */ + private ExascaleDbNodeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExascaleDbNodeProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbNodeInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbNodeInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExascaleDbNodeInner. + */ + public static ExascaleDbNodeInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbNodeInner deserializedExascaleDbNodeInner = new ExascaleDbNodeInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExascaleDbNodeInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExascaleDbNodeInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExascaleDbNodeInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedExascaleDbNodeInner.properties = ExascaleDbNodeProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedExascaleDbNodeInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbNodeInner; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExascaleDbStorageVaultInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExascaleDbStorageVaultInner.java new file mode 100644 index 000000000000..8608e3e59a76 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExascaleDbStorageVaultInner.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * ExascaleDbStorageVault resource definition. + */ +@Fluent +public final class ExascaleDbStorageVaultInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + private ExascaleDbStorageVaultProperties properties; + + /* + * The availability zones. + */ + private List zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ExascaleDbStorageVaultInner class. + */ + public ExascaleDbStorageVaultInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExascaleDbStorageVaultProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ExascaleDbStorageVaultInner object itself. + */ + public ExascaleDbStorageVaultInner withProperties(ExascaleDbStorageVaultProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ExascaleDbStorageVaultInner object itself. + */ + public ExascaleDbStorageVaultInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ExascaleDbStorageVaultInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ExascaleDbStorageVaultInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbStorageVaultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbStorageVaultInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExascaleDbStorageVaultInner. + */ + public static ExascaleDbStorageVaultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbStorageVaultInner deserializedExascaleDbStorageVaultInner = new ExascaleDbStorageVaultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedExascaleDbStorageVaultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedExascaleDbStorageVaultInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedExascaleDbStorageVaultInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedExascaleDbStorageVaultInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExascaleDbStorageVaultInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedExascaleDbStorageVaultInner.properties + = ExascaleDbStorageVaultProperties.fromJson(reader); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedExascaleDbStorageVaultInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedExascaleDbStorageVaultInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbStorageVaultInner; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/FlexComponentInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/FlexComponentInner.java new file mode 100644 index 000000000000..ff13c05995f9 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/FlexComponentInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.FlexComponentProperties; +import java.io.IOException; + +/** + * FlexComponent Resource Definition. + */ +@Immutable +public final class FlexComponentInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private FlexComponentProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of FlexComponentInner class. + */ + private FlexComponentInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public FlexComponentProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FlexComponentInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FlexComponentInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FlexComponentInner. + */ + public static FlexComponentInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FlexComponentInner deserializedFlexComponentInner = new FlexComponentInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedFlexComponentInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedFlexComponentInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedFlexComponentInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedFlexComponentInner.properties = FlexComponentProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedFlexComponentInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFlexComponentInner; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/GiMinorVersionInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/GiMinorVersionInner.java new file mode 100644 index 000000000000..17b9fb240ebc --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/GiMinorVersionInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersionProperties; +import java.io.IOException; + +/** + * The Oracle Grid Infrastructure (GI) minor version resource definition. + */ +@Immutable +public final class GiMinorVersionInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private GiMinorVersionProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GiMinorVersionInner class. + */ + private GiMinorVersionInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public GiMinorVersionProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GiMinorVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GiMinorVersionInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GiMinorVersionInner. + */ + public static GiMinorVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GiMinorVersionInner deserializedGiMinorVersionInner = new GiMinorVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGiMinorVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGiMinorVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGiMinorVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedGiMinorVersionInner.properties = GiMinorVersionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedGiMinorVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGiMinorVersionInner; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/GiVersionInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/GiVersionInner.java index 13a0c6dd2a23..8e9e4491c5eb 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/GiVersionInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/GiVersionInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * GiVersion resource definition. */ -@Fluent +@Immutable public final class GiVersionInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class GiVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class GiVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of GiVersionInner class. */ - public GiVersionInner() { + private GiVersionInner() { } /** @@ -58,17 +58,6 @@ public GiVersionProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the GiVersionInner object itself. - */ - public GiVersionInner withProperties(GiVersionProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OperationInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OperationInner.java index ef0b84fba681..8372f78e852f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OperationInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OperationInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; @@ -28,8 +28,8 @@ public final class OperationInner implements JsonSerializable { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. */ private Boolean isDataAction; @@ -45,7 +45,7 @@ public final class OperationInner implements JsonSerializable { private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ private ActionType actionType; @@ -67,7 +67,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -95,8 +95,8 @@ public Origin origin() { } /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OracleSubscriptionInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OracleSubscriptionInner.java index ea3ee86cbb68..b3e1e1768beb 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OracleSubscriptionInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OracleSubscriptionInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; @@ -35,9 +35,9 @@ public final class OracleSubscriptionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -45,9 +45,9 @@ public final class OracleSubscriptionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of OracleSubscriptionInner class. @@ -105,13 +105,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -125,13 +125,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/PrivateIpAddressPropertiesInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/PrivateIpAddressPropertiesInner.java index 604b3c7b4e2e..b85bd8006ca6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/PrivateIpAddressPropertiesInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/PrivateIpAddressPropertiesInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SaasSubscriptionDetailsInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SaasSubscriptionDetailsInner.java index 9cc331333445..b7ca44223de0 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SaasSubscriptionDetailsInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SaasSubscriptionDetailsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SystemVersionInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SystemVersionInner.java index d1512c1175f9..c790b60552ee 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SystemVersionInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SystemVersionInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -16,7 +16,7 @@ /** * SystemVersion resource Definition. */ -@Fluent +@Immutable public final class SystemVersionInner extends ProxyResource { /* * The resource-specific properties for this resource. @@ -29,9 +29,9 @@ public final class SystemVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,14 +39,14 @@ public final class SystemVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of SystemVersionInner class. */ - public SystemVersionInner() { + private SystemVersionInner() { } /** @@ -58,17 +58,6 @@ public SystemVersionProperties properties() { return this.properties; } - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the SystemVersionInner object itself. - */ - public SystemVersionInner withProperties(SystemVersionProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -79,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +88,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/VirtualNetworkAddressInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/VirtualNetworkAddressInner.java index 3ea0390a0fde..d4bcee17d65f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/VirtualNetworkAddressInner.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/VirtualNetworkAddressInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.fluent.models; @@ -29,9 +29,9 @@ public final class VirtualNetworkAddressInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class VirtualNetworkAddressInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of VirtualNetworkAddressInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/package-info.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/package-info.java index 369217dc3970..396b6f1af510 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/package-info.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for OracleDatabaseResourceManager. - * null. + * Package containing the inner data models for OracleDatabase. */ package com.azure.resourcemanager.oracledatabase.fluent.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/package-info.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/package-info.java index 4b2933553e23..ea3b4fe452ec 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/package-info.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for OracleDatabaseResourceManager. - * null. + * Package containing the service clients for OracleDatabase. */ package com.azure.resourcemanager.oracledatabase.fluent; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ActivationLinksImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ActivationLinksImpl.java index 2fe1eaa983f0..85c4697978ee 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ActivationLinksImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ActivationLinksImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupImpl.java index 0513f6082494..282c871cee06 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsClientImpl.java index 78cea68fe887..882f7dd801e3 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -28,13 +28,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; 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.oracledatabase.fluent.AutonomousDatabaseBackupsClient; import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseBackupInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseBackupListResult; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,103 +54,165 @@ public final class AutonomousDatabaseBackupsClientImpl implements AutonomousData /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of AutonomousDatabaseBackupsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AutonomousDatabaseBackupsClientImpl(OracleDatabaseResourceManagerImpl client) { + AutonomousDatabaseBackupsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(AutonomousDatabaseBackupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabaseBackups to be used by + * The interface defining all the services for OracleDatabaseManagementClientAutonomousDatabaseBackups to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface AutonomousDatabaseBackupsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAutonomousDatabase(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AutonomousDatabaseBackupInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AutonomousDatabaseBackupInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, - @PathParam("adbbackupid") String adbbackupid, - @BodyParam("application/json") AutonomousDatabaseBackupInner resource, @HeaderParam("Accept") String accept, - Context context); + @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") - @ExpectedResponses({ 200, 202 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, - @PathParam("adbbackupid") String adbbackupid, - @BodyParam("application/json") AutonomousDatabaseBackupUpdate properties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Accept") String accept, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutonomousDatabaseBackupUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutonomousDatabaseBackupUpdate properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByAutonomousDatabase( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByAutonomousDatabaseSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByAutonomousDatabaseNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByAutonomousDatabaseNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return autonomousDatabaseBackup resource definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByAutonomousDatabaseSinglePageAsync(String resourceGroupName, String autonomousdatabasename) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -165,164 +229,247 @@ Mono> listByAutonomousDatabaseNext( return Mono.error( new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByAutonomousDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, contentType, + accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, contentType, + accept, resource, Context.NONE); + } + + /** + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return autonomousDatabaseBackup resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAutonomousDatabaseSinglePageAsync( - String resourceGroupName, String autonomousdatabasename, Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByAutonomousDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, contentType, + accept, resource, context); } /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of autonomousDatabaseBackup resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAutonomousDatabaseAsync(String resourceGroupName, - String autonomousdatabasename) { - return new PagedFlux<>(() -> listByAutonomousDatabaseSinglePageAsync(resourceGroupName, autonomousdatabasename), - nextLink -> listByAutonomousDatabaseNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseBackupInner> + beginCreateOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, + this.client.getContext()); } /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, resource); + return this.client.getLroResult(response, + AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, Context.NONE); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAutonomousDatabaseAsync(String resourceGroupName, - String autonomousdatabasename, Context context) { - return new PagedFlux<>( - () -> listByAutonomousDatabaseSinglePageAsync(resourceGroupName, autonomousdatabasename, context), - nextLink -> listByAutonomousDatabaseNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, resource, context); + return this.client.getLroResult(response, + AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, context); } /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation as paginated response with - * {@link PagedIterable}. + * @return autonomousDatabaseBackup resource definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename) { - return new PagedIterable<>(listByAutonomousDatabaseAsync(resourceGroupName, autonomousdatabasename)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation as paginated response with - * {@link PagedIterable}. + * @return autonomousDatabaseBackup resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename, Context context) { - return new PagedIterable<>(listByAutonomousDatabaseAsync(resourceGroupName, autonomousdatabasename, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource) { + return beginCreateOrUpdate(resourceGroupName, autonomousdatabasename, adbbackupid, resource).getFinalResult(); } /** - * Get a AutonomousDatabaseBackup. + * Create a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseBackup along with {@link Response} on successful completion of {@link Mono}. + * @return autonomousDatabaseBackup resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); - } - if (adbbackupid == null) { - return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, autonomousdatabasename, adbbackupid, resource, context) + .getFinalResult(); } /** @@ -331,7 +478,6 @@ private Mono> getWithResponseAsync(Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -339,7 +485,7 @@ private Mono> getWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid, Context context) { + String autonomousdatabasename, String adbbackupid) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -360,9 +506,9 @@ private Mono> getWithResponseAsync(Strin return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, autonomousdatabasename, adbbackupid, accept, context); + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -398,7 +544,31 @@ private Mono getAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context) { - return getWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, autonomousdatabasename, adbbackupid, accept, context); } /** @@ -419,21 +589,19 @@ public AutonomousDatabaseBackupInner get(String resourceGroupName, String autono } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -453,231 +621,200 @@ private Mono>> createOrUpdateWithResponseAsync(String if (adbbackupid == null) { return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, resource, - accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource, Context context) { + private Response deleteWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } if (adbbackupid == null) { - return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, resource, accept, - context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, accept, + Context.NONE); } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomousDatabaseBackup resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseBackupInner> - beginCreateOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid, - AutonomousDatabaseBackupInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, accept, context); } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomousDatabaseBackup resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseBackupInner> - beginCreateOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid, - AutonomousDatabaseBackupInner resource, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - autonomousdatabasename, adbbackupid, resource, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, - context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String autonomousdatabasename, + String adbbackupid) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( - String resourceGroupName, String autonomousdatabasename, String adbbackupid, - AutonomousDatabaseBackupInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource) - .getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + String adbbackupid) { + Response response = deleteWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( - String resourceGroupName, String autonomousdatabasename, String adbbackupid, - AutonomousDatabaseBackupInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource, context) - .getSyncPoller(); - } - - /** - * Create a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context) { + Response response + = deleteWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource, context) - .last() + private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid) { + return beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, AutonomousDatabaseBackupInner resource) { - return createOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource).block(); + public void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid) { + beginDelete(resourceGroupName, autonomousdatabasename, adbbackupid).getFinalResult(); } /** - * Create a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, AutonomousDatabaseBackupInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource, context).block(); + public void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context) { + beginDelete(resourceGroupName, autonomousdatabasename, adbbackupid, context).getFinalResult(); } /** @@ -720,14 +857,65 @@ private Mono>> updateWithResponseAsync(String resource } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, properties, - accept, context)) + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, contentType, + accept, properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupUpdate properties) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, contentType, + accept, properties, Context.NONE); + } + /** * Update a AutonomousDatabaseBackup. * @@ -739,40 +927,44 @@ private Mono>> updateWithResponseAsync(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 autonomousDatabaseBackup resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return autonomousDatabaseBackup resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupUpdate properties, Context context) { + private Response updateWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupUpdate properties, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } if (adbbackupid == null) { - return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); } if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, autonomousdatabasename, adbbackupid, properties, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, contentType, + accept, properties, context); } /** @@ -798,31 +990,6 @@ private PollerFlux, AutonomousDatabase this.client.getContext()); } - /** - * Update a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomousDatabaseBackup resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseBackupInner> beginUpdateAsync( - String resourceGroupName, String autonomousdatabasename, String adbbackupid, - AutonomousDatabaseBackupUpdate properties, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, - context); - } - /** * Update a AutonomousDatabaseBackup. * @@ -839,8 +1006,10 @@ private PollerFlux, AutonomousDatabase public SyncPoller, AutonomousDatabaseBackupInner> beginUpdate( String resourceGroupName, String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, properties); + return this.client.getLroResult(response, + AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, Context.NONE); } /** @@ -860,8 +1029,10 @@ public SyncPoller, AutonomousDatabaseB public SyncPoller, AutonomousDatabaseBackupInner> beginUpdate( String resourceGroupName, String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupUpdate properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context); + return this.client.getLroResult(response, + AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, context); } /** @@ -883,26 +1054,6 @@ private Mono updateAsync(String resourceGroupName .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomousDatabaseBackup resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, AutonomousDatabaseBackupUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Update a AutonomousDatabaseBackup. * @@ -918,7 +1069,7 @@ private Mono updateAsync(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) public AutonomousDatabaseBackupInner update(String resourceGroupName, String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupUpdate properties) { - return updateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties).block(); + return beginUpdate(resourceGroupName, autonomousdatabasename, adbbackupid, properties).getFinalResult(); } /** @@ -937,23 +1088,24 @@ public AutonomousDatabaseBackupInner update(String resourceGroupName, String aut @ServiceMethod(returns = ReturnType.SINGLE) public AutonomousDatabaseBackupInner update(String resourceGroupName, String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupUpdate properties, Context context) { - return updateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context).block(); + return beginUpdate(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context) + .getFinalResult(); } /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid) { + private Mono> + listByAutonomousDatabaseSinglePageAsync(String resourceGroupName, String autonomousdatabasename) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -970,197 +1122,148 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } - if (adbbackupid == null) { - return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); - } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, accept, context)) + return FluxUtil + .withContext( + context -> service.listByAutonomousDatabase(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, String adbbackupid, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); - } - if (adbbackupid == null) { - return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, autonomousdatabasename, adbbackupid, accept, context); - } - - /** - * Delete a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String autonomousdatabasename, - String adbbackupid) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a AutonomousDatabaseBackup. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, - String adbbackupid) { - return this.beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid).getSyncPoller(); - } - - /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, Context context) { - return this.beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAutonomousDatabaseAsync(String resourceGroupName, + String autonomousdatabasename) { + return new PagedFlux<>(() -> listByAutonomousDatabaseSinglePageAsync(resourceGroupName, autonomousdatabasename), + nextLink -> listByAutonomousDatabaseNextSinglePageAsync(nextLink)); } /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid) { - return beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByAutonomousDatabaseSinglePage(String resourceGroupName, + String autonomousdatabasename) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByAutonomousDatabaseSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid, - Context context) { - return beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByAutonomousDatabaseSinglePage(String resourceGroupName, + String autonomousdatabasename, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByAutonomousDatabaseSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid) { - deleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename) { + return new PagedIterable<>(() -> listByAutonomousDatabaseSinglePage(resourceGroupName, autonomousdatabasename), + nextLink -> listByAutonomousDatabaseNextSinglePage(nextLink)); } /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context) { - deleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename, Context context) { + return new PagedIterable<>( + () -> listByAutonomousDatabaseSinglePage(resourceGroupName, autonomousdatabasename, context), + nextLink -> listByAutonomousDatabaseNextSinglePage(nextLink, context)); } /** @@ -1192,6 +1295,33 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Stri .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByAutonomousDatabaseNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByAutonomousDatabaseNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1200,23 +1330,26 @@ public void delete(String resourceGroupName, String autonomousdatabasename, 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 response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByAutonomousDatabaseNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listByAutonomousDatabaseNextSinglePage(String nextLink, + Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByAutonomousDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByAutonomousDatabaseNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseBackupsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsImpl.java index ed6eed628924..14d1c324bd00 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,20 +27,6 @@ public AutonomousDatabaseBackupsImpl(AutonomousDatabaseBackupsClient innerClient this.serviceManager = serviceManager; } - public PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename) { - PagedIterable inner - = this.serviceClient().listByAutonomousDatabase(resourceGroupName, autonomousdatabasename); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseBackupImpl(inner1, this.manager())); - } - - public PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename, Context context) { - PagedIterable inner - = this.serviceClient().listByAutonomousDatabase(resourceGroupName, autonomousdatabasename, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseBackupImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context) { Response inner @@ -71,6 +57,20 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Stri this.serviceClient().delete(resourceGroupName, autonomousdatabasename, adbbackupid, context); } + public PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename) { + PagedIterable inner + = this.serviceClient().listByAutonomousDatabase(resourceGroupName, autonomousdatabasename); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseBackupImpl(inner1, this.manager())); + } + + public PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename, Context context) { + PagedIterable inner + = this.serviceClient().listByAutonomousDatabase(resourceGroupName, autonomousdatabasename, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseBackupImpl(inner1, this.manager())); + } + public AutonomousDatabaseBackup getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetImpl.java index 647a34250188..0684c020d5d3 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetsClientImpl.java index f03d2e52ea5f..169acf0b52dc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient; import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseCharacterSetInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSetListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseCharacterSetListResult; import reactor.core.publisher.Mono; /** @@ -42,64 +43,90 @@ public final class AutonomousDatabaseCharacterSetsClientImpl implements Autonomo /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of AutonomousDatabaseCharacterSetsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AutonomousDatabaseCharacterSetsClientImpl(OracleDatabaseResourceManagerImpl client) { + AutonomousDatabaseCharacterSetsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(AutonomousDatabaseCharacterSetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabaseCharacterSets to be + * The interface defining all the services for OracleDatabaseManagementClientAutonomousDatabaseCharacterSets to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface AutonomousDatabaseCharacterSetsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @PathParam("adbscharsetname") String adbscharsetname, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("adbscharsetname") String adbscharsetname, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List AutonomousDatabaseCharacterSet resources by Location. + * Get a AutonomousDatabaseCharacterSet. * * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a AutonomousDatabaseCharacterSet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, + String adbscharsetname) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -111,228 +138,229 @@ private Mono> listByLocationS if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (adbscharsetname == null) { + return Mono + .error(new IllegalArgumentException("Parameter adbscharsetname is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, adbscharsetname, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AutonomousDatabaseCharacterSet resources by Location. + * Get a AutonomousDatabaseCharacterSet. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a AutonomousDatabaseCharacterSet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String location, String adbscharsetname) { + return getWithResponseAsync(location, adbscharsetname).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List AutonomousDatabaseCharacterSet resources by Location. + * Get a AutonomousDatabaseCharacterSet. * * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with - * {@link PagedFlux}. + * @return a AutonomousDatabaseCharacterSet along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String adbscharsetname, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (adbscharsetname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbscharsetname is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, adbscharsetname, accept, context); } /** - * List AutonomousDatabaseCharacterSet resources by Location. + * Get a AutonomousDatabaseCharacterSet. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with - * {@link PagedFlux}. + * @return a AutonomousDatabaseCharacterSet. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseCharacterSetInner get(String location, String adbscharsetname) { + return getWithResponse(location, adbscharsetname, Context.NONE).getValue(); } /** - * List AutonomousDatabaseCharacterSet resources by Location. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AutonomousDatabaseCharacterSet resources by Location. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Get a AutonomousDatabaseCharacterSet. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, - String adbscharsetname) { + private PagedResponse listByLocationSinglePage(String location) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (adbscharsetname == null) { - return Mono - .error(new IllegalArgumentException("Parameter adbscharsetname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, adbscharsetname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a AutonomousDatabaseCharacterSet. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, - String adbscharsetname, Context context) { + private PagedResponse listByLocationSinglePage(String location, + Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (adbscharsetname == null) { - return Mono - .error(new IllegalArgumentException("Parameter adbscharsetname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, adbscharsetname, accept, context); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a AutonomousDatabaseCharacterSet. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet on successful completion of {@link Mono}. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String adbscharsetname) { - return getWithResponseAsync(location, adbscharsetname).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(() -> listByLocationSinglePage(location), + nextLink -> listByLocationNextSinglePage(nextLink)); } /** - * Get a AutonomousDatabaseCharacterSet. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String adbscharsetname, - Context context) { - return getWithResponseAsync(location, adbscharsetname, context).block(); - } - - /** - * Get a AutonomousDatabaseCharacterSet. - * - * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseCharacterSetInner get(String location, String adbscharsetname) { - return getWithResponse(location, adbscharsetname, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(() -> listByLocationSinglePage(location, context), + nextLink -> listByLocationNextSinglePage(nextLink, context)); } /** @@ -363,6 +391,33 @@ public AutonomousDatabaseCharacterSetInner get(String location, String adbschars .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByLocationNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -371,23 +426,26 @@ public AutonomousDatabaseCharacterSetInner get(String location, String adbschars * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, + private PagedResponse listByLocationNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseCharacterSetsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetsImpl.java index 5843c2cde437..87664881ed16 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseCharacterSetsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,19 +27,6 @@ public AutonomousDatabaseCharacterSetsImpl(AutonomousDatabaseCharacterSetsClient this.serviceManager = serviceManager; } - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new AutonomousDatabaseCharacterSetImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner - = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new AutonomousDatabaseCharacterSetImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String adbscharsetname, Context context) { Response inner @@ -61,6 +48,19 @@ public AutonomousDatabaseCharacterSet get(String location, String adbscharsetnam } } + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AutonomousDatabaseCharacterSetImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner + = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AutonomousDatabaseCharacterSetImpl(inner1, this.manager())); + } + private AutonomousDatabaseCharacterSetsClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseImpl.java index ffea74178c61..43bdb0e57ca5 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -14,6 +14,7 @@ import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdate; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdateProperties; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseWalletFile; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails; import com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails; import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; @@ -154,6 +155,15 @@ public AutonomousDatabase refresh(Context context) { return this; } + public AutonomousDatabase switchover(PeerDbDetails body) { + return serviceManager.autonomousDatabases().switchover(resourceGroupName, autonomousdatabasename, body); + } + + public AutonomousDatabase switchover(PeerDbDetails body, Context context) { + return serviceManager.autonomousDatabases() + .switchover(resourceGroupName, autonomousdatabasename, body, context); + } + public AutonomousDatabase failover(PeerDbDetails body) { return serviceManager.autonomousDatabases().failover(resourceGroupName, autonomousdatabasename, body); } @@ -188,13 +198,15 @@ public AutonomousDatabase shrink(Context context) { return serviceManager.autonomousDatabases().shrink(resourceGroupName, autonomousdatabasename, context); } - public AutonomousDatabase switchover(PeerDbDetails body) { - return serviceManager.autonomousDatabases().switchover(resourceGroupName, autonomousdatabasename, body); + public AutonomousDatabase changeDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails body) { + return serviceManager.autonomousDatabases() + .changeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body); } - public AutonomousDatabase switchover(PeerDbDetails body, Context context) { + public AutonomousDatabase changeDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails body, + Context context) { return serviceManager.autonomousDatabases() - .switchover(resourceGroupName, autonomousdatabasename, body, context); + .changeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body, context); } public AutonomousDatabaseImpl withRegion(Region location) { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetImpl.java index d10f0f44eb20..12cc05f766f4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetsClientImpl.java index 423c8167dfc5..09815dd63b88 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient; import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseNationalCharacterSetInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSetListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseNationalCharacterSetListResult; import reactor.core.publisher.Mono; /** @@ -44,66 +45,93 @@ public final class AutonomousDatabaseNationalCharacterSetsClientImpl /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of AutonomousDatabaseNationalCharacterSetsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AutonomousDatabaseNationalCharacterSetsClientImpl(OracleDatabaseResourceManagerImpl client) { + AutonomousDatabaseNationalCharacterSetsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(AutonomousDatabaseNationalCharacterSetsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSets + * The interface defining all the services for OracleDatabaseManagementClientAutonomousDatabaseNationalCharacterSets * to be used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface AutonomousDatabaseNationalCharacterSetsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("adbsncharsetname") String adbsncharsetname, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("adbsncharsetname") String adbsncharsetname, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * Get a AutonomousDatabaseNationalCharacterSet. * * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByLocationSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, + String adbsncharsetname) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -115,232 +143,233 @@ Mono> listByLocationN if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (adbsncharsetname == null) { + return Mono + .error(new IllegalArgumentException("Parameter adbsncharsetname is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, adbsncharsetname, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * Get a AutonomousDatabaseNationalCharacterSet. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a AutonomousDatabaseNationalCharacterSet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByLocationSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String location, String adbsncharsetname) { + return getWithResponseAsync(location, adbsncharsetname).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * Get a AutonomousDatabaseNationalCharacterSet. * * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with - * {@link PagedFlux}. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, + String adbsncharsetname, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (adbsncharsetname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter adbsncharsetname is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, adbsncharsetname, accept, context); } /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * Get a AutonomousDatabaseNationalCharacterSet. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with - * {@link PagedFlux}. + * @return a AutonomousDatabaseNationalCharacterSet. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, - Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseNationalCharacterSetInner get(String location, String adbsncharsetname) { + return getWithResponse(location, adbsncharsetname, Context.NONE).getValue(); } /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Get a AutonomousDatabaseNationalCharacterSet. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, - String adbsncharsetname) { + private PagedResponse listByLocationSinglePage(String location) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (adbsncharsetname == null) { - return Mono - .error(new IllegalArgumentException("Parameter adbsncharsetname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, adbsncharsetname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByLocationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a AutonomousDatabaseNationalCharacterSet. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, - String adbsncharsetname, Context context) { + private PagedResponse listByLocationSinglePage(String location, + Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (adbsncharsetname == null) { - return Mono - .error(new IllegalArgumentException("Parameter adbsncharsetname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, adbsncharsetname, accept, context); + Response res + = service.listByLocationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a AutonomousDatabaseNationalCharacterSet. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet on successful completion of {@link Mono}. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String adbsncharsetname) { - return getWithResponseAsync(location, adbsncharsetname).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(() -> listByLocationSinglePage(location), + nextLink -> listByLocationNextSinglePage(nextLink)); } /** - * Get a AutonomousDatabaseNationalCharacterSet. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, - String adbsncharsetname, Context context) { - return getWithResponseAsync(location, adbsncharsetname, context).block(); - } - - /** - * Get a AutonomousDatabaseNationalCharacterSet. - * - * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseNationalCharacterSetInner get(String location, String adbsncharsetname) { - return getWithResponse(location, adbsncharsetname, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(() -> listByLocationSinglePage(location, context), + nextLink -> listByLocationNextSinglePage(nextLink, context)); } /** @@ -372,6 +401,33 @@ public AutonomousDatabaseNationalCharacterSetInner get(String location, String a .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByLocationNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -380,23 +436,27 @@ public AutonomousDatabaseNationalCharacterSetInner get(String location, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByLocationNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listByLocationNextSinglePage(String nextLink, + Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER + = new ClientLogger(AutonomousDatabaseNationalCharacterSetsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetsImpl.java index 3ceb4cd9749a..28c564e3d95d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseNationalCharacterSetsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,20 +27,6 @@ public AutonomousDatabaseNationalCharacterSetsImpl(AutonomousDatabaseNationalCha this.serviceManager = serviceManager; } - public PagedIterable listByLocation(String location) { - PagedIterable inner - = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new AutonomousDatabaseNationalCharacterSetImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner - = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new AutonomousDatabaseNationalCharacterSetImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String adbsncharsetname, Context context) { Response inner @@ -62,6 +48,20 @@ public AutonomousDatabaseNationalCharacterSet get(String location, String adbsnc } } + public PagedIterable listByLocation(String location) { + PagedIterable inner + = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AutonomousDatabaseNationalCharacterSetImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner + = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AutonomousDatabaseNationalCharacterSetImpl(inner1, this.manager())); + } + private AutonomousDatabaseNationalCharacterSetsClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseVersionsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseVersionsClientImpl.java index 94103c3ddc13..2a77791b9ff4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseVersionsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.AutonomousDatabaseVersionsClient; import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDbVersionInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDbVersionListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDbVersionListResult; import reactor.core.publisher.Mono; /** @@ -42,65 +43,92 @@ public final class AutonomousDatabaseVersionsClientImpl implements AutonomousDat /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of AutonomousDatabaseVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - AutonomousDatabaseVersionsClientImpl(OracleDatabaseResourceManagerImpl client) { + AutonomousDatabaseVersionsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(AutonomousDatabaseVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabaseVersions to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for OracleDatabaseManagementClientAutonomousDatabaseVersions to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface AutonomousDatabaseVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, + @PathParam("autonomousdbversionsname") String autonomousdbversionsname, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("autonomousdbversionsname") String autonomousdbversionsname, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List AutonomousDbVersion resources by Location. + * Get a AutonomousDbVersion. * * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a AutonomousDbVersion along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, + String autonomousdbversionsname) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -112,225 +140,227 @@ private Mono> listByLocationSinglePageAs if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (autonomousdbversionsname == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdbversionsname is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, autonomousdbversionsname, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AutonomousDbVersion resources by Location. + * Get a AutonomousDbVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param autonomousdbversionsname AutonomousDbVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a AutonomousDbVersion on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String location, String autonomousdbversionsname) { + return getWithResponseAsync(location, autonomousdbversionsname) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List AutonomousDbVersion resources by Location. + * Get a AutonomousDbVersion. * * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedFlux}. + * @return a AutonomousDbVersion along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String autonomousdbversionsname, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (autonomousdbversionsname == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Parameter autonomousdbversionsname is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, autonomousdbversionsname, accept, context); } /** - * List AutonomousDbVersion resources by Location. + * Get a AutonomousDbVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param autonomousdbversionsname AutonomousDbVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedFlux}. + * @return a AutonomousDbVersion. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDbVersionInner get(String location, String autonomousdbversionsname) { + return getWithResponse(location, autonomousdbversionsname, Context.NONE).getValue(); } /** - * List AutonomousDbVersion resources by Location. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AutonomousDbVersion resources by Location. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Get a AutonomousDbVersion. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, - String autonomousdbversionsname) { + private PagedResponse listByLocationSinglePage(String location) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (autonomousdbversionsname == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdbversionsname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, autonomousdbversionsname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a AutonomousDbVersion. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, - String autonomousdbversionsname, Context context) { + private PagedResponse listByLocationSinglePage(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (autonomousdbversionsname == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdbversionsname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, autonomousdbversionsname, accept, context); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a AutonomousDbVersion. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion on successful completion of {@link Mono}. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String autonomousdbversionsname) { - return getWithResponseAsync(location, autonomousdbversionsname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(() -> listByLocationSinglePage(location), + nextLink -> listByLocationNextSinglePage(nextLink)); } /** - * Get a AutonomousDbVersion. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String autonomousdbversionsname, - Context context) { - return getWithResponseAsync(location, autonomousdbversionsname, context).block(); - } - - /** - * Get a AutonomousDbVersion. - * - * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDbVersionInner get(String location, String autonomousdbversionsname) { - return getWithResponse(location, autonomousdbversionsname, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(() -> listByLocationSinglePage(location, context), + nextLink -> listByLocationNextSinglePage(nextLink, context)); } /** @@ -360,6 +390,33 @@ private Mono> listByLocationNextSinglePa .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByLocationNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -368,23 +425,25 @@ private Mono> listByLocationNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByLocationNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseVersionsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseVersionsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseVersionsImpl.java index 3e16cd6da6e5..331026127731 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseVersionsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,16 +27,6 @@ public AutonomousDatabaseVersionsImpl(AutonomousDatabaseVersionsClient innerClie this.serviceManager = serviceManager; } - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDbVersionImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDbVersionImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String autonomousdbversionsname, Context context) { Response inner @@ -58,6 +48,16 @@ public AutonomousDbVersion get(String location, String autonomousdbversionsname) } } + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDbVersionImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDbVersionImpl(inner1, this.manager())); + } + private AutonomousDatabaseVersionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseWalletFileImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseWalletFileImpl.java index fd43b343ee77..1e119ca83536 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseWalletFileImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseWalletFileImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabasesClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabasesClientImpl.java index 907f76320544..4db253a54d36 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabasesClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabasesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -29,15 +29,18 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; 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.oracledatabase.fluent.AutonomousDatabasesClient; import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseInner; import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseWalletFileInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseListResult; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdate; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails; import com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails; import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; @@ -57,143 +60,274 @@ public final class AutonomousDatabasesClientImpl implements AutonomousDatabasesC /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of AutonomousDatabasesClientImpl. * * @param client the instance of the service client containing this operation class. */ - AutonomousDatabasesClientImpl(OracleDatabaseResourceManagerImpl client) { + AutonomousDatabasesClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(AutonomousDatabasesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabases to be used by the + * The interface defining all the services for OracleDatabaseManagementClientAutonomousDatabases to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface AutonomousDatabasesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutonomousDatabaseInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutonomousDatabaseInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("autonomousdatabasename") String autonomousdatabasename, - @BodyParam("application/json") AutonomousDatabaseInner resource, @HeaderParam("Accept") String accept, + @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutonomousDatabaseUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, - @BodyParam("application/json") AutonomousDatabaseUpdate properties, @HeaderParam("Accept") String accept, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AutonomousDatabaseUpdate properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> switchover(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PeerDbDetails body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response switchoverSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PeerDbDetails body, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/failover") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> failover(@HostParam("$host") String endpoint, + Mono>> failover(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, - @BodyParam("application/json") PeerDbDetails body, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PeerDbDetails body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/failover") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response failoverSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PeerDbDetails body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateWallet(@HostParam("$host") String endpoint, + Mono> generateWallet(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, - @BodyParam("application/json") GenerateAutonomousDatabaseWalletDetails body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") GenerateAutonomousDatabaseWalletDetails body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response generateWalletSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") GenerateAutonomousDatabaseWalletDetails body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restore(@HostParam("$host") String endpoint, + Mono>> restore(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, - @BodyParam("application/json") RestoreAutonomousDatabaseDetails body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RestoreAutonomousDatabaseDetails body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response restoreSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RestoreAutonomousDatabaseDetails body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> shrink(@HostParam("$host") String endpoint, + Mono>> shrink(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response shrinkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> switchover(@HostParam("$host") String endpoint, + Mono>> changeDisasterRecoveryConfiguration(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, - @BodyParam("application/json") PeerDbDetails body, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DisasterRecoveryConfigurationDetails body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response changeDisasterRecoveryConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DisasterRecoveryConfigurationDetails body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -201,7 +335,15 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -235,30 +377,14 @@ private Mono> listSinglePageAsync() { /** * List AutonomousDatabase resources by subscription ID. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** @@ -266,12 +392,25 @@ private Mono> listSinglePageAsync(Context * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedFlux}. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -281,12 +420,25 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedFlux}. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -298,7 +450,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** @@ -312,21 +464,24 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List AutonomousDatabase resources by resource group. + * Create a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, AutonomousDatabaseInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -339,160 +494,242 @@ private Mono> listByResourceGroupSinglePa return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, + resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List AutonomousDatabase resources by resource group. + * Create a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return autonomous Database resource model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, resource, + Context.NONE); } /** - * List AutonomousDatabase resources by resource group. + * Create a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedFlux}. + * @return autonomous Database resource model along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, resource, + context); } /** - * List AutonomousDatabase resources by resource group. + * Create a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of autonomous Database resource model. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> beginCreateOrUpdateAsync( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, autonomousdatabasename, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); } /** - * List AutonomousDatabase resources by resource group. + * Create a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of autonomous Database resource model. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> + beginCreateOrUpdate(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, autonomousdatabasename, resource); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, Context.NONE); + } /** - * List AutonomousDatabase resources by resource group. + * Create a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of autonomous Database resource model. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, autonomousdatabasename, resource, context); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); } /** - * Get a AutonomousDatabase. + * Create a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabase along with {@link Response} on successful completion of {@link Mono}. + * @return autonomous Database resource model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String autonomousdatabasename) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a AutonomousDatabase. + * Create a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource) { + return beginCreateOrUpdate(resourceGroupName, autonomousdatabasename, resource).getFinalResult(); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, autonomousdatabasename, resource, context).getFinalResult(); + } + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a AutonomousDatabase along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, Context context) { + String autonomousdatabasename) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -510,9 +747,10 @@ private Mono> getByResourceGroupWithResponseAs new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context); + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -546,7 +784,27 @@ private Mono getByResourceGroupAsync(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String autonomousdatabasename, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, autonomousdatabasename, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context); } /** @@ -565,19 +823,19 @@ public AutonomousDatabaseInner getByResourceGroup(String resourceGroupName, Stri } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, AutonomousDatabaseInner resource) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, AutonomousDatabaseUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -594,109 +852,138 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, resource, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, + properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return autonomous Database resource model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, AutonomousDatabaseInner resource, Context context) { + private Response updateWithResponse(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, resource, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, properties, + Context.NONE); } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return autonomous Database resource model along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, autonomousdatabasename, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, properties, + context); } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of autonomous Database resource model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, AutonomousDatabaseInner> + beginUpdateAsync(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, autonomousdatabasename, resource, context); + = updateWithResponseAsync(resourceGroupName, autonomousdatabasename, properties); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -704,16 +991,18 @@ private PollerFlux, AutonomousDatabaseInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> - beginCreateOrUpdate(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource).getSyncPoller(); + beginUpdate(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties) { + Response response = updateWithResponse(resourceGroupName, autonomousdatabasename, properties); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, Context.NONE); } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -721,72 +1010,55 @@ private PollerFlux, AutonomousDatabaseInner> * @return the {@link SyncPoller} for polling of autonomous Database resource model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AutonomousDatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource, context) - .getSyncPoller(); - } - - /** - * Create a AutonomousDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, - AutonomousDatabaseInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, AutonomousDatabaseInner> beginUpdate( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties, Context context) { + Response response + = updateWithResponse(resourceGroupName, autonomousdatabasename, properties, context); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return autonomous Database resource model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, - AutonomousDatabaseInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource, context).last() + private Mono updateAsync(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties) { + return beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return autonomous Database resource model. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, - AutonomousDatabaseInner resource) { - return createOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource).block(); + public AutonomousDatabaseInner update(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties) { + return beginUpdate(resourceGroupName, autonomousdatabasename, properties).getFinalResult(); } /** - * Create a AutonomousDatabase. + * Update a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -794,25 +1066,24 @@ public AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String a * @return autonomous Database resource model. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, - AutonomousDatabaseInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource, context).block(); + public AutonomousDatabaseInner update(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties, Context context) { + return beginUpdate(resourceGroupName, autonomousdatabasename, properties, context).getFinalResult(); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, AutonomousDatabaseUpdate properties) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String autonomousdatabasename) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -829,222 +1100,341 @@ private Mono>> updateWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, properties, accept, context)) + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, AutonomousDatabaseUpdate properties, Context context) { + private Response deleteWithResponse(String resourceGroupName, String autonomousdatabasename) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, autonomousdatabasename, properties, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, Context.NONE); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> - beginUpdateAsync(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, autonomousdatabasename, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String autonomousdatabasename, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> beginUpdateAsync( - String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, autonomousdatabasename, properties, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String autonomousdatabasename) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AutonomousDatabaseInner> - beginUpdate(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename) { + Response response = deleteWithResponse(resourceGroupName, autonomousdatabasename); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AutonomousDatabaseInner> beginUpdate( - String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + Context context) { + Response response = deleteWithResponse(resourceGroupName, autonomousdatabasename, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String autonomousdatabasename, - AutonomousDatabaseUpdate properties) { - return beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties).last() + private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename) { + return beginDeleteAsync(resourceGroupName, autonomousdatabasename).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String autonomousdatabasename, - AutonomousDatabaseUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String autonomousdatabasename) { + beginDelete(resourceGroupName, autonomousdatabasename).getFinalResult(); } /** - * Update a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseInner update(String resourceGroupName, String autonomousdatabasename, - AutonomousDatabaseUpdate properties) { - return updateAsync(resourceGroupName, autonomousdatabasename, properties).block(); + public void delete(String resourceGroupName, String autonomousdatabasename, Context context) { + beginDelete(resourceGroupName, autonomousdatabasename, context).getFinalResult(); } /** - * Update a AutonomousDatabase. + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List AutonomousDatabase resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param properties The resource properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseInner update(String resourceGroupName, String autonomousdatabasename, - AutonomousDatabaseUpdate properties, Context context) { - return updateAsync(resourceGroupName, autonomousdatabasename, properties, context).block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete a AutonomousDatabase. + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String autonomousdatabasename) { + private Mono>> switchoverWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1061,108 +1451,155 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) + .withContext(context -> service.switchover(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, Context context) { + private Response switchoverWithResponse(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, autonomousdatabasename, accept, context); + return service.switchoverSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + Context.NONE); } /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String autonomousdatabasename) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response switchoverWithResponse(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.switchoverSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context); } /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String autonomousdatabasename, - Context context) { - context = this.client.mergeContext(context); + private PollerFlux, AutonomousDatabaseInner> + beginSwitchoverAsync(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = switchoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); } /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename) { - return this.beginDeleteAsync(resourceGroupName, autonomousdatabasename).getSyncPoller(); + public SyncPoller, AutonomousDatabaseInner> + beginSwitchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + Response response = switchoverWithResponse(resourceGroupName, autonomousdatabasename, body); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, Context.NONE); } /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1170,71 +1607,65 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, - Context context) { - return this.beginDeleteAsync(resourceGroupName, autonomousdatabasename, context).getSyncPoller(); - } - - /** - * Delete a AutonomousDatabase. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename) { - return beginDeleteAsync(resourceGroupName, autonomousdatabasename).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, AutonomousDatabaseInner> + beginSwitchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { + Response response + = switchoverWithResponse(resourceGroupName, autonomousdatabasename, body, context); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); } /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename, Context context) { - return beginDeleteAsync(resourceGroupName, autonomousdatabasename, context).last() + private Mono switchoverAsync(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body) { + return beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String autonomousdatabasename) { - deleteAsync(resourceGroupName, autonomousdatabasename).block(); + public AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body) { + return beginSwitchover(resourceGroupName, autonomousdatabasename, body).getFinalResult(); } /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String autonomousdatabasename, Context context) { - deleteAsync(resourceGroupName, autonomousdatabasename, context).block(); + public AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body, Context context) { + return beginSwitchover(resourceGroupName, autonomousdatabasename, body, context).getFinalResult(); } /** @@ -1246,7 +1677,7 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> failoverWithResponseAsync(String resourceGroupName, @@ -1272,10 +1703,12 @@ private Mono>> failoverWithResponseAsync(String resour } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.failover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1285,40 +1718,42 @@ private Mono>> failoverWithResponseAsync(String resour * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> failoverWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, PeerDbDetails body, Context context) { + private Response failoverWithResponse(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, autonomousdatabasename, body, accept, context); + return service.failoverSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + Context.NONE); } /** @@ -1327,19 +1762,43 @@ private Mono>> failoverWithResponseAsync(String resour * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> - beginFailoverAsync(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { - Mono>> mono - = failoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response failoverWithResponse(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.failoverSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context); } /** @@ -1348,20 +1807,19 @@ private Mono>> failoverWithResponseAsync(String resour * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> beginFailoverAsync( - String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, AutonomousDatabaseInner> + beginFailoverAsync(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { Mono>> mono - = failoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body, context); + = failoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); } /** @@ -1373,12 +1831,14 @@ private PollerFlux, AutonomousDatabaseInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> beginFailover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { - return this.beginFailoverAsync(resourceGroupName, autonomousdatabasename, body).getSyncPoller(); + Response response = failoverWithResponse(resourceGroupName, autonomousdatabasename, body); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, Context.NONE); } /** @@ -1391,12 +1851,14 @@ private PollerFlux, AutonomousDatabaseInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> beginFailover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { - return this.beginFailoverAsync(resourceGroupName, autonomousdatabasename, body, context).getSyncPoller(); + Response response = failoverWithResponse(resourceGroupName, autonomousdatabasename, body, context); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); } /** @@ -1408,7 +1870,7 @@ private PollerFlux, AutonomousDatabaseInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono failoverAsync(String resourceGroupName, String autonomousdatabasename, @@ -1417,25 +1879,6 @@ private Mono failoverAsync(String resourceGroupName, St .flatMap(this.client::getLroFinalResultOrError); } - /** - * Perform failover action on Autonomous Database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono failoverAsync(String resourceGroupName, String autonomousdatabasename, - PeerDbDetails body, Context context) { - return beginFailoverAsync(resourceGroupName, autonomousdatabasename, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Perform failover action on Autonomous Database. * @@ -1445,12 +1888,12 @@ private Mono failoverAsync(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 autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AutonomousDatabaseInner failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { - return failoverAsync(resourceGroupName, autonomousdatabasename, body).block(); + return beginFailover(resourceGroupName, autonomousdatabasename, body).getFinalResult(); } /** @@ -1463,12 +1906,12 @@ public AutonomousDatabaseInner failover(String resourceGroupName, String autonom * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AutonomousDatabaseInner failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { - return failoverAsync(resourceGroupName, autonomousdatabasename, body, context).block(); + return beginFailover(resourceGroupName, autonomousdatabasename, body, context).getFinalResult(); } /** @@ -1507,56 +1950,15 @@ private Mono> generateWalletWithResp } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.generateWallet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Generate wallet action on Autonomous Database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database Wallet File resource model along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateWalletWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.generateWallet(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context); - } - /** * Generate wallet action on Autonomous Database. * @@ -1590,7 +1992,34 @@ private Mono generateWalletAsync(String resou @ServiceMethod(returns = ReturnType.SINGLE) public Response generateWalletWithResponse(String resourceGroupName, String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body, Context context) { - return generateWalletWithResponseAsync(resourceGroupName, autonomousdatabasename, body, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.generateWalletSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context); } /** @@ -1619,7 +2048,7 @@ public AutonomousDatabaseWalletFileInner generateWallet(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 autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> restoreWithResponseAsync(String resourceGroupName, @@ -1645,10 +2074,12 @@ private Mono>> restoreWithResponseAsync(String resourc } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.restore(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1658,40 +2089,87 @@ private Mono>> restoreWithResponseAsync(String resourc * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restoreWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, RestoreAutonomousDatabaseDetails body, Context context) { + private Response restoreWithResponse(String resourceGroupName, String autonomousdatabasename, + RestoreAutonomousDatabaseDetails body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.restoreSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + Context.NONE); + } + + /** + * Restores an Autonomous Database based on the provided request parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response restoreWithResponse(String resourceGroupName, String autonomousdatabasename, + RestoreAutonomousDatabaseDetails body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restore(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, autonomousdatabasename, body, accept, context); + return service.restoreSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context); } /** @@ -1703,7 +2181,7 @@ private Mono>> restoreWithResponseAsync(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 {@link PollerFlux} for polling of autonomous Database resource model. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AutonomousDatabaseInner> beginRestoreAsync( @@ -1715,29 +2193,6 @@ private PollerFlux, AutonomousDatabaseInner> this.client.getContext()); } - /** - * Restores an Autonomous Database based on the provided request parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> beginRestoreAsync( - String resourceGroupName, String autonomousdatabasename, RestoreAutonomousDatabaseDetails body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = restoreWithResponseAsync(resourceGroupName, autonomousdatabasename, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); - } - /** * Restores an Autonomous Database based on the provided request parameters. * @@ -1747,12 +2202,14 @@ private PollerFlux, AutonomousDatabaseInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> beginRestore(String resourceGroupName, String autonomousdatabasename, RestoreAutonomousDatabaseDetails body) { - return this.beginRestoreAsync(resourceGroupName, autonomousdatabasename, body).getSyncPoller(); + Response response = restoreWithResponse(resourceGroupName, autonomousdatabasename, body); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, Context.NONE); } /** @@ -1765,13 +2222,15 @@ private PollerFlux, AutonomousDatabaseInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> beginRestore( String resourceGroupName, String autonomousdatabasename, RestoreAutonomousDatabaseDetails body, Context context) { - return this.beginRestoreAsync(resourceGroupName, autonomousdatabasename, body, context).getSyncPoller(); + Response response = restoreWithResponse(resourceGroupName, autonomousdatabasename, body, context); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); } /** @@ -1783,7 +2242,7 @@ public SyncPoller, AutonomousDatabaseInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restoreAsync(String resourceGroupName, String autonomousdatabasename, @@ -1792,25 +2251,6 @@ private Mono restoreAsync(String resourceGroupName, Str .flatMap(this.client::getLroFinalResultOrError); } - /** - * Restores an Autonomous Database based on the provided request parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restoreAsync(String resourceGroupName, String autonomousdatabasename, - RestoreAutonomousDatabaseDetails body, Context context) { - return beginRestoreAsync(resourceGroupName, autonomousdatabasename, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Restores an Autonomous Database based on the provided request parameters. * @@ -1820,12 +2260,12 @@ private Mono restoreAsync(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 autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AutonomousDatabaseInner restore(String resourceGroupName, String autonomousdatabasename, RestoreAutonomousDatabaseDetails body) { - return restoreAsync(resourceGroupName, autonomousdatabasename, body).block(); + return beginRestore(resourceGroupName, autonomousdatabasename, body).getFinalResult(); } /** @@ -1838,12 +2278,12 @@ public AutonomousDatabaseInner restore(String resourceGroupName, String autonomo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AutonomousDatabaseInner restore(String resourceGroupName, String autonomousdatabasename, RestoreAutonomousDatabaseDetails body, Context context) { - return restoreAsync(resourceGroupName, autonomousdatabasename, body, context).block(); + return beginRestore(resourceGroupName, autonomousdatabasename, body, context).getFinalResult(); } /** @@ -1854,7 +2294,7 @@ public AutonomousDatabaseInner restore(String resourceGroupName, String autonomo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> shrinkWithResponseAsync(String resourceGroupName, @@ -1887,35 +2327,34 @@ private Mono>> shrinkWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> shrinkWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, Context context) { + private Response shrinkWithResponse(String resourceGroupName, String autonomousdatabasename) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.shrink(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, autonomousdatabasename, accept, context); + return service.shrinkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, Context.NONE); } /** @@ -1923,18 +2362,36 @@ private Mono>> shrinkWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> - beginShrinkAsync(String resourceGroupName, String autonomousdatabasename) { - Mono>> mono = shrinkWithResponseAsync(resourceGroupName, autonomousdatabasename); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response shrinkWithResponse(String resourceGroupName, String autonomousdatabasename, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + return service.shrinkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context); } /** @@ -1942,20 +2399,18 @@ private Mono>> shrinkWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AutonomousDatabaseInner> - beginShrinkAsync(String resourceGroupName, String autonomousdatabasename, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = shrinkWithResponseAsync(resourceGroupName, autonomousdatabasename, context); + beginShrinkAsync(String resourceGroupName, String autonomousdatabasename) { + Mono>> mono = shrinkWithResponseAsync(resourceGroupName, autonomousdatabasename); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); } /** @@ -1966,12 +2421,14 @@ private Mono>> shrinkWithResponseAsync(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 {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> beginShrink(String resourceGroupName, String autonomousdatabasename) { - return this.beginShrinkAsync(resourceGroupName, autonomousdatabasename).getSyncPoller(); + Response response = shrinkWithResponse(resourceGroupName, autonomousdatabasename); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, Context.NONE); } /** @@ -1983,12 +2440,14 @@ private Mono>> shrinkWithResponseAsync(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 {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> beginShrink(String resourceGroupName, String autonomousdatabasename, Context context) { - return this.beginShrinkAsync(resourceGroupName, autonomousdatabasename, context).getSyncPoller(); + Response response = shrinkWithResponse(resourceGroupName, autonomousdatabasename, context); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); } /** @@ -1999,7 +2458,7 @@ private Mono>> shrinkWithResponseAsync(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 autonomous Database resource model on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono shrinkAsync(String resourceGroupName, String autonomousdatabasename) { @@ -2007,24 +2466,6 @@ private Mono shrinkAsync(String resourceGroupName, Stri .flatMap(this.client::getLroFinalResultOrError); } - /** - * This operation shrinks the current allocated storage down to the current actual used data storage. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono shrinkAsync(String resourceGroupName, String autonomousdatabasename, - Context context) { - return beginShrinkAsync(resourceGroupName, autonomousdatabasename, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * This operation shrinks the current allocated storage down to the current actual used data storage. * @@ -2033,11 +2474,11 @@ private Mono shrinkAsync(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 autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AutonomousDatabaseInner shrink(String resourceGroupName, String autonomousdatabasename) { - return shrinkAsync(resourceGroupName, autonomousdatabasename).block(); + return beginShrink(resourceGroupName, autonomousdatabasename).getFinalResult(); } /** @@ -2049,15 +2490,15 @@ public AutonomousDatabaseInner shrink(String resourceGroupName, String autonomou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public AutonomousDatabaseInner shrink(String resourceGroupName, String autonomousdatabasename, Context context) { - return shrinkAsync(resourceGroupName, autonomousdatabasename, context).block(); + return beginShrink(resourceGroupName, autonomousdatabasename, context).getFinalResult(); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -2065,11 +2506,11 @@ public AutonomousDatabaseInner shrink(String resourceGroupName, String autonomou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> switchoverWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, PeerDbDetails body) { + private Mono>> changeDisasterRecoveryConfigurationWithResponseAsync( + String resourceGroupName, String autonomousdatabasename, DisasterRecoveryConfigurationDetails body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -2091,100 +2532,128 @@ private Mono>> switchoverWithResponseAsync(String reso } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.switchover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context)) + .withContext(context -> service.changeDisasterRecoveryConfiguration(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> switchoverWithResponseAsync(String resourceGroupName, - String autonomousdatabasename, PeerDbDetails body, Context context) { + private Response changeDisasterRecoveryConfigurationWithResponse(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (autonomousdatabasename == null) { - return Mono.error( - new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); } if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.switchover(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context); + return service.changeDisasterRecoveryConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + Context.NONE); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> - beginSwitchoverAsync(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { - Mono>> mono - = switchoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response changeDisasterRecoveryConfigurationWithResponse(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.changeDisasterRecoveryConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, contentType, accept, body, + context); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of autonomous Database resource model. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AutonomousDatabaseInner> beginSwitchoverAsync( - String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, AutonomousDatabaseInner> + beginChangeDisasterRecoveryConfigurationAsync(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body) { Mono>> mono - = switchoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body, context); + = changeDisasterRecoveryConfigurationWithResponseAsync(resourceGroupName, autonomousdatabasename, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -2192,16 +2661,20 @@ private PollerFlux, AutonomousDatabaseInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> - beginSwitchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { - return this.beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body).getSyncPoller(); + beginChangeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body) { + Response response + = changeDisasterRecoveryConfigurationWithResponse(resourceGroupName, autonomousdatabasename, body); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, Context.NONE); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -2210,53 +2683,38 @@ private PollerFlux, AutonomousDatabaseInner> * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of autonomous Database resource model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AutonomousDatabaseInner> - beginSwitchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { - return this.beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body, context).getSyncPoller(); - } - - /** - * Perform switchover action on Autonomous Database. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param autonomousdatabasename The database name. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchoverAsync(String resourceGroupName, String autonomousdatabasename, - PeerDbDetails body) { - return beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body).last() - .flatMap(this.client::getLroFinalResultOrError); + beginChangeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body, Context context) { + Response response + = changeDisasterRecoveryConfigurationWithResponse(resourceGroupName, autonomousdatabasename, body, context); + return this.client.getLroResult(response, + AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono switchoverAsync(String resourceGroupName, String autonomousdatabasename, - PeerDbDetails body, Context context) { - return beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body, context).last() + private Mono changeDisasterRecoveryConfigurationAsync(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body) { + return beginChangeDisasterRecoveryConfigurationAsync(resourceGroupName, autonomousdatabasename, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -2264,16 +2722,17 @@ private Mono switchoverAsync(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 autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, - PeerDbDetails body) { - return switchoverAsync(resourceGroupName, autonomousdatabasename, body).block(); + public AutonomousDatabaseInner changeDisasterRecoveryConfiguration(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body) { + return beginChangeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body) + .getFinalResult(); } /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -2282,12 +2741,13 @@ public AutonomousDatabaseInner switchover(String resourceGroupName, String auton * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, - PeerDbDetails body, Context context) { - return switchoverAsync(resourceGroupName, autonomousdatabasename, body, context).block(); + public AutonomousDatabaseInner changeDisasterRecoveryConfiguration(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body, Context context) { + return beginChangeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body, context) + .getFinalResult(); } /** @@ -2318,6 +2778,33 @@ private Mono> listBySubscriptionNextSingl .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2326,24 +2813,24 @@ private Mono> listBySubscriptionNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2374,6 +2861,33 @@ private Mono> listByResourceGroupNextSing .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2382,23 +2896,25 @@ private Mono> listByResourceGroupNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabasesClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabasesImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabasesImpl.java index ca305f2b66b4..16146de100da 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabasesImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabasesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -13,8 +13,9 @@ import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseInner; import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseWalletFileInner; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabase; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabases; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseWalletFile; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabases; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails; import com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails; import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; @@ -42,17 +43,6 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String autonomousdatabasename, Context context) { Response inner @@ -83,6 +73,38 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Cont this.serviceClient().delete(resourceGroupName, autonomousdatabasename, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); + } + + public AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + AutonomousDatabaseInner inner + = this.serviceClient().switchover(resourceGroupName, autonomousdatabasename, body); + if (inner != null) { + return new AutonomousDatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context) { + AutonomousDatabaseInner inner + = this.serviceClient().switchover(resourceGroupName, autonomousdatabasename, body, context); + if (inner != null) { + return new AutonomousDatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + public AutonomousDatabase failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { AutonomousDatabaseInner inner = this.serviceClient().failover(resourceGroupName, autonomousdatabasename, body); if (inner != null) { @@ -165,9 +187,10 @@ public AutonomousDatabase shrink(String resourceGroupName, String autonomousdata } } - public AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + public AutonomousDatabase changeDisasterRecoveryConfiguration(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body) { AutonomousDatabaseInner inner - = this.serviceClient().switchover(resourceGroupName, autonomousdatabasename, body); + = this.serviceClient().changeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body); if (inner != null) { return new AutonomousDatabaseImpl(inner, this.manager()); } else { @@ -175,10 +198,10 @@ public AutonomousDatabase switchover(String resourceGroupName, String autonomous } } - public AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, - Context context) { - AutonomousDatabaseInner inner - = this.serviceClient().switchover(resourceGroupName, autonomousdatabasename, body, context); + public AutonomousDatabase changeDisasterRecoveryConfiguration(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body, Context context) { + AutonomousDatabaseInner inner = this.serviceClient() + .changeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body, context); if (inner != null) { return new AutonomousDatabaseImpl(inner, this.manager()); } else { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDbVersionImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDbVersionImpl.java index 81e1c431d702..d4dc5fd21eff 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDbVersionImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDbVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudAccountDetailsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudAccountDetailsImpl.java index 591e36c10a07..9433e188d32f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudAccountDetailsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudAccountDetailsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructureImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructureImpl.java index fce5f96a9f97..eb8cc9898f93 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructureImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructureImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructuresClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructuresClientImpl.java index a7f4613cac6d..f24d9576b92b 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructuresClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructuresClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -29,13 +29,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; 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.oracledatabase.fluent.CloudExadataInfrastructuresClient; import com.azure.resourcemanager.oracledatabase.fluent.models.CloudExadataInfrastructureInner; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.CloudExadataInfrastructureListResult; import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -53,90 +55,155 @@ public final class CloudExadataInfrastructuresClientImpl implements CloudExadata /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of CloudExadataInfrastructuresClientImpl. * * @param client the instance of the service client containing this operation class. */ - CloudExadataInfrastructuresClientImpl(OracleDatabaseResourceManagerImpl client) { + CloudExadataInfrastructuresClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(CloudExadataInfrastructuresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerCloudExadataInfrastructures to be used + * The interface defining all the services for OracleDatabaseManagementClientCloudExadataInfrastructures to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface CloudExadataInfrastructuresService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CloudExadataInfrastructureInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CloudExadataInfrastructureInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, - @BodyParam("application/json") CloudExadataInfrastructureInner resource, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CloudExadataInfrastructureUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CloudExadataInfrastructureUpdate properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, - @BodyParam("application/json") CloudExadataInfrastructureUpdate properties, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> addStorageCapacity(@HostParam("$host") String endpoint, + Mono>> addStorageCapacity(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response addStorageCapacitySync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, @@ -147,7 +214,15 @@ Mono>> addStorageCapacity(@HostParam("$host") String e @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -155,7 +230,15 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -186,35 +269,6 @@ private Mono> listSinglePageAsync .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * List CloudExadataInfrastructure resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** * List CloudExadataInfrastructure resources by subscription ID. * @@ -231,300 +285,84 @@ private PagedFlux listAsync() { /** * List CloudExadataInfrastructure resources by subscription ID. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List CloudExadataInfrastructure resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List CloudExadataInfrastructure resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * List CloudExadataInfrastructure resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List CloudExadataInfrastructure resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + private PagedResponse listSinglePage() { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * List CloudExadataInfrastructure resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List CloudExadataInfrastructure resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * List CloudExadataInfrastructure resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * List CloudExadataInfrastructure resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get a CloudExadataInfrastructure. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getByResourceGroupWithResponseAsync(String resourceGroupName, String cloudexadatainfrastructurename) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a CloudExadataInfrastructure. + * List CloudExadataInfrastructure resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String cloudexadatainfrastructurename, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context); - } - - /** - * Get a CloudExadataInfrastructure. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure on successful completion of {@link Mono}. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String cloudexadatainfrastructurename) { - return getByResourceGroupWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a CloudExadataInfrastructure. + * List CloudExadataInfrastructure resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure along with {@link Response}. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Get a CloudExadataInfrastructure. + * List CloudExadataInfrastructure resources by subscription ID. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CloudExadataInfrastructureInner getByResourceGroup(String resourceGroupName, - String cloudexadatainfrastructurename) { - return getByResourceGroupWithResponse(resourceGroupName, cloudexadatainfrastructurename, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -563,11 +401,12 @@ private Mono>> createOrUpdateWithResponseAsync(String } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, resource, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, contentType, accept, + resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -577,42 +416,44 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return cloudExadataInfrastructure resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); } if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, resource, accept, - context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, contentType, accept, + resource, Context.NONE); } /** @@ -621,20 +462,45 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + * @return cloudExadataInfrastructure resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudExadataInfrastructureInner> - beginCreateOrUpdateAsync(String resourceGroupName, String cloudexadatainfrastructurename, - CloudExadataInfrastructureInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, contentType, accept, + resource, context); } /** @@ -643,7 +509,6 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -652,13 +517,12 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CloudExadataInfrastructureInner> beginCreateOrUpdateAsync(String resourceGroupName, String cloudexadatainfrastructurename, - CloudExadataInfrastructureInner resource, Context context) { - context = this.client.mergeContext(context); + CloudExadataInfrastructureInner resource) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, resource, context); + = createOrUpdateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, resource); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, - context); + this.client.getContext()); } /** @@ -675,8 +539,10 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CloudExadataInfrastructureInner> beginCreateOrUpdate( String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, cloudexadatainfrastructurename, resource); + return this.client.getLroResult(response, + CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, Context.NONE); } /** @@ -695,8 +561,10 @@ public SyncPoller, CloudExadataInfra public SyncPoller, CloudExadataInfrastructureInner> beginCreateOrUpdate( String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource, context) - .getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, cloudexadatainfrastructurename, resource, context); + return this.client.getLroResult(response, + CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, context); } /** @@ -723,17 +591,15 @@ private Mono createOrUpdateAsync(String resourc * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. + * @return cloudExadataInfrastructure resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource) { + return beginCreateOrUpdate(resourceGroupName, cloudexadatainfrastructurename, resource).getFinalResult(); } /** @@ -742,6 +608,7 @@ private Mono createOrUpdateAsync(String resourc * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -749,26 +616,117 @@ private Mono createOrUpdateAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) public CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, - String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource) { - return createOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource).block(); + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, cloudexadatainfrastructurename, resource, context) + .getFinalResult(); } /** - * Create a CloudExadataInfrastructure. + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String cloudexadatainfrastructurename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition. + * @return a CloudExadataInfrastructure along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, - String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource, context).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context); + } + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudExadataInfrastructureInner getByResourceGroup(String resourceGroupName, + String cloudexadatainfrastructurename) { + return getByResourceGroupWithResponse(resourceGroupName, cloudexadatainfrastructurename, Context.NONE) + .getValue(); } /** @@ -807,11 +765,12 @@ private Mono>> updateWithResponseAsync(String resource } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, properties, accept, - context)) + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, contentType, accept, + properties, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -821,41 +780,44 @@ private Mono>> updateWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return cloudExadataInfrastructure resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, Context context) { + private Response updateWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureUpdate properties) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); } if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudexadatainfrastructurename, properties, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, contentType, accept, + properties, Context.NONE); } /** @@ -864,19 +826,45 @@ private Mono>> updateWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + * @return cloudExadataInfrastructure resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudExadataInfrastructureInner> beginUpdateAsync( - String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, contentType, accept, + properties, context); } /** @@ -885,7 +873,6 @@ private PollerFlux, CloudExadataInfr * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -893,14 +880,12 @@ private PollerFlux, CloudExadataInfr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CloudExadataInfrastructureInner> beginUpdateAsync( - String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, properties, context); + = updateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, - context); + this.client.getContext()); } /** @@ -917,7 +902,10 @@ private PollerFlux, CloudExadataInfr @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CloudExadataInfrastructureInner> beginUpdate( String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, properties).getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, cloudexadatainfrastructurename, properties); + return this.client.getLroResult(response, + CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, Context.NONE); } /** @@ -936,8 +924,10 @@ public SyncPoller, CloudExadataInfra public SyncPoller, CloudExadataInfrastructureInner> beginUpdate( String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, properties, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, cloudexadatainfrastructurename, properties, context); + return this.client.getLroResult(response, + CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, context); } /** @@ -958,25 +948,6 @@ private Mono updateAsync(String resourceGroupNa .flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a CloudExadataInfrastructure. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, - String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, properties, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Update a CloudExadataInfrastructure. * @@ -991,7 +962,7 @@ private Mono updateAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public CloudExadataInfrastructureInner update(String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties) { - return updateAsync(resourceGroupName, cloudexadatainfrastructurename, properties).block(); + return beginUpdate(resourceGroupName, cloudexadatainfrastructurename, properties).getFinalResult(); } /** @@ -1009,7 +980,7 @@ public CloudExadataInfrastructureInner update(String resourceGroupName, String c @ServiceMethod(returns = ReturnType.SINGLE) public CloudExadataInfrastructureInner update(String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, Context context) { - return updateAsync(resourceGroupName, cloudexadatainfrastructurename, properties, context).block(); + return beginUpdate(resourceGroupName, cloudexadatainfrastructurename, properties, context).getFinalResult(); } /** @@ -1053,35 +1024,35 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { + private Response deleteWithResponse(String resourceGroupName, String cloudexadatainfrastructurename) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudexadatainfrastructurename, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, Context.NONE); } /** @@ -1089,18 +1060,37 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String cloudexadatainfrastructurename) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context); } /** @@ -1108,7 +1098,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1116,12 +1105,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { - context = this.client.mergeContext(context); + String cloudexadatainfrastructurename) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, context); + = deleteWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -1137,7 +1125,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudexadatainfrastructurename) { - return this.beginDeleteAsync(resourceGroupName, cloudexadatainfrastructurename).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, cloudexadatainfrastructurename); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1154,7 +1143,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { - return this.beginDeleteAsync(resourceGroupName, cloudexadatainfrastructurename, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, cloudexadatainfrastructurename, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1178,16 +1168,13 @@ private Mono deleteAsync(String resourceGroupName, String cloudexadatainfr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { - return beginDeleteAsync(resourceGroupName, cloudexadatainfrastructurename, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String cloudexadatainfrastructurename) { + beginDelete(resourceGroupName, cloudexadatainfrastructurename).getFinalResult(); } /** @@ -1195,28 +1182,163 @@ private Mono deleteAsync(String resourceGroupName, String cloudexadatainfr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cloudexadatainfrastructurename) { - deleteAsync(resourceGroupName, cloudexadatainfrastructurename).block(); + public void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { + beginDelete(resourceGroupName, cloudexadatainfrastructurename, context).getFinalResult(); } /** - * Delete a CloudExadataInfrastructure. + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List CloudExadataInfrastructure resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { - deleteAsync(resourceGroupName, cloudexadatainfrastructurename, context).block(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** @@ -1227,8 +1349,7 @@ public void delete(String resourceGroupName, String cloudexadatainfrastructurena * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> addStorageCapacityWithResponseAsync(String resourceGroupName, @@ -1261,36 +1382,36 @@ private Mono>> addStorageCapacityWithResponseAsync(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> addStorageCapacityWithResponseAsync(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { + private Response addStorageCapacityWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.addStorageCapacity(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context); + return service.addStorageCapacitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, Context.NONE); } /** @@ -1298,19 +1419,37 @@ private Mono>> addStorageCapacityWithResponseAsync(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudExadataInfrastructureInner> - beginAddStorageCapacityAsync(String resourceGroupName, String cloudexadatainfrastructurename) { - Mono>> mono - = addStorageCapacityWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response addStorageCapacityWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return service.addStorageCapacitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context); } /** @@ -1318,21 +1457,19 @@ private Mono>> addStorageCapacityWithResponseAsync(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, CloudExadataInfrastructureInner> - beginAddStorageCapacityAsync(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { - context = this.client.mergeContext(context); + beginAddStorageCapacityAsync(String resourceGroupName, String cloudexadatainfrastructurename) { Mono>> mono - = addStorageCapacityWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, context); + = addStorageCapacityWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename); return this.client.getLroResult(mono, this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, - context); + this.client.getContext()); } /** @@ -1343,12 +1480,15 @@ private Mono>> addStorageCapacityWithResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CloudExadataInfrastructureInner> beginAddStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename) { - return this.beginAddStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename).getSyncPoller(); + Response response + = addStorageCapacityWithResponse(resourceGroupName, cloudexadatainfrastructurename); + return this.client.getLroResult(response, + CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, Context.NONE); } /** @@ -1360,13 +1500,15 @@ private Mono>> addStorageCapacityWithResponseAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CloudExadataInfrastructureInner> beginAddStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { - return this.beginAddStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename, context) - .getSyncPoller(); + Response response + = addStorageCapacityWithResponse(resourceGroupName, cloudexadatainfrastructurename, context); + return this.client.getLroResult(response, + CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, context); } /** @@ -1377,7 +1519,7 @@ private Mono>> addStorageCapacityWithResponseAsync(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 cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono addStorageCapacityAsync(String resourceGroupName, @@ -1386,24 +1528,6 @@ private Mono addStorageCapacityAsync(String res .flatMap(this.client::getLroFinalResultOrError); } - /** - * Perform add storage capacity on exadata infra. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono addStorageCapacityAsync(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { - return beginAddStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Perform add storage capacity on exadata infra. * @@ -1412,12 +1536,12 @@ private Mono addStorageCapacityAsync(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 cloudExadataInfrastructure resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename) { - return addStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename).block(); + return beginAddStorageCapacity(resourceGroupName, cloudexadatainfrastructurename).getFinalResult(); } /** @@ -1429,12 +1553,12 @@ public CloudExadataInfrastructureInner addStorageCapacity(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 cloudExadataInfrastructure resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { - return addStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename, context).block(); + return beginAddStorageCapacity(resourceGroupName, cloudexadatainfrastructurename, context).getFinalResult(); } /** @@ -1466,6 +1590,33 @@ public CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupNa .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1474,24 +1625,25 @@ public CloudExadataInfrastructureInner addStorageCapacity(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 response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1523,6 +1675,33 @@ private Mono> listBySubscriptionN .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1531,23 +1710,26 @@ private Mono> listBySubscriptionN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(CloudExadataInfrastructuresClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructuresImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructuresImpl.java index e8de1d5d9694..15da4d12a9a2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructuresImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudExadataInfrastructuresImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -39,20 +39,6 @@ public PagedIterable list(Context context) { inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { Response inner = this.serviceClient() @@ -84,6 +70,20 @@ public void delete(String resourceGroupName, String cloudexadatainfrastructurena this.serviceClient().delete(resourceGroupName, cloudexadatainfrastructurename, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); + } + public CloudExadataInfrastructure addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename) { CloudExadataInfrastructureInner inner diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClusterImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClusterImpl.java index 7b14d7a9a283..01366c350219 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClusterImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClusterImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -14,8 +14,8 @@ import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterProperties; import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterUpdate; import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterUpdateProperties; -import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressProperties; +import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; import java.util.Collections; import java.util.List; import java.util.Map; @@ -160,6 +160,14 @@ public CloudVmCluster addVms(AddRemoveDbNode body, Context context) { return serviceManager.cloudVmClusters().addVms(resourceGroupName, cloudvmclustername, body, context); } + public CloudVmCluster removeVms(AddRemoveDbNode body) { + return serviceManager.cloudVmClusters().removeVms(resourceGroupName, cloudvmclustername, body); + } + + public CloudVmCluster removeVms(AddRemoveDbNode body, Context context) { + return serviceManager.cloudVmClusters().removeVms(resourceGroupName, cloudvmclustername, body, context); + } + public Response> listPrivateIpAddressesWithResponse(PrivateIpAddressesFilter body, Context context) { return serviceManager.cloudVmClusters() @@ -170,14 +178,6 @@ public List listPrivateIpAddresses(PrivateIpAddresse return serviceManager.cloudVmClusters().listPrivateIpAddresses(resourceGroupName, cloudvmclustername, body); } - public CloudVmCluster removeVms(AddRemoveDbNode body) { - return serviceManager.cloudVmClusters().removeVms(resourceGroupName, cloudvmclustername, body); - } - - public CloudVmCluster removeVms(AddRemoveDbNode body, Context context) { - return serviceManager.cloudVmClusters().removeVms(resourceGroupName, cloudvmclustername, body, context); - } - public CloudVmClusterImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClustersClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClustersClientImpl.java index d22b8c59b7d4..e023cb88bc76 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClustersClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClustersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -29,15 +29,17 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; 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.oracledatabase.fluent.CloudVmClustersClient; import com.azure.resourcemanager.oracledatabase.fluent.models.CloudVmClusterInner; import com.azure.resourcemanager.oracledatabase.fluent.models.PrivateIpAddressPropertiesInner; +import com.azure.resourcemanager.oracledatabase.implementation.models.CloudVmClusterListResult; import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; -import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterListResult; import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterUpdate; import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; import java.nio.ByteBuffer; @@ -57,123 +59,212 @@ public final class CloudVmClustersClientImpl implements CloudVmClustersClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of CloudVmClustersClientImpl. * * @param client the instance of the service client containing this operation class. */ - CloudVmClustersClientImpl(OracleDatabaseResourceManagerImpl client) { + CloudVmClustersClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(CloudVmClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerCloudVmClusters to be used by the proxy + * The interface defining all the services for OracleDatabaseManagementClientCloudVmClusters to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface CloudVmClustersService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CloudVmClusterInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CloudVmClusterInner resource, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudvmclustername") String cloudvmclustername, - @BodyParam("application/json") CloudVmClusterInner resource, @HeaderParam("Accept") String accept, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CloudVmClusterUpdate properties, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CloudVmClusterUpdate properties, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudvmclustername") String cloudvmclustername, - @BodyParam("application/json") CloudVmClusterUpdate properties, @HeaderParam("Accept") String accept, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> addVms(@HostParam("$host") String endpoint, + Mono>> addVms(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudvmclustername") String cloudvmclustername, - @BodyParam("application/json") AddRemoveDbNode body, @HeaderParam("Accept") String accept, Context context); + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AddRemoveDbNode body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response addVmsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AddRemoveDbNode body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> removeVms(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AddRemoveDbNode body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response removeVmsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") AddRemoveDbNode body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> listPrivateIpAddresses( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudvmclustername") String cloudvmclustername, - @BodyParam("application/json") PrivateIpAddressesFilter body, @HeaderParam("Accept") String accept, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateIpAddressesFilter body, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms") - @ExpectedResponses({ 200, 202 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeVms(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response> listPrivateIpAddressesSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudvmclustername") String cloudvmclustername, - @BodyParam("application/json") AddRemoveDbNode body, @HeaderParam("Accept") String accept, Context context); + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PrivateIpAddressesFilter body, + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -181,7 +272,15 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -215,30 +314,14 @@ private Mono> listSinglePageAsync() { /** * List CloudVmCluster resources by subscription ID. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** @@ -246,12 +329,25 @@ private Mono> listSinglePageAsync(Context con * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedFlux}. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -261,12 +357,25 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedFlux}. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -278,7 +387,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** @@ -292,21 +401,24 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** - * List CloudVmCluster resources by resource group. + * Create a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -319,160 +431,241 @@ private Mono> listByResourceGroupSinglePageAs return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, resource, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List CloudVmCluster resources by resource group. + * Create a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return cloudVmCluster resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, resource, + Context.NONE); } /** - * List CloudVmCluster resources by resource group. + * Create a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedFlux}. + * @return cloudVmCluster resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, resource, + context); } /** - * List CloudVmCluster resources by resource group. + * Create a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> + beginCreateOrUpdateAsync(String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, cloudvmclustername, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); } /** - * List CloudVmCluster resources by resource group. + * Create a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> + beginCreateOrUpdate(String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, cloudvmclustername, resource); + return this.client.getLroResult(response, CloudVmClusterInner.class, + CloudVmClusterInner.class, Context.NONE); } /** - * List CloudVmCluster resources by resource group. + * Create a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginCreateOrUpdate( + String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, cloudvmclustername, resource, context); + return this.client.getLroResult(response, CloudVmClusterInner.class, + CloudVmClusterInner.class, context); } /** - * Get a CloudVmCluster. + * Create a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudVmCluster along with {@link Response} on successful completion of {@link Mono}. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String cloudvmclustername) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a CloudVmCluster. + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource) { + return beginCreateOrUpdate(resourceGroupName, cloudvmclustername, resource).getFinalResult(); + } + + /** + * Create a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, cloudvmclustername, resource, context).getFinalResult(); + } + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a CloudVmCluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String cloudvmclustername, Context context) { + String cloudvmclustername) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -490,9 +683,10 @@ private Mono> getByResourceGroupWithResponseAsync( .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context); + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -525,7 +719,27 @@ private Mono getByResourceGroupAsync(String resourceGroupNa @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, cloudvmclustername, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context); } /** @@ -544,19 +758,19 @@ public CloudVmClusterInner getByResourceGroup(String resourceGroupName, String c } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String cloudvmclustername, CloudVmClusterInner resource) { + private Mono>> updateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -573,125 +787,156 @@ private Mono>> createOrUpdateWithResponseAsync(String return Mono .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, resource, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, properties, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return cloudVmCluster resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String cloudvmclustername, CloudVmClusterInner resource, Context context) { + private Response updateWithResponse(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); } else { - resource.validate(); + properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, resource, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, properties, + Context.NONE); } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + * @return cloudVmCluster resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudVmClusterInner> - beginCreateOrUpdateAsync(String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, cloudvmclustername, resource); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, properties, + context); } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudVmClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, CloudVmClusterInner> beginUpdateAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, cloudvmclustername, resource, context); + = updateWithResponseAsync(resourceGroupName, cloudvmclustername, properties); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CloudVmClusterInner.class, CloudVmClusterInner.class, context); + CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudVmClusterInner> - beginCreateOrUpdate(String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource).getSyncPoller(); + public SyncPoller, CloudVmClusterInner> beginUpdate(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties) { + Response response = updateWithResponse(resourceGroupName, cloudvmclustername, properties); + return this.client.getLroResult(response, CloudVmClusterInner.class, + CloudVmClusterInner.class, Context.NONE); } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -699,71 +944,54 @@ private PollerFlux, CloudVmClusterInner> beginCr * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudVmClusterInner> beginCreateOrUpdate( - String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource, context).getSyncPoller(); - } - - /** - * Create a CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, - CloudVmClusterInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, CloudVmClusterInner> beginUpdate(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties, Context context) { + Response response = updateWithResponse(resourceGroupName, cloudvmclustername, properties, context); + return this.client.getLroResult(response, CloudVmClusterInner.class, + CloudVmClusterInner.class, context); } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cloudVmCluster resource definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, - CloudVmClusterInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource, context).last() + private Mono updateAsync(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties) { + return beginUpdateAsync(resourceGroupName, cloudvmclustername, properties).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cloudVmCluster resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, - CloudVmClusterInner resource) { - return createOrUpdateAsync(resourceGroupName, cloudvmclustername, resource).block(); + public CloudVmClusterInner update(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties) { + return beginUpdate(resourceGroupName, cloudvmclustername, properties).getFinalResult(); } /** - * Create a CloudVmCluster. + * Update a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param resource Resource create parameters. + * @param properties The resource properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -771,25 +999,24 @@ public CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloud * @return cloudVmCluster resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, - CloudVmClusterInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, cloudvmclustername, resource, context).block(); + public CloudVmClusterInner update(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties, Context context) { + return beginUpdate(resourceGroupName, cloudvmclustername, properties, context).getFinalResult(); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String cloudvmclustername, CloudVmClusterUpdate properties) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String cloudvmclustername) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -806,222 +1033,193 @@ private Mono>> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, properties, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, - String cloudvmclustername, CloudVmClusterUpdate properties, Context context) { + private Response deleteWithResponse(String resourceGroupName, String cloudvmclustername) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudvmclustername, properties, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, Context.NONE); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudVmClusterInner> beginUpdateAsync(String resourceGroupName, - String cloudvmclustername, CloudVmClusterUpdate properties) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, cloudvmclustername, properties); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); - } - - /** - * Update a CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudVmClusterInner> beginUpdateAsync(String resourceGroupName, - String cloudvmclustername, CloudVmClusterUpdate properties, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, cloudvmclustername, properties, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CloudVmClusterInner.class, CloudVmClusterInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String cloudvmclustername, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudVmClusterInner> beginUpdate(String resourceGroupName, - String cloudvmclustername, CloudVmClusterUpdate properties) { - return this.beginUpdateAsync(resourceGroupName, cloudvmclustername, properties).getSyncPoller(); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudvmclustername); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudVmClusterInner> beginUpdate(String resourceGroupName, - String cloudvmclustername, CloudVmClusterUpdate properties, Context context) { - return this.beginUpdateAsync(resourceGroupName, cloudvmclustername, properties, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername) { + Response response = deleteWithResponse(resourceGroupName, cloudvmclustername); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String cloudvmclustername, - CloudVmClusterUpdate properties) { - return beginUpdateAsync(resourceGroupName, cloudvmclustername, properties).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, + Context context) { + Response response = deleteWithResponse(resourceGroupName, cloudvmclustername, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String cloudvmclustername, - CloudVmClusterUpdate properties, Context context) { - return beginUpdateAsync(resourceGroupName, cloudvmclustername, properties, context).last() + private Mono deleteAsync(String resourceGroupName, String cloudvmclustername) { + return beginDeleteAsync(resourceGroupName, cloudvmclustername).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudVmClusterInner update(String resourceGroupName, String cloudvmclustername, - CloudVmClusterUpdate properties) { - return updateAsync(resourceGroupName, cloudvmclustername, properties).block(); + public void delete(String resourceGroupName, String cloudvmclustername) { + beginDelete(resourceGroupName, cloudvmclustername).getFinalResult(); } /** - * Update a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param properties The resource properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudVmClusterInner update(String resourceGroupName, String cloudvmclustername, - CloudVmClusterUpdate properties, Context context) { - return updateAsync(resourceGroupName, cloudvmclustername, properties, context).block(); + public void delete(String resourceGroupName, String cloudvmclustername, Context context) { + beginDelete(resourceGroupName, cloudvmclustername, context).getFinalResult(); } /** - * Delete a CloudVmCluster. + * List CloudVmCluster resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String cloudvmclustername) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1034,182 +1232,125 @@ private Mono>> deleteWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String cloudvmclustername, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudvmclustername, accept, context); - } - - /** - * Delete a CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudvmclustername); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudvmclustername, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername) { - return this.beginDeleteAsync(resourceGroupName, cloudvmclustername).getSyncPoller(); - } - - /** - * Delete a CloudVmCluster. + * List CloudVmCluster resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, - Context context) { - return this.beginDeleteAsync(resourceGroupName, cloudvmclustername, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Delete a CloudVmCluster. + * List CloudVmCluster resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudvmclustername) { - return beginDeleteAsync(resourceGroupName, cloudvmclustername).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete a CloudVmCluster. + * List CloudVmCluster resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudvmclustername, Context context) { - return beginDeleteAsync(resourceGroupName, cloudvmclustername, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Delete a CloudVmCluster. + * List CloudVmCluster resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cloudvmclustername) { - deleteAsync(resourceGroupName, cloudvmclustername).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Delete a CloudVmCluster. + * List CloudVmCluster resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cloudvmclustername, Context context) { - deleteAsync(resourceGroupName, cloudvmclustername, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** @@ -1221,7 +1362,7 @@ public void delete(String resourceGroupName, String cloudvmclustername, 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 cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> addVmsWithResponseAsync(String resourceGroupName, @@ -1247,10 +1388,10 @@ private Mono>> addVmsWithResponseAsync(String resource } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.addVms(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context)) + return FluxUtil.withContext(context -> service.addVms(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1260,59 +1401,42 @@ private Mono>> addVmsWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> addVmsWithResponseAsync(String resourceGroupName, - String cloudvmclustername, AddRemoveDbNode body, Context context) { + private Response addVmsWithResponse(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.addVms(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudvmclustername, body, accept, context); - } - - /** - * Add VMs to the VM Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudVmClusterInner> beginAddVmsAsync(String resourceGroupName, - String cloudvmclustername, AddRemoveDbNode body) { - Mono>> mono = addVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); + return service.addVmsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, body, + Context.NONE); } /** @@ -1325,16 +1449,38 @@ private PollerFlux, CloudVmClusterInner> beginAd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudVmClusterInner> beginAddVmsAsync(String resourceGroupName, - String cloudvmclustername, AddRemoveDbNode body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = addVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CloudVmClusterInner.class, CloudVmClusterInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response addVmsWithResponse(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.addVmsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, body, context); } /** @@ -1346,12 +1492,14 @@ private PollerFlux, CloudVmClusterInner> beginAd * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, + private PollerFlux, CloudVmClusterInner> beginAddVmsAsync(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { - return this.beginAddVmsAsync(resourceGroupName, cloudvmclustername, body).getSyncPoller(); + Mono>> mono = addVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); } /** @@ -1360,134 +1508,21 @@ public SyncPoller, CloudVmClusterInner> beginAdd * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, - String cloudvmclustername, AddRemoveDbNode body, Context context) { - return this.beginAddVmsAsync(resourceGroupName, cloudvmclustername, body, context).getSyncPoller(); - } - - /** - * Add VMs to the VM Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono addVmsAsync(String resourceGroupName, String cloudvmclustername, - AddRemoveDbNode body) { - return beginAddVmsAsync(resourceGroupName, cloudvmclustername, body).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Add VMs to the VM Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono addVmsAsync(String resourceGroupName, String cloudvmclustername, - AddRemoveDbNode body, Context context) { - return beginAddVmsAsync(resourceGroupName, cloudvmclustername, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Add VMs to the VM Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { - return addVmsAsync(resourceGroupName, cloudvmclustername, body).block(); - } - - /** - * Add VMs to the VM Cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, - Context context) { - return addVmsAsync(resourceGroupName, cloudvmclustername, body, context).block(); - } - - /** - * List Private IP Addresses by the provided filter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param body The content of the action request. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listPrivateIpAddressesWithResponseAsync( - String resourceGroupName, String cloudvmclustername, PrivateIpAddressesFilter body) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listPrivateIpAddresses(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body) { + Response response = addVmsWithResponse(resourceGroupName, cloudvmclustername, body); + return this.client.getLroResult(response, CloudVmClusterInner.class, + CloudVmClusterInner.class, Context.NONE); } /** - * List Private IP Addresses by the provided filter. + * Add VMs to the VM Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. @@ -1496,40 +1531,18 @@ private Mono>> listPrivateIpAddre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listPrivateIpAddressesWithResponseAsync( - String resourceGroupName, String cloudvmclustername, PrivateIpAddressesFilter body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listPrivateIpAddresses(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context) { + Response response = addVmsWithResponse(resourceGroupName, cloudvmclustername, body, context); + return this.client.getLroResult(response, CloudVmClusterInner.class, + CloudVmClusterInner.class, context); } /** - * List Private IP Addresses by the provided filter. + * Add VMs to the VM Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. @@ -1537,48 +1550,47 @@ private Mono>> listPrivateIpAddre * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPrivateIpAddressesAsync(String resourceGroupName, - String cloudvmclustername, PrivateIpAddressesFilter body) { - return listPrivateIpAddressesWithResponseAsync(resourceGroupName, cloudvmclustername, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono addVmsAsync(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body) { + return beginAddVmsAsync(resourceGroupName, cloudvmclustername, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List Private IP Addresses by the provided filter. + * Add VMs to the VM Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties along with {@link Response}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listPrivateIpAddressesWithResponse(String resourceGroupName, - String cloudvmclustername, PrivateIpAddressesFilter body, Context context) { - return listPrivateIpAddressesWithResponseAsync(resourceGroupName, cloudvmclustername, body, context).block(); + public CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + return beginAddVms(resourceGroupName, cloudvmclustername, body).getFinalResult(); } /** - * List Private IP Addresses by the provided filter. + * Add VMs to the VM Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List listPrivateIpAddresses(String resourceGroupName, - String cloudvmclustername, PrivateIpAddressesFilter body) { - return listPrivateIpAddressesWithResponse(resourceGroupName, cloudvmclustername, body, Context.NONE).getValue(); + public CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context) { + return beginAddVms(resourceGroupName, cloudvmclustername, body, context).getFinalResult(); } /** @@ -1590,7 +1602,7 @@ public List listPrivateIpAddresses(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 cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> removeVmsWithResponseAsync(String resourceGroupName, @@ -1616,10 +1628,10 @@ private Mono>> removeVmsWithResponseAsync(String resou } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.removeVms(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context)) + return FluxUtil.withContext(context -> service.removeVms(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1629,40 +1641,42 @@ private Mono>> removeVmsWithResponseAsync(String resou * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeVmsWithResponseAsync(String resourceGroupName, - String cloudvmclustername, AddRemoveDbNode body, Context context) { + private Response removeVmsWithResponse(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.removeVms(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context); + return service.removeVmsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, body, + Context.NONE); } /** @@ -1671,17 +1685,42 @@ private Mono>> removeVmsWithResponseAsync(String resou * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudVmClusterInner> - beginRemoveVmsAsync(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { - Mono>> mono = removeVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response removeVmsWithResponse(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.removeVmsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, body, context); } /** @@ -1690,20 +1729,17 @@ private Mono>> removeVmsWithResponseAsync(String resou * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudVmClusterInner> beginRemoveVmsAsync( - String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = removeVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body, context); + private PollerFlux, CloudVmClusterInner> + beginRemoveVmsAsync(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + Mono>> mono = removeVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CloudVmClusterInner.class, CloudVmClusterInner.class, context); + CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); } /** @@ -1715,12 +1751,14 @@ private PollerFlux, CloudVmClusterInner> beginRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { - return this.beginRemoveVmsAsync(resourceGroupName, cloudvmclustername, body).getSyncPoller(); + Response response = removeVmsWithResponse(resourceGroupName, cloudvmclustername, body); + return this.client.getLroResult(response, CloudVmClusterInner.class, + CloudVmClusterInner.class, Context.NONE); } /** @@ -1733,12 +1771,14 @@ public SyncPoller, CloudVmClusterInner> beginRem * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, Context context) { - return this.beginRemoveVmsAsync(resourceGroupName, cloudvmclustername, body, context).getSyncPoller(); + Response response = removeVmsWithResponse(resourceGroupName, cloudvmclustername, body, context); + return this.client.getLroResult(response, CloudVmClusterInner.class, + CloudVmClusterInner.class, context); } /** @@ -1750,7 +1790,7 @@ public SyncPoller, CloudVmClusterInner> beginRem * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono removeVmsAsync(String resourceGroupName, String cloudvmclustername, @@ -1765,17 +1805,14 @@ private Mono removeVmsAsync(String resourceGroupName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono removeVmsAsync(String resourceGroupName, String cloudvmclustername, - AddRemoveDbNode body, Context context) { - return beginRemoveVmsAsync(resourceGroupName, cloudvmclustername, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + return beginRemoveVms(resourceGroupName, cloudvmclustername, body).getFinalResult(); } /** @@ -1784,18 +1821,82 @@ private Mono removeVmsAsync(String resourceGroupName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { - return removeVmsAsync(resourceGroupName, cloudvmclustername, body).block(); + public CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context) { + return beginRemoveVms(resourceGroupName, cloudvmclustername, body, context).getFinalResult(); } /** - * Remove VMs from the VM Cluster. + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listPrivateIpAddressesWithResponseAsync( + String resourceGroupName, String cloudvmclustername, PrivateIpAddressesFilter body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listPrivateIpAddresses(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPrivateIpAddressesAsync(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body) { + return listPrivateIpAddressesWithResponseAsync(resourceGroupName, cloudvmclustername, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List Private IP Addresses by the provided filter. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. @@ -1804,12 +1905,55 @@ public CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, - Context context) { - return removeVmsAsync(resourceGroupName, cloudvmclustername, body, context).block(); + public Response> listPrivateIpAddressesWithResponse(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.listPrivateIpAddressesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, contentType, accept, body, context); + } + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listPrivateIpAddresses(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body) { + return listPrivateIpAddressesWithResponse(resourceGroupName, cloudvmclustername, body, Context.NONE).getValue(); } /** @@ -1840,6 +1984,33 @@ private Mono> listBySubscriptionNextSinglePag .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1848,24 +2019,24 @@ private Mono> listBySubscriptionNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1896,6 +2067,33 @@ private Mono> listByResourceGroupNextSinglePa .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1904,23 +2102,25 @@ private Mono> listByResourceGroupNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(CloudVmClustersClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClustersImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClustersImpl.java index 0ba5575f3ada..ec5968717b48 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClustersImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/CloudVmClustersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -15,8 +15,8 @@ import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; import com.azure.resourcemanager.oracledatabase.models.CloudVmCluster; import com.azure.resourcemanager.oracledatabase.models.CloudVmClusters; -import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressProperties; +import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -44,16 +44,6 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, Context context) { Response inner @@ -83,6 +73,16 @@ public void delete(String resourceGroupName, String cloudvmclustername, Context this.serviceClient().delete(resourceGroupName, cloudvmclustername, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); + } + public CloudVmCluster addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { CloudVmClusterInner inner = this.serviceClient().addVms(resourceGroupName, cloudvmclustername, body); if (inner != null) { @@ -102,6 +102,26 @@ public CloudVmCluster addVms(String resourceGroupName, String cloudvmclustername } } + public CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + CloudVmClusterInner inner = this.serviceClient().removeVms(resourceGroupName, cloudvmclustername, body); + if (inner != null) { + return new CloudVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context) { + CloudVmClusterInner inner + = this.serviceClient().removeVms(resourceGroupName, cloudvmclustername, body, context); + if (inner != null) { + return new CloudVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + public Response> listPrivateIpAddressesWithResponse(String resourceGroupName, String cloudvmclustername, PrivateIpAddressesFilter body, Context context) { Response> inner = this.serviceClient() @@ -130,26 +150,6 @@ public List listPrivateIpAddresses(String resourceGr } } - public CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { - CloudVmClusterInner inner = this.serviceClient().removeVms(resourceGroupName, cloudvmclustername, body); - if (inner != null) { - return new CloudVmClusterImpl(inner, this.manager()); - } else { - return null; - } - } - - public CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, - Context context) { - CloudVmClusterInner inner - = this.serviceClient().removeVms(resourceGroupName, cloudvmclustername, body, context); - if (inner != null) { - return new CloudVmClusterImpl(inner, this.manager()); - } else { - return null; - } - } - public CloudVmCluster getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbActionResponseImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbActionResponseImpl.java new file mode 100644 index 000000000000..9aedb3b4feda --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbActionResponseImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.resourcemanager.oracledatabase.fluent.models.DbActionResponseInner; +import com.azure.resourcemanager.oracledatabase.models.AzureResourceProvisioningState; +import com.azure.resourcemanager.oracledatabase.models.DbActionResponse; + +public final class DbActionResponseImpl implements DbActionResponse { + private DbActionResponseInner innerObject; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + DbActionResponseImpl(DbActionResponseInner innerObject, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public AzureResourceProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public DbActionResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodeImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodeImpl.java index f20b4b2bde22..ed83ea811964 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodeImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodeImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesClientImpl.java index 2fb33bc67f2c..b4fc02d9e30f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -26,14 +26,16 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; 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.oracledatabase.fluent.DbNodesClient; import com.azure.resourcemanager.oracledatabase.fluent.models.DbNodeInner; +import com.azure.resourcemanager.oracledatabase.implementation.models.DbNodeListResult; import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; -import com.azure.resourcemanager.oracledatabase.models.DbNodeListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,78 +52,116 @@ public final class DbNodesClientImpl implements DbNodesClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of DbNodesClientImpl. * * @param client the instance of the service client containing this operation class. */ - DbNodesClientImpl(OracleDatabaseResourceManagerImpl client) { + DbNodesClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(DbNodesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerDbNodes to be used by the proxy service + * The interface defining all the services for OracleDatabaseManagementClientDbNodes to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface DbNodesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudVmCluster(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, - Context context); + @PathParam("cloudvmclustername") String cloudvmclustername, @PathParam("dbnodeocid") String dbnodeocid, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @PathParam("dbnodeocid") String dbnodeocid, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudVmCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByCloudVmClusterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> action(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @PathParam("dbnodeocid") String dbnodeocid, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DbNodeAction body, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> action(@HostParam("$host") String endpoint, + Response actionSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @PathParam("dbnodeocid") String dbnodeocid, - @BodyParam("application/json") DbNodeAction body, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DbNodeAction body, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCloudVmClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByCloudVmClusterNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List DbNode resources by CloudVmCluster. + * Get a DbNode. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a DbNode along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterSinglePageAsync(String resourceGroupName, - String cloudvmclustername) { + private Mono> getWithResponseAsync(String resourceGroupName, String cloudvmclustername, + String dbnodeocid) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -138,69 +178,89 @@ private Mono> listByCloudVmClusterSinglePageAsync(Str return Mono .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } + if (dbnodeocid == null) { + return Mono.error(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, dbnodeocid, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List DbNode resources by CloudVmCluster. + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String cloudvmclustername, String dbnodeocid) { + return getWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DbNode. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a DbNode along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterSinglePageAsync(String resourceGroupName, - String cloudvmclustername, Context context) { + public Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (dbnodeocid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudvmclustername, dbnodeocid, accept, context); } /** - * List DbNode resources by CloudVmCluster. + * Get a DbNode. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation as paginated response with {@link PagedFlux}. + * @return a DbNode. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, String cloudvmclustername) { - return new PagedFlux<>(() -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername), - nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DbNodeInner get(String resourceGroupName, String cloudvmclustername, String dbnodeocid) { + return getWithResponse(resourceGroupName, cloudvmclustername, dbnodeocid, Context.NONE).getValue(); } /** @@ -208,18 +268,38 @@ private PagedFlux listByCloudVmClusterAsync(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation as paginated response with {@link PagedFlux}. + * @return the response of a DbNode list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, String cloudvmclustername, - Context context) { - return new PagedFlux<>( - () -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername, context), - nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudVmClusterSinglePageAsync(String resourceGroupName, + String cloudvmclustername) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -230,11 +310,12 @@ private PagedFlux listByCloudVmClusterAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + * @return the response of a DbNode list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername) { - return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername)); + private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, String cloudvmclustername) { + return new PagedFlux<>(() -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername), + nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink)); } /** @@ -242,147 +323,112 @@ public PagedIterable listByCloudVmCluster(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, - Context context) { - return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername, context)); - } - - /** - * Get a DbNode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DbNode list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String cloudvmclustername, - String dbnodeocid) { + private PagedResponse listByCloudVmClusterSinglePage(String resourceGroupName, + String cloudvmclustername) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - if (dbnodeocid == null) { - return Mono.error(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, dbnodeocid, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByCloudVmClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DbNode. + * List DbNode resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DbNode list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String cloudvmclustername, - String dbnodeocid, Context context) { + private PagedResponse listByCloudVmClusterSinglePage(String resourceGroupName, + String cloudvmclustername, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - if (dbnodeocid == null) { - return Mono.error(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudvmclustername, dbnodeocid, accept, context); + Response res + = service.listByCloudVmClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DbNode. + * List DbNode resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode on successful completion of {@link Mono}. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String cloudvmclustername, String dbnodeocid) { - return getWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername) { + return new PagedIterable<>(() -> listByCloudVmClusterSinglePage(resourceGroupName, cloudvmclustername), + nextLink -> listByCloudVmClusterNextSinglePage(nextLink)); } /** - * Get a DbNode. + * List DbNode resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode along with {@link Response}. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, Context context) { - return getWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid, context).block(); - } - - /** - * Get a DbNode. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DbNodeInner get(String resourceGroupName, String cloudvmclustername, String dbnodeocid) { - return getWithResponse(resourceGroupName, cloudvmclustername, dbnodeocid, Context.NONE).getValue(); + return new PagedIterable<>(() -> listByCloudVmClusterSinglePage(resourceGroupName, cloudvmclustername, context), + nextLink -> listByCloudVmClusterNextSinglePage(nextLink, context)); } /** @@ -395,8 +441,7 @@ public DbNodeInner get(String resourceGroupName, String cloudvmclustername, 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 DbNode resource belonging to vmCluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> actionWithResponseAsync(String resourceGroupName, @@ -425,9 +470,12 @@ private Mono>> actionWithResponseAsync(String resource } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil.withContext(context -> service.action(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, dbnodeocid, body, accept, context)) + return FluxUtil + .withContext(context -> service.action(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, dbnodeocid, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -438,44 +486,46 @@ private Mono>> actionWithResponseAsync(String resource * @param cloudvmclustername CloudVmCluster name. * @param dbnodeocid DbNode OCID. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DbNode resource belonging to vmCluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> actionWithResponseAsync(String resourceGroupName, - String cloudvmclustername, String dbnodeocid, DbNodeAction body, Context context) { + private Response actionWithResponse(String resourceGroupName, String cloudvmclustername, + String dbnodeocid, DbNodeAction body) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } if (dbnodeocid == null) { - return Mono.error(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); } if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { body.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.action(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudvmclustername, dbnodeocid, body, accept, context); + return service.actionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, dbnodeocid, contentType, accept, + body, Context.NONE); } /** @@ -485,18 +535,47 @@ private Mono>> actionWithResponseAsync(String resource * @param cloudvmclustername CloudVmCluster name. * @param dbnodeocid DbNode OCID. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the DbNode resource belonging to vmCluster. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DbNodeInner> beginActionAsync(String resourceGroupName, - String cloudvmclustername, String dbnodeocid, DbNodeAction body) { - Mono>> mono - = actionWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DbNodeInner.class, DbNodeInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response actionWithResponse(String resourceGroupName, String cloudvmclustername, + String dbnodeocid, DbNodeAction body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (dbnodeocid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.actionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, dbnodeocid, contentType, accept, + body, context); } /** @@ -506,20 +585,18 @@ private PollerFlux, DbNodeInner> beginActionAsync(String * @param cloudvmclustername CloudVmCluster name. * @param dbnodeocid DbNode OCID. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of the DbNode resource belonging to vmCluster. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DbNodeInner> beginActionAsync(String resourceGroupName, - String cloudvmclustername, String dbnodeocid, DbNodeAction body, Context context) { - context = this.client.mergeContext(context); + String cloudvmclustername, String dbnodeocid, DbNodeAction body) { Mono>> mono - = actionWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body, context); + = actionWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DbNodeInner.class, DbNodeInner.class, context); + DbNodeInner.class, DbNodeInner.class, this.client.getContext()); } /** @@ -532,12 +609,14 @@ private PollerFlux, DbNodeInner> beginActionAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of the DbNode resource belonging to vmCluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DbNodeInner> beginAction(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body) { - return this.beginActionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body).getSyncPoller(); + Response response = actionWithResponse(resourceGroupName, cloudvmclustername, dbnodeocid, body); + return this.client.getLroResult(response, DbNodeInner.class, DbNodeInner.class, + Context.NONE); } /** @@ -551,12 +630,15 @@ public SyncPoller, DbNodeInner> beginAction(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 {@link SyncPoller} for polling of the DbNode resource belonging to vmCluster. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DbNodeInner> beginAction(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body, Context context) { - return this.beginActionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body, context).getSyncPoller(); + Response response + = actionWithResponse(resourceGroupName, cloudvmclustername, dbnodeocid, body, context); + return this.client.getLroResult(response, DbNodeInner.class, DbNodeInner.class, + context); } /** @@ -569,7 +651,7 @@ public SyncPoller, DbNodeInner> beginAction(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 DbNode resource belonging to vmCluster on successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono actionAsync(String resourceGroupName, String cloudvmclustername, String dbnodeocid, @@ -578,26 +660,6 @@ private Mono actionAsync(String resourceGroupName, String cloudvmcl .flatMap(this.client::getLroFinalResultOrError); } - /** - * VM actions on DbNode of VM Cluster by the provided filter. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. - * @param body The content of the action request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DbNode resource belonging to vmCluster on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono actionAsync(String resourceGroupName, String cloudvmclustername, String dbnodeocid, - DbNodeAction body, Context context) { - return beginActionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * VM actions on DbNode of VM Cluster by the provided filter. * @@ -608,12 +670,12 @@ private Mono actionAsync(String resourceGroupName, String cloudvmcl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DbNode resource belonging to vmCluster. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public DbNodeInner action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body) { - return actionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body).block(); + return beginAction(resourceGroupName, cloudvmclustername, dbnodeocid, body).getFinalResult(); } /** @@ -627,12 +689,12 @@ public DbNodeInner action(String resourceGroupName, String cloudvmclustername, 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 DbNode resource belonging to vmCluster. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public DbNodeInner action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body, Context context) { - return actionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body, context).block(); + return beginAction(resourceGroupName, cloudvmclustername, dbnodeocid, body, context).getFinalResult(); } /** @@ -663,6 +725,33 @@ private Mono> listByCloudVmClusterNextSinglePageAsync .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByCloudVmClusterNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByCloudVmClusterNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -671,22 +760,25 @@ private Mono> listByCloudVmClusterNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a DbNode list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listByCloudVmClusterNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByCloudVmClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByCloudVmClusterNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(DbNodesClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesImpl.java index 0f2119d6c4b0..25fdd6452dd3 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -28,19 +28,6 @@ public DbNodesImpl(DbNodesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername) { - PagedIterable inner - = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DbNodeImpl(inner1, this.manager())); - } - - public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, - Context context) { - PagedIterable inner - = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DbNodeImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, Context context) { Response inner @@ -62,6 +49,19 @@ public DbNode get(String resourceGroupName, String cloudvmclustername, String db } } + public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername) { + PagedIterable inner + = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbNodeImpl(inner1, this.manager())); + } + + public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context) { + PagedIterable inner + = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbNodeImpl(inner1, this.manager())); + } + public DbNode action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body) { DbNodeInner inner = this.serviceClient().action(resourceGroupName, cloudvmclustername, dbnodeocid, body); if (inner != null) { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServerImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServerImpl.java index e271c8618ad5..b3f495f3dc16 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServerImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServersClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServersClientImpl.java index daa832f3f89d..7836233dc4d2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServersClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.DbServersClient; import com.azure.resourcemanager.oracledatabase.fluent.models.DbServerInner; -import com.azure.resourcemanager.oracledatabase.models.DbServerListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.DbServerListResult; import reactor.core.publisher.Mono; /** @@ -42,69 +43,97 @@ public final class DbServersClientImpl implements DbServersClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of DbServersClientImpl. * * @param client the instance of the service client containing this operation class. */ - DbServersClientImpl(OracleDatabaseResourceManagerImpl client) { + DbServersClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(DbServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerDbServers to be used by the proxy + * The interface defining all the services for OracleDatabaseManagementClientDbServers to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface DbServersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudExadataInfrastructure(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, - @HeaderParam("Accept") String accept, Context context); + @PathParam("dbserverocid") String dbserverocid, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, @PathParam("dbserverocid") String dbserverocid, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudExadataInfrastructure(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByCloudExadataInfrastructureSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCloudExadataInfrastructureNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByCloudExadataInfrastructureNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List DbServer resources by CloudExadataInfrastructure. + * Get a DbServer. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a DbServer along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudExadataInfrastructureSinglePageAsync(String resourceGroupName, - String cloudexadatainfrastructurename) { + private Mono> getWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename, String dbserverocid) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -121,72 +150,93 @@ private Mono> listByCloudExadataInfrastructureSingl return Mono.error(new IllegalArgumentException( "Parameter cloudexadatainfrastructurename is required and cannot be null.")); } + if (dbserverocid == null) { + return Mono.error(new IllegalArgumentException("Parameter dbserverocid is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByCloudExadataInfrastructure(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - cloudexadatainfrastructurename, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, dbserverocid, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List DbServer resources by CloudExadataInfrastructure. + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid) { + return getWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, dbserverocid) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DbServer. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a DbServer along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudExadataInfrastructureSinglePageAsync(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { + public Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + if (dbserverocid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dbserverocid is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByCloudExadataInfrastructure(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudexadatainfrastructurename, dbserverocid, accept, context); } /** - * List DbServer resources by CloudExadataInfrastructure. + * Get a DbServer. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation as paginated response with {@link PagedFlux}. + * @return a DbServer. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudExadataInfrastructureAsync(String resourceGroupName, - String cloudexadatainfrastructurename) { - return new PagedFlux<>( - () -> listByCloudExadataInfrastructureSinglePageAsync(resourceGroupName, cloudexadatainfrastructurename), - nextLink -> listByCloudExadataInfrastructureNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DbServerInner get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid) { + return getWithResponse(resourceGroupName, cloudexadatainfrastructurename, dbserverocid, Context.NONE) + .getValue(); } /** @@ -194,18 +244,39 @@ private PagedFlux listByCloudExadataInfrastructureAsync(String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation as paginated response with {@link PagedFlux}. + * @return the response of a DbServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudExadataInfrastructureAsync(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { - return new PagedFlux<>(() -> listByCloudExadataInfrastructureSinglePageAsync(resourceGroupName, - cloudexadatainfrastructurename, context), - nextLink -> listByCloudExadataInfrastructureNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudExadataInfrastructureSinglePageAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCloudExadataInfrastructure(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + cloudexadatainfrastructurename, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -216,13 +287,14 @@ private PagedFlux listByCloudExadataInfrastructureAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + * @return the response of a DbServer list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + private PagedFlux listByCloudExadataInfrastructureAsync(String resourceGroupName, String cloudexadatainfrastructurename) { - return new PagedIterable<>( - listByCloudExadataInfrastructureAsync(resourceGroupName, cloudexadatainfrastructurename)); + return new PagedFlux<>( + () -> listByCloudExadataInfrastructureSinglePageAsync(resourceGroupName, cloudexadatainfrastructurename), + nextLink -> listByCloudExadataInfrastructureNextSinglePageAsync(nextLink)); } /** @@ -230,151 +302,117 @@ public PagedIterable listByCloudExadataInfrastructure(String reso * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { - return new PagedIterable<>( - listByCloudExadataInfrastructureAsync(resourceGroupName, cloudexadatainfrastructurename, context)); - } - - /** - * Get a DbServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DbServer list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String cloudexadatainfrastructurename, String dbserverocid) { + private PagedResponse listByCloudExadataInfrastructureSinglePage(String resourceGroupName, + String cloudexadatainfrastructurename) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); - } - if (dbserverocid == null) { - return Mono.error(new IllegalArgumentException("Parameter dbserverocid is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, dbserverocid, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByCloudExadataInfrastructureSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + cloudexadatainfrastructurename, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DbServer. + * List DbServer resources by CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DbServer list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String cloudexadatainfrastructurename, String dbserverocid, Context context) { + private PagedResponse listByCloudExadataInfrastructureSinglePage(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudexadatainfrastructurename == null) { - return Mono.error(new IllegalArgumentException( - "Parameter cloudexadatainfrastructurename is required and cannot be null.")); - } - if (dbserverocid == null) { - return Mono.error(new IllegalArgumentException("Parameter dbserverocid is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudexadatainfrastructurename, dbserverocid, accept, context); + Response res + = service.listByCloudExadataInfrastructureSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DbServer. + * List DbServer resources by CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer on successful completion of {@link Mono}. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String cloudexadatainfrastructurename, - String dbserverocid) { - return getWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, dbserverocid) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename) { + return new PagedIterable<>( + () -> listByCloudExadataInfrastructureSinglePage(resourceGroupName, cloudexadatainfrastructurename), + nextLink -> listByCloudExadataInfrastructureNextSinglePage(nextLink)); } /** - * Get a DbServer. + * List DbServer resources by CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, - String dbserverocid, Context context) { - return getWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, dbserverocid, context).block(); - } - - /** - * Get a DbServer. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DbServerInner get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid) { - return getWithResponse(resourceGroupName, cloudexadatainfrastructurename, dbserverocid, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + return new PagedIterable<>(() -> listByCloudExadataInfrastructureSinglePage(resourceGroupName, + cloudexadatainfrastructurename, context), + nextLink -> listByCloudExadataInfrastructureNextSinglePage(nextLink, context)); } /** @@ -405,6 +443,33 @@ private Mono> listByCloudExadataInfrastructureNextS .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByCloudExadataInfrastructureNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByCloudExadataInfrastructureNextSync(nextLink, + this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -413,23 +478,26 @@ private Mono> listByCloudExadataInfrastructureNextS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a DbServer list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudExadataInfrastructureNextSinglePageAsync(String nextLink, + private PagedResponse listByCloudExadataInfrastructureNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByCloudExadataInfrastructureNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByCloudExadataInfrastructureNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(DbServersClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServersImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServersImpl.java index 34154b855702..3b68ff9b0336 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServersImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbServersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,20 +27,6 @@ public DbServersImpl(DbServersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename) { - PagedIterable inner - = this.serviceClient().listByCloudExadataInfrastructure(resourceGroupName, cloudexadatainfrastructurename); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DbServerImpl(inner1, this.manager())); - } - - public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { - PagedIterable inner = this.serviceClient() - .listByCloudExadataInfrastructure(resourceGroupName, cloudexadatainfrastructurename, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DbServerImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid, Context context) { Response inner = this.serviceClient() @@ -62,6 +48,20 @@ public DbServer get(String resourceGroupName, String cloudexadatainfrastructuren } } + public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename) { + PagedIterable inner + = this.serviceClient().listByCloudExadataInfrastructure(resourceGroupName, cloudexadatainfrastructurename); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbServerImpl(inner1, this.manager())); + } + + public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + PagedIterable inner = this.serviceClient() + .listByCloudExadataInfrastructure(resourceGroupName, cloudexadatainfrastructurename, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbServerImpl(inner1, this.manager())); + } + private DbServersClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapeImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapeImpl.java index 8afe002908ce..1b52876ce318 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapeImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapeImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapesClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapesClientImpl.java index b03d88ff7679..639c1d36a3b8 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapesClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.DbSystemShapesClient; import com.azure.resourcemanager.oracledatabase.fluent.models.DbSystemShapeInner; -import com.azure.resourcemanager.oracledatabase.models.DbSystemShapeListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.DbSystemShapeListResult; import reactor.core.publisher.Mono; /** @@ -42,64 +43,91 @@ public final class DbSystemShapesClientImpl implements DbSystemShapesClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of DbSystemShapesClientImpl. * * @param client the instance of the service client containing this operation class. */ - DbSystemShapesClientImpl(OracleDatabaseResourceManagerImpl client) { + DbSystemShapesClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(DbSystemShapesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerDbSystemShapes to be used by the proxy + * The interface defining all the services for OracleDatabaseManagementClientDbSystemShapes to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface DbSystemShapesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @PathParam("dbsystemshapename") String dbsystemshapename, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("dbsystemshapename") String dbsystemshapename, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("zone") String zone, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("zone") String zone, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List DbSystemShape resources by Location. + * Get a DbSystemShape. * * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a DbSystemShape along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, String dbsystemshapename) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -111,221 +139,246 @@ private Mono> listByLocationSinglePageAsync(St if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (dbsystemshapename == null) { + return Mono + .error(new IllegalArgumentException("Parameter dbsystemshapename is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, dbsystemshapename, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List DbSystemShape resources by Location. + * Get a DbSystemShape. * * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String dbsystemshapename) { + return getWithResponseAsync(location, dbsystemshapename).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a DbSystemShape along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, Context context) { + public Response getWithResponse(String location, String dbsystemshapename, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (dbsystemshapename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dbsystemshapename is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, dbsystemshapename, accept, context); } /** - * List DbSystemShape resources by Location. + * Get a DbSystemShape. * * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation as paginated response with {@link PagedFlux}. + * @return a DbSystemShape. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DbSystemShapeInner get(String location, String dbsystemshapename) { + return getWithResponse(location, dbsystemshapename, Context.NONE).getValue(); } /** - * List DbSystemShape resources by Location. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param zone Filters the result for the given Azure Availability Zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation as paginated response with {@link PagedFlux}. + * @return the response of a DbSystemShape list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, String zone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, zone, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List DbSystemShape resources by Location. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. + * @param zone Filters the result for the given Azure Availability Zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + private PagedFlux listByLocationAsync(String location, String zone) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, zone), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * List DbSystemShape resources by Location. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + private PagedFlux listByLocationAsync(String location) { + final String zone = null; + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, zone), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Get a DbSystemShape. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. + * @param zone Filters the result for the given Azure Availability Zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DbSystemShape list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String dbsystemshapename) { + private PagedResponse listByLocationSinglePage(String location, String zone) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dbsystemshapename == null) { - return Mono - .error(new IllegalArgumentException("Parameter dbsystemshapename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, dbsystemshapename, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, zone, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DbSystemShape. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. + * @param zone Filters the result for the given Azure Availability Zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DbSystemShape list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String dbsystemshapename, - Context context) { + private PagedResponse listByLocationSinglePage(String location, String zone, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dbsystemshapename == null) { - return Mono - .error(new IllegalArgumentException("Parameter dbsystemshapename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, dbsystemshapename, accept, context); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, zone, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DbSystemShape. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape on successful completion of {@link Mono}. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String dbsystemshapename) { - return getWithResponseAsync(location, dbsystemshapename).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + final String zone = null; + return new PagedIterable<>(() -> listByLocationSinglePage(location, zone), + nextLink -> listByLocationNextSinglePage(nextLink)); } /** - * Get a DbSystemShape. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. + * @param zone Filters the result for the given Azure Availability Zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String dbsystemshapename, Context context) { - return getWithResponseAsync(location, dbsystemshapename, context).block(); - } - - /** - * Get a DbSystemShape. - * - * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DbSystemShapeInner get(String location, String dbsystemshapename) { - return getWithResponse(location, dbsystemshapename, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, String zone, Context context) { + return new PagedIterable<>(() -> listByLocationSinglePage(location, zone, context), + nextLink -> listByLocationNextSinglePage(nextLink, context)); } /** @@ -355,6 +408,33 @@ private Mono> listByLocationNextSinglePageAsyn .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbSystemShape list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByLocationNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -363,23 +443,25 @@ private Mono> listByLocationNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a DbSystemShape list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByLocationNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(DbSystemShapesClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapesImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapesImpl.java index 505d60a89483..0ef002a51542 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapesImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbSystemShapesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,16 +27,6 @@ public DbSystemShapesImpl(DbSystemShapesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DbSystemShapeImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DbSystemShapeImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String dbsystemshapename, Context context) { Response inner = this.serviceClient().getWithResponse(location, dbsystemshapename, context); if (inner != null) { @@ -56,6 +46,16 @@ public DbSystemShape get(String location, String dbsystemshapename) { } } + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbSystemShapeImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, String zone, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, zone, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbSystemShapeImpl(inner1, this.manager())); + } + private DbSystemShapesClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewImpl.java index 1b0dfdbb1cd3..a155772bf32d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewsClientImpl.java index b8465d111b6d..e0b3d120f2a5 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.DnsPrivateViewsClient; import com.azure.resourcemanager.oracledatabase.fluent.models.DnsPrivateViewInner; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateViewListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.DnsPrivateViewListResult; import reactor.core.publisher.Mono; /** @@ -42,64 +43,89 @@ public final class DnsPrivateViewsClientImpl implements DnsPrivateViewsClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of DnsPrivateViewsClientImpl. * * @param client the instance of the service client containing this operation class. */ - DnsPrivateViewsClientImpl(OracleDatabaseResourceManagerImpl client) { + DnsPrivateViewsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(DnsPrivateViewsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerDnsPrivateViews to be used by the proxy + * The interface defining all the services for OracleDatabaseManagementClientDnsPrivateViews to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface DnsPrivateViewsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @PathParam("dnsprivateviewocid") String dnsprivateviewocid, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("dnsprivateviewocid") String dnsprivateviewocid, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List DnsPrivateView resources by Location. + * Get a DnsPrivateView. * * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a DnsPrivateView along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, String dnsprivateviewocid) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -111,221 +137,224 @@ private Mono> listByLocationSinglePageAsync(S if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (dnsprivateviewocid == null) { + return Mono + .error(new IllegalArgumentException("Parameter dnsprivateviewocid is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, dnsprivateviewocid, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List DnsPrivateView resources by Location. + * Get a DnsPrivateView. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dnsprivateviewocid DnsPrivateView OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a DnsPrivateView on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String location, String dnsprivateviewocid) { + return getWithResponseAsync(location, dnsprivateviewocid).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List DnsPrivateView resources by Location. + * Get a DnsPrivateView. * * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedFlux}. + * @return a DnsPrivateView along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String dnsprivateviewocid, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (dnsprivateviewocid == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsprivateviewocid is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, dnsprivateviewocid, accept, context); } /** - * List DnsPrivateView resources by Location. + * Get a DnsPrivateView. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dnsprivateviewocid DnsPrivateView OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedFlux}. + * @return a DnsPrivateView. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsPrivateViewInner get(String location, String dnsprivateviewocid) { + return getWithResponse(location, dnsprivateviewocid, Context.NONE).getValue(); } /** - * List DnsPrivateView resources by Location. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List DnsPrivateView resources by Location. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Get a DnsPrivateView. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String dnsprivateviewocid) { + private PagedResponse listByLocationSinglePage(String location) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dnsprivateviewocid == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsprivateviewocid is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, dnsprivateviewocid, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DnsPrivateView. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String dnsprivateviewocid, - Context context) { + private PagedResponse listByLocationSinglePage(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dnsprivateviewocid == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsprivateviewocid is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, dnsprivateviewocid, accept, context); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DnsPrivateView. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView on successful completion of {@link Mono}. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String dnsprivateviewocid) { - return getWithResponseAsync(location, dnsprivateviewocid).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(() -> listByLocationSinglePage(location), + nextLink -> listByLocationNextSinglePage(nextLink)); } /** - * Get a DnsPrivateView. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String dnsprivateviewocid, Context context) { - return getWithResponseAsync(location, dnsprivateviewocid, context).block(); - } - - /** - * Get a DnsPrivateView. - * - * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsPrivateViewInner get(String location, String dnsprivateviewocid) { - return getWithResponse(location, dnsprivateviewocid, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(() -> listByLocationSinglePage(location, context), + nextLink -> listByLocationNextSinglePage(nextLink, context)); } /** @@ -355,6 +384,33 @@ private Mono> listByLocationNextSinglePageAsy .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByLocationNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -363,23 +419,25 @@ private Mono> listByLocationNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByLocationNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(DnsPrivateViewsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewsImpl.java index 53efab91014f..f54c3feacee6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateViewsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,16 +27,6 @@ public DnsPrivateViewsImpl(DnsPrivateViewsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateViewImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateViewImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String dnsprivateviewocid, Context context) { Response inner = this.serviceClient().getWithResponse(location, dnsprivateviewocid, context); @@ -57,6 +47,16 @@ public DnsPrivateView get(String location, String dnsprivateviewocid) { } } + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateViewImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateViewImpl(inner1, this.manager())); + } + private DnsPrivateViewsClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZoneImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZoneImpl.java index b08289f5738a..519ddfecc049 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZoneImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZoneImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZonesClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZonesClientImpl.java index 932761cbd0c4..1988ee35cd09 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZonesClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZonesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.DnsPrivateZonesClient; import com.azure.resourcemanager.oracledatabase.fluent.models.DnsPrivateZoneInner; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateZoneListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.DnsPrivateZoneListResult; import reactor.core.publisher.Mono; /** @@ -42,64 +43,89 @@ public final class DnsPrivateZonesClientImpl implements DnsPrivateZonesClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of DnsPrivateZonesClientImpl. * * @param client the instance of the service client containing this operation class. */ - DnsPrivateZonesClientImpl(OracleDatabaseResourceManagerImpl client) { + DnsPrivateZonesClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(DnsPrivateZonesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerDnsPrivateZones to be used by the proxy + * The interface defining all the services for OracleDatabaseManagementClientDnsPrivateZones to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface DnsPrivateZonesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @PathParam("dnsprivatezonename") String dnsprivatezonename, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("dnsprivatezonename") String dnsprivatezonename, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List DnsPrivateZone resources by Location. + * Get a DnsPrivateZone. * * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a DnsPrivateZone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, String dnsprivatezonename) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -111,221 +137,224 @@ private Mono> listByLocationSinglePageAsync(S if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (dnsprivatezonename == null) { + return Mono + .error(new IllegalArgumentException("Parameter dnsprivatezonename is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, dnsprivatezonename, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List DnsPrivateZone resources by Location. + * Get a DnsPrivateZone. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dnsprivatezonename DnsPrivateZone name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a DnsPrivateZone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String location, String dnsprivatezonename) { + return getWithResponseAsync(location, dnsprivatezonename).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List DnsPrivateZone resources by Location. + * Get a DnsPrivateZone. * * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedFlux}. + * @return a DnsPrivateZone along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String dnsprivatezonename, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (dnsprivatezonename == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter dnsprivatezonename is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, dnsprivatezonename, accept, context); } /** - * List DnsPrivateZone resources by Location. + * Get a DnsPrivateZone. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dnsprivatezonename DnsPrivateZone name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedFlux}. + * @return a DnsPrivateZone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsPrivateZoneInner get(String location, String dnsprivatezonename) { + return getWithResponse(location, dnsprivatezonename, Context.NONE).getValue(); } /** - * List DnsPrivateZone resources by Location. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List DnsPrivateZone resources by Location. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Get a DnsPrivateZone. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String dnsprivatezonename) { + private PagedResponse listByLocationSinglePage(String location) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dnsprivatezonename == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsprivatezonename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, dnsprivatezonename, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DnsPrivateZone. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String dnsprivatezonename, - Context context) { + private PagedResponse listByLocationSinglePage(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dnsprivatezonename == null) { - return Mono - .error(new IllegalArgumentException("Parameter dnsprivatezonename is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, dnsprivatezonename, accept, context); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a DnsPrivateZone. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone on successful completion of {@link Mono}. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String dnsprivatezonename) { - return getWithResponseAsync(location, dnsprivatezonename).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(() -> listByLocationSinglePage(location), + nextLink -> listByLocationNextSinglePage(nextLink)); } /** - * Get a DnsPrivateZone. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String dnsprivatezonename, Context context) { - return getWithResponseAsync(location, dnsprivatezonename, context).block(); - } - - /** - * Get a DnsPrivateZone. - * - * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DnsPrivateZoneInner get(String location, String dnsprivatezonename) { - return getWithResponse(location, dnsprivatezonename, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(() -> listByLocationSinglePage(location, context), + nextLink -> listByLocationNextSinglePage(nextLink, context)); } /** @@ -355,6 +384,33 @@ private Mono> listByLocationNextSinglePageAsy .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByLocationNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -363,23 +419,25 @@ private Mono> listByLocationNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByLocationNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(DnsPrivateZonesClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZonesImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZonesImpl.java index cea6ff49aefc..c092db4f2d1f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZonesImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DnsPrivateZonesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,16 +27,6 @@ public DnsPrivateZonesImpl(DnsPrivateZonesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateZoneImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateZoneImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String dnsprivatezonename, Context context) { Response inner = this.serviceClient().getWithResponse(location, dnsprivatezonename, context); @@ -57,6 +47,16 @@ public DnsPrivateZone get(String location, String dnsprivatezonename) { } } + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateZoneImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateZoneImpl(inner1, this.manager())); + } + private DnsPrivateZonesClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClusterImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClusterImpl.java new file mode 100644 index 000000000000..c17026a92539 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClusterImpl.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmCluster; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterProperties; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdate; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdateProperties; +import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ExadbVmClusterImpl implements ExadbVmCluster, ExadbVmCluster.Definition, ExadbVmCluster.Update { + private ExadbVmClusterInner innerObject; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ExadbVmClusterProperties properties() { + return this.innerModel().properties(); + } + + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ExadbVmClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String exadbVmClusterName; + + private ExadbVmClusterUpdate updateProperties; + + public ExadbVmClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ExadbVmCluster create() { + this.innerObject = serviceManager.serviceClient() + .getExadbVmClusters() + .createOrUpdate(resourceGroupName, exadbVmClusterName, this.innerModel(), Context.NONE); + return this; + } + + public ExadbVmCluster create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExadbVmClusters() + .createOrUpdate(resourceGroupName, exadbVmClusterName, this.innerModel(), context); + return this; + } + + ExadbVmClusterImpl(String name, com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerObject = new ExadbVmClusterInner(); + this.serviceManager = serviceManager; + this.exadbVmClusterName = name; + } + + public ExadbVmClusterImpl update() { + this.updateProperties = new ExadbVmClusterUpdate(); + return this; + } + + public ExadbVmCluster apply() { + this.innerObject = serviceManager.serviceClient() + .getExadbVmClusters() + .update(resourceGroupName, exadbVmClusterName, updateProperties, Context.NONE); + return this; + } + + public ExadbVmCluster apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExadbVmClusters() + .update(resourceGroupName, exadbVmClusterName, updateProperties, context); + return this; + } + + ExadbVmClusterImpl(ExadbVmClusterInner innerObject, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.exadbVmClusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "exadbVmClusters"); + } + + public ExadbVmCluster refresh() { + this.innerObject = serviceManager.serviceClient() + .getExadbVmClusters() + .getByResourceGroupWithResponse(resourceGroupName, exadbVmClusterName, Context.NONE) + .getValue(); + return this; + } + + public ExadbVmCluster refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExadbVmClusters() + .getByResourceGroupWithResponse(resourceGroupName, exadbVmClusterName, context) + .getValue(); + return this; + } + + public ExadbVmCluster removeVms(RemoveVirtualMachineFromExadbVmClusterDetails body) { + return serviceManager.exadbVmClusters().removeVms(resourceGroupName, exadbVmClusterName, body); + } + + public ExadbVmCluster removeVms(RemoveVirtualMachineFromExadbVmClusterDetails body, Context context) { + return serviceManager.exadbVmClusters().removeVms(resourceGroupName, exadbVmClusterName, body, context); + } + + public ExadbVmClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ExadbVmClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ExadbVmClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public ExadbVmClusterImpl withProperties(ExadbVmClusterProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ExadbVmClusterImpl withZones(List zones) { + if (isInCreateMode()) { + this.innerModel().withZones(zones); + return this; + } else { + this.updateProperties.withZones(zones); + return this; + } + } + + public ExadbVmClusterImpl withProperties(ExadbVmClusterUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClustersClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClustersClientImpl.java new file mode 100644 index 000000000000..eaf2a5d1c54e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClustersClientImpl.java @@ -0,0 +1,1723 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +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.oracledatabase.fluent.ExadbVmClustersClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner; +import com.azure.resourcemanager.oracledatabase.implementation.models.ExadbVmClusterListResult; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdate; +import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ExadbVmClustersClient. + */ +public final class ExadbVmClustersClientImpl implements ExadbVmClustersClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExadbVmClustersService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseManagementClientImpl client; + + /** + * Initializes an instance of ExadbVmClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExadbVmClustersClientImpl(OracleDatabaseManagementClientImpl client) { + this.service + = RestProxy.create(ExadbVmClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseManagementClientExadbVmClusters to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") + public interface ExadbVmClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExadbVmClusterInner resource, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExadbVmClusterInner resource, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExadbVmClusterUpdate properties, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ExadbVmClusterUpdate properties, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> removeVms(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RemoveVirtualMachineFromExadbVmClusterDetails body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response removeVmsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RemoveVirtualMachineFromExadbVmClusterDetails body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List ExadbVmCluster resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ExadbVmCluster resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List ExadbVmCluster resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExadbVmCluster resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExadbVmCluster resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List ExadbVmCluster resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, resource, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterInner resource) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, resource, + Context.NONE); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, resource, + context); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExadbVmClusterInner> + beginCreateOrUpdateAsync(String resourceGroupName, String exadbVmClusterName, ExadbVmClusterInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, exadbVmClusterName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExadbVmClusterInner.class, ExadbVmClusterInner.class, this.client.getContext()); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExadbVmClusterInner> + beginCreateOrUpdate(String resourceGroupName, String exadbVmClusterName, ExadbVmClusterInner resource) { + Response response = createOrUpdateWithResponse(resourceGroupName, exadbVmClusterName, resource); + return this.client.getLroResult(response, ExadbVmClusterInner.class, + ExadbVmClusterInner.class, Context.NONE); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExadbVmClusterInner> beginCreateOrUpdate( + String resourceGroupName, String exadbVmClusterName, ExadbVmClusterInner resource, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, exadbVmClusterName, resource, context); + return this.client.getLroResult(response, ExadbVmClusterInner.class, + ExadbVmClusterInner.class, context); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, exadbVmClusterName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner createOrUpdate(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterInner resource) { + return beginCreateOrUpdate(resourceGroupName, exadbVmClusterName, resource).getFinalResult(); + } + + /** + * Create a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner createOrUpdate(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, exadbVmClusterName, resource, context).getFinalResult(); + } + + /** + * Get a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String exadbVmClusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String exadbVmClusterName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, exadbVmClusterName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String exadbVmClusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, accept, context); + } + + /** + * Get a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner getByResourceGroup(String resourceGroupName, String exadbVmClusterName) { + return getByResourceGroupWithResponse(resourceGroupName, exadbVmClusterName, Context.NONE).getValue(); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, properties, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterUpdate properties) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, properties, + Context.NONE); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, properties, + context); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExadbVmClusterInner> beginUpdateAsync(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, exadbVmClusterName, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExadbVmClusterInner.class, ExadbVmClusterInner.class, this.client.getContext()); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExadbVmClusterInner> beginUpdate(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterUpdate properties) { + Response response = updateWithResponse(resourceGroupName, exadbVmClusterName, properties); + return this.client.getLroResult(response, ExadbVmClusterInner.class, + ExadbVmClusterInner.class, Context.NONE); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExadbVmClusterInner> beginUpdate(String resourceGroupName, + String exadbVmClusterName, ExadbVmClusterUpdate properties, Context context) { + Response response = updateWithResponse(resourceGroupName, exadbVmClusterName, properties, context); + return this.client.getLroResult(response, ExadbVmClusterInner.class, + ExadbVmClusterInner.class, context); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterUpdate properties) { + return beginUpdateAsync(resourceGroupName, exadbVmClusterName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner update(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterUpdate properties) { + return beginUpdate(resourceGroupName, exadbVmClusterName, properties).getFinalResult(); + } + + /** + * Update a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner update(String resourceGroupName, String exadbVmClusterName, + ExadbVmClusterUpdate properties, Context context) { + return beginUpdate(resourceGroupName, exadbVmClusterName, properties, context).getFinalResult(); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String exadbVmClusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String exadbVmClusterName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, accept, Context.NONE); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String exadbVmClusterName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, accept, context); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String exadbVmClusterName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, exadbVmClusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String exadbVmClusterName) { + Response response = deleteWithResponse(resourceGroupName, exadbVmClusterName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String exadbVmClusterName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, exadbVmClusterName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String exadbVmClusterName) { + return beginDeleteAsync(resourceGroupName, exadbVmClusterName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String exadbVmClusterName) { + beginDelete(resourceGroupName, exadbVmClusterName).getFinalResult(); + } + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String exadbVmClusterName, Context context) { + beginDelete(resourceGroupName, exadbVmClusterName, context).getFinalResult(); + } + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> removeVmsWithResponseAsync(String resourceGroupName, + String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.removeVms(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response removeVmsWithResponse(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.removeVmsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, body, + Context.NONE); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response removeVmsWithResponse(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.removeVmsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, contentType, accept, body, context); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExadbVmClusterInner> beginRemoveVmsAsync( + String resourceGroupName, String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body) { + Mono>> mono = removeVmsWithResponseAsync(resourceGroupName, exadbVmClusterName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExadbVmClusterInner.class, ExadbVmClusterInner.class, this.client.getContext()); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExadbVmClusterInner> beginRemoveVms(String resourceGroupName, + String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body) { + Response response = removeVmsWithResponse(resourceGroupName, exadbVmClusterName, body); + return this.client.getLroResult(response, ExadbVmClusterInner.class, + ExadbVmClusterInner.class, Context.NONE); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExadbVmClusterInner> beginRemoveVms(String resourceGroupName, + String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body, Context context) { + Response response = removeVmsWithResponse(resourceGroupName, exadbVmClusterName, body, context); + return this.client.getLroResult(response, ExadbVmClusterInner.class, + ExadbVmClusterInner.class, context); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono removeVmsAsync(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body) { + return beginRemoveVmsAsync(resourceGroupName, exadbVmClusterName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body) { + return beginRemoveVms(resourceGroupName, exadbVmClusterName, body).getFinalResult(); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body, Context context) { + return beginRemoveVms(resourceGroupName, exadbVmClusterName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ExadbVmClustersClientImpl.class); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClustersImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClustersImpl.java new file mode 100644 index 000000000000..70714205a860 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClustersImpl.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmCluster; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusters; +import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; + +public final class ExadbVmClustersImpl implements ExadbVmClusters { + private static final ClientLogger LOGGER = new ClientLogger(ExadbVmClustersImpl.class); + + private final ExadbVmClustersClient innerClient; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + public ExadbVmClustersImpl(ExadbVmClustersClient innerClient, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExadbVmClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExadbVmClusterImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String exadbVmClusterName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, exadbVmClusterName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExadbVmClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ExadbVmCluster getByResourceGroup(String resourceGroupName, String exadbVmClusterName) { + ExadbVmClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, exadbVmClusterName); + if (inner != null) { + return new ExadbVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String exadbVmClusterName) { + this.serviceClient().delete(resourceGroupName, exadbVmClusterName); + } + + public void delete(String resourceGroupName, String exadbVmClusterName, Context context) { + this.serviceClient().delete(resourceGroupName, exadbVmClusterName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExadbVmClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExadbVmClusterImpl(inner1, this.manager())); + } + + public ExadbVmCluster removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body) { + ExadbVmClusterInner inner = this.serviceClient().removeVms(resourceGroupName, exadbVmClusterName, body); + if (inner != null) { + return new ExadbVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExadbVmCluster removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body, Context context) { + ExadbVmClusterInner inner + = this.serviceClient().removeVms(resourceGroupName, exadbVmClusterName, body, context); + if (inner != null) { + return new ExadbVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExadbVmCluster getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String exadbVmClusterName = ResourceManagerUtils.getValueFromIdByName(id, "exadbVmClusters"); + if (exadbVmClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'exadbVmClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, exadbVmClusterName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String exadbVmClusterName = ResourceManagerUtils.getValueFromIdByName(id, "exadbVmClusters"); + if (exadbVmClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'exadbVmClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, exadbVmClusterName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String exadbVmClusterName = ResourceManagerUtils.getValueFromIdByName(id, "exadbVmClusters"); + if (exadbVmClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'exadbVmClusters'.", id))); + } + this.delete(resourceGroupName, exadbVmClusterName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String exadbVmClusterName = ResourceManagerUtils.getValueFromIdByName(id, "exadbVmClusters"); + if (exadbVmClusterName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'exadbVmClusters'.", id))); + } + this.delete(resourceGroupName, exadbVmClusterName, context); + } + + private ExadbVmClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } + + public ExadbVmClusterImpl define(String name) { + return new ExadbVmClusterImpl(name, this.manager()); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodeImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodeImpl.java new file mode 100644 index 000000000000..f5c5bb760e9b --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodeImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNode; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodeProperties; + +public final class ExascaleDbNodeImpl implements ExascaleDbNode { + private ExascaleDbNodeInner innerObject; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + ExascaleDbNodeImpl(ExascaleDbNodeInner innerObject, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ExascaleDbNodeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ExascaleDbNodeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodesClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodesClientImpl.java new file mode 100644 index 000000000000..840b3b1fd168 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodesClientImpl.java @@ -0,0 +1,793 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +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.oracledatabase.fluent.ExascaleDbNodesClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.DbActionResponseInner; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner; +import com.azure.resourcemanager.oracledatabase.implementation.models.ExascaleDbNodeListResult; +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ExascaleDbNodesClient. + */ +public final class ExascaleDbNodesClientImpl implements ExascaleDbNodesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExascaleDbNodesService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseManagementClientImpl client; + + /** + * Initializes an instance of ExascaleDbNodesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExascaleDbNodesClientImpl(OracleDatabaseManagementClientImpl client) { + this.service + = RestProxy.create(ExascaleDbNodesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseManagementClientExascaleDbNodes to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") + public interface ExascaleDbNodesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, + @PathParam("exascaleDbNodeName") String exascaleDbNodeName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, + @PathParam("exascaleDbNodeName") String exascaleDbNodeName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> action(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, + @PathParam("exascaleDbNodeName") String exascaleDbNodeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DbNodeAction body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response actionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, + @PathParam("exascaleDbNodeName") String exascaleDbNodeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DbNodeAction body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParentNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a ExascaleDbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbNode along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String exadbVmClusterName, String exascaleDbNodeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (exascaleDbNodeName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exascaleDbNodeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, exascaleDbNodeName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ExascaleDbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbNode on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName) { + return getWithResponseAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ExascaleDbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbNode along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (exascaleDbNodeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exascaleDbNodeName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, exadbVmClusterName, exascaleDbNodeName, accept, context); + } + + /** + * Get a ExascaleDbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbNode. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExascaleDbNodeInner get(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName) { + return getWithResponse(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, Context.NONE).getValue(); + } + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentSinglePageAsync(String resourceGroupName, + String exadbVmClusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String resourceGroupName, String exadbVmClusterName) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, exadbVmClusterName), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, + String exadbVmClusterName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String resourceGroupName, + String exadbVmClusterName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String exadbVmClusterName) { + return new PagedIterable<>(() -> listByParentSinglePage(resourceGroupName, exadbVmClusterName), + nextLink -> listByParentNextSinglePage(nextLink)); + } + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String resourceGroupName, String exadbVmClusterName, + Context context) { + return new PagedIterable<>(() -> listByParentSinglePage(resourceGroupName, exadbVmClusterName, context), + nextLink -> listByParentNextSinglePage(nextLink, context)); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> actionWithResponseAsync(String resourceGroupName, + String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (exascaleDbNodeName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exascaleDbNodeName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.action(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, exascaleDbNodeName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response actionWithResponse(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName, DbNodeAction body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (exascaleDbNodeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exascaleDbNodeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.actionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, exascaleDbNodeName, contentType, + accept, body, Context.NONE); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response actionWithResponse(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName, DbNodeAction body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exadbVmClusterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + if (exascaleDbNodeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter exascaleDbNodeName is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.actionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, exascaleDbNodeName, contentType, + accept, body, context); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DbActionResponseInner> beginActionAsync( + String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body) { + Mono>> mono + = actionWithResponseAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DbActionResponseInner.class, DbActionResponseInner.class, + this.client.getContext()); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DbActionResponseInner> beginAction(String resourceGroupName, + String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body) { + Response response + = actionWithResponse(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body); + return this.client.getLroResult(response, + DbActionResponseInner.class, DbActionResponseInner.class, Context.NONE); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DbActionResponseInner> beginAction(String resourceGroupName, + String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body, Context context) { + Response response + = actionWithResponse(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, context); + return this.client.getLroResult(response, + DbActionResponseInner.class, DbActionResponseInner.class, context); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono actionAsync(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName, DbNodeAction body) { + return beginActionAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbActionResponseInner action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body) { + return beginAction(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body).getFinalResult(); + } + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbActionResponseInner action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body, Context context) { + return beginAction(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, context).getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParentNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ExascaleDbNodesClientImpl.class); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodesImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodesImpl.java new file mode 100644 index 000000000000..0713f1730420 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodesImpl.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.DbActionResponseInner; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner; +import com.azure.resourcemanager.oracledatabase.models.DbActionResponse; +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNode; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodes; + +public final class ExascaleDbNodesImpl implements ExascaleDbNodes { + private static final ClientLogger LOGGER = new ClientLogger(ExascaleDbNodesImpl.class); + + private final ExascaleDbNodesClient innerClient; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + public ExascaleDbNodesImpl(ExascaleDbNodesClient innerClient, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExascaleDbNodeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ExascaleDbNode get(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName) { + ExascaleDbNodeInner inner = this.serviceClient().get(resourceGroupName, exadbVmClusterName, exascaleDbNodeName); + if (inner != null) { + return new ExascaleDbNodeImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByParent(String resourceGroupName, String exadbVmClusterName) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, exadbVmClusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExascaleDbNodeImpl(inner1, this.manager())); + } + + public PagedIterable listByParent(String resourceGroupName, String exadbVmClusterName, + Context context) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, exadbVmClusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExascaleDbNodeImpl(inner1, this.manager())); + } + + public DbActionResponse action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body) { + DbActionResponseInner inner + = this.serviceClient().action(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body); + if (inner != null) { + return new DbActionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public DbActionResponse action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body, Context context) { + DbActionResponseInner inner + = this.serviceClient().action(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, context); + if (inner != null) { + return new DbActionResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private ExascaleDbNodesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultImpl.java new file mode 100644 index 000000000000..5f00f1ae741b --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultImpl.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultTagsUpdate; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ExascaleDbStorageVaultImpl + implements ExascaleDbStorageVault, ExascaleDbStorageVault.Definition, ExascaleDbStorageVault.Update { + private ExascaleDbStorageVaultInner innerObject; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ExascaleDbStorageVaultProperties properties() { + return this.innerModel().properties(); + } + + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ExascaleDbStorageVaultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String exascaleDbStorageVaultName; + + private ExascaleDbStorageVaultTagsUpdate updateProperties; + + public ExascaleDbStorageVaultImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ExascaleDbStorageVault create() { + this.innerObject = serviceManager.serviceClient() + .getExascaleDbStorageVaults() + .create(resourceGroupName, exascaleDbStorageVaultName, this.innerModel(), Context.NONE); + return this; + } + + public ExascaleDbStorageVault create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExascaleDbStorageVaults() + .create(resourceGroupName, exascaleDbStorageVaultName, this.innerModel(), context); + return this; + } + + ExascaleDbStorageVaultImpl(String name, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerObject = new ExascaleDbStorageVaultInner(); + this.serviceManager = serviceManager; + this.exascaleDbStorageVaultName = name; + } + + public ExascaleDbStorageVaultImpl update() { + this.updateProperties = new ExascaleDbStorageVaultTagsUpdate(); + return this; + } + + public ExascaleDbStorageVault apply() { + this.innerObject = serviceManager.serviceClient() + .getExascaleDbStorageVaults() + .update(resourceGroupName, exascaleDbStorageVaultName, updateProperties, Context.NONE); + return this; + } + + public ExascaleDbStorageVault apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExascaleDbStorageVaults() + .update(resourceGroupName, exascaleDbStorageVaultName, updateProperties, context); + return this; + } + + ExascaleDbStorageVaultImpl(ExascaleDbStorageVaultInner innerObject, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.exascaleDbStorageVaultName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "exascaleDbStorageVaults"); + } + + public ExascaleDbStorageVault refresh() { + this.innerObject = serviceManager.serviceClient() + .getExascaleDbStorageVaults() + .getByResourceGroupWithResponse(resourceGroupName, exascaleDbStorageVaultName, Context.NONE) + .getValue(); + return this; + } + + public ExascaleDbStorageVault refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getExascaleDbStorageVaults() + .getByResourceGroupWithResponse(resourceGroupName, exascaleDbStorageVaultName, context) + .getValue(); + return this; + } + + public ExascaleDbStorageVaultImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ExascaleDbStorageVaultImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ExascaleDbStorageVaultImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public ExascaleDbStorageVaultImpl withProperties(ExascaleDbStorageVaultProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ExascaleDbStorageVaultImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultsClientImpl.java new file mode 100644 index 000000000000..671d293fdb6c --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultsClientImpl.java @@ -0,0 +1,1479 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +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.oracledatabase.fluent.ExascaleDbStorageVaultsClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner; +import com.azure.resourcemanager.oracledatabase.implementation.models.ExascaleDbStorageVaultListResult; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultTagsUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ExascaleDbStorageVaultsClient. + */ +public final class ExascaleDbStorageVaultsClientImpl implements ExascaleDbStorageVaultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ExascaleDbStorageVaultsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseManagementClientImpl client; + + /** + * Initializes an instance of ExascaleDbStorageVaultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExascaleDbStorageVaultsClientImpl(OracleDatabaseManagementClientImpl client) { + this.service = RestProxy.create(ExascaleDbStorageVaultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseManagementClientExascaleDbStorageVaults to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") + public interface ExascaleDbStorageVaultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExascaleDbStorageVaultInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExascaleDbStorageVaultInner resource, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExascaleDbStorageVaultTagsUpdate properties, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ExascaleDbStorageVaultTagsUpdate properties, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String exascaleDbStorageVaultName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + return Mono.error( + new IllegalArgumentException("Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String exascaleDbStorageVaultName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, exascaleDbStorageVaultName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String exascaleDbStorageVaultName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, accept, context); + } + + /** + * Get a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExascaleDbStorageVaultInner getByResourceGroup(String resourceGroupName, String exascaleDbStorageVaultName) { + return getByResourceGroupWithResponse(resourceGroupName, exascaleDbStorageVaultName, Context.NONE).getValue(); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, + String exascaleDbStorageVaultName, ExascaleDbStorageVaultInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + return Mono.error( + new IllegalArgumentException("Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, contentType, accept, + resource, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultInner resource) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, contentType, accept, + resource, Context.NONE); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, contentType, accept, + resource, context); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExascaleDbStorageVaultInner> beginCreateAsync( + String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultInner resource) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, exascaleDbStorageVaultName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ExascaleDbStorageVaultInner.class, ExascaleDbStorageVaultInner.class, + this.client.getContext()); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExascaleDbStorageVaultInner> + beginCreate(String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultInner resource) { + Response response = createWithResponse(resourceGroupName, exascaleDbStorageVaultName, resource); + return this.client.getLroResult(response, + ExascaleDbStorageVaultInner.class, ExascaleDbStorageVaultInner.class, Context.NONE); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExascaleDbStorageVaultInner> beginCreate( + String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultInner resource, + Context context) { + Response response + = createWithResponse(resourceGroupName, exascaleDbStorageVaultName, resource, context); + return this.client.getLroResult(response, + ExascaleDbStorageVaultInner.class, ExascaleDbStorageVaultInner.class, context); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultInner resource) { + return beginCreateAsync(resourceGroupName, exascaleDbStorageVaultName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExascaleDbStorageVaultInner create(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultInner resource) { + return beginCreate(resourceGroupName, exascaleDbStorageVaultName, resource).getFinalResult(); + } + + /** + * Create a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExascaleDbStorageVaultInner create(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultInner resource, Context context) { + return beginCreate(resourceGroupName, exascaleDbStorageVaultName, resource, context).getFinalResult(); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String exascaleDbStorageVaultName, ExascaleDbStorageVaultTagsUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + return Mono.error( + new IllegalArgumentException("Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, contentType, accept, + properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultTagsUpdate properties) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, contentType, accept, + properties, Context.NONE); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultTagsUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, contentType, accept, + properties, context); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ExascaleDbStorageVaultInner> beginUpdateAsync( + String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultTagsUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, exascaleDbStorageVaultName, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ExascaleDbStorageVaultInner.class, ExascaleDbStorageVaultInner.class, + this.client.getContext()); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExascaleDbStorageVaultInner> beginUpdate( + String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultTagsUpdate properties) { + Response response = updateWithResponse(resourceGroupName, exascaleDbStorageVaultName, properties); + return this.client.getLroResult(response, + ExascaleDbStorageVaultInner.class, ExascaleDbStorageVaultInner.class, Context.NONE); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExascaleDbStorageVaultInner> beginUpdate( + String resourceGroupName, String exascaleDbStorageVaultName, ExascaleDbStorageVaultTagsUpdate properties, + Context context) { + Response response + = updateWithResponse(resourceGroupName, exascaleDbStorageVaultName, properties, context); + return this.client.getLroResult(response, + ExascaleDbStorageVaultInner.class, ExascaleDbStorageVaultInner.class, context); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultTagsUpdate properties) { + return beginUpdateAsync(resourceGroupName, exascaleDbStorageVaultName, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExascaleDbStorageVaultInner update(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultTagsUpdate properties) { + return beginUpdate(resourceGroupName, exascaleDbStorageVaultName, properties).getFinalResult(); + } + + /** + * Update a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbStorageVault resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExascaleDbStorageVaultInner update(String resourceGroupName, String exascaleDbStorageVaultName, + ExascaleDbStorageVaultTagsUpdate properties, Context context) { + return beginUpdate(resourceGroupName, exascaleDbStorageVaultName, properties, context).getFinalResult(); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String exascaleDbStorageVaultName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + return Mono.error( + new IllegalArgumentException("Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String exascaleDbStorageVaultName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, accept, Context.NONE); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String exascaleDbStorageVaultName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (exascaleDbStorageVaultName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter exascaleDbStorageVaultName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, accept, context); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String exascaleDbStorageVaultName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, exascaleDbStorageVaultName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String exascaleDbStorageVaultName) { + Response response = deleteWithResponse(resourceGroupName, exascaleDbStorageVaultName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String exascaleDbStorageVaultName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, exascaleDbStorageVaultName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String exascaleDbStorageVaultName) { + return beginDeleteAsync(resourceGroupName, exascaleDbStorageVaultName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String exascaleDbStorageVaultName) { + beginDelete(resourceGroupName, exascaleDbStorageVaultName).getFinalResult(); + } + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String exascaleDbStorageVaultName, Context context) { + beginDelete(resourceGroupName, exascaleDbStorageVaultName, context).getFinalResult(); + } + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, + Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(ExascaleDbStorageVaultsClientImpl.class); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultsImpl.java new file mode 100644 index 000000000000..18769c27db31 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultsImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaults; + +public final class ExascaleDbStorageVaultsImpl implements ExascaleDbStorageVaults { + private static final ClientLogger LOGGER = new ClientLogger(ExascaleDbStorageVaultsImpl.class); + + private final ExascaleDbStorageVaultsClient innerClient; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + public ExascaleDbStorageVaultsImpl(ExascaleDbStorageVaultsClient innerClient, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String exascaleDbStorageVaultName, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, exascaleDbStorageVaultName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExascaleDbStorageVaultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ExascaleDbStorageVault getByResourceGroup(String resourceGroupName, String exascaleDbStorageVaultName) { + ExascaleDbStorageVaultInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, exascaleDbStorageVaultName); + if (inner != null) { + return new ExascaleDbStorageVaultImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String exascaleDbStorageVaultName) { + this.serviceClient().delete(resourceGroupName, exascaleDbStorageVaultName); + } + + public void delete(String resourceGroupName, String exascaleDbStorageVaultName, Context context) { + this.serviceClient().delete(resourceGroupName, exascaleDbStorageVaultName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExascaleDbStorageVaultImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExascaleDbStorageVaultImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExascaleDbStorageVaultImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExascaleDbStorageVaultImpl(inner1, this.manager())); + } + + public ExascaleDbStorageVault getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String exascaleDbStorageVaultName = ResourceManagerUtils.getValueFromIdByName(id, "exascaleDbStorageVaults"); + if (exascaleDbStorageVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'exascaleDbStorageVaults'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, exascaleDbStorageVaultName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String exascaleDbStorageVaultName = ResourceManagerUtils.getValueFromIdByName(id, "exascaleDbStorageVaults"); + if (exascaleDbStorageVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'exascaleDbStorageVaults'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, exascaleDbStorageVaultName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String exascaleDbStorageVaultName = ResourceManagerUtils.getValueFromIdByName(id, "exascaleDbStorageVaults"); + if (exascaleDbStorageVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'exascaleDbStorageVaults'.", id))); + } + this.delete(resourceGroupName, exascaleDbStorageVaultName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String exascaleDbStorageVaultName = ResourceManagerUtils.getValueFromIdByName(id, "exascaleDbStorageVaults"); + if (exascaleDbStorageVaultName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'exascaleDbStorageVaults'.", id))); + } + this.delete(resourceGroupName, exascaleDbStorageVaultName, context); + } + + private ExascaleDbStorageVaultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } + + public ExascaleDbStorageVaultImpl define(String name) { + return new ExascaleDbStorageVaultImpl(name, this.manager()); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentImpl.java new file mode 100644 index 000000000000..c8004c68cdb5 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner; +import com.azure.resourcemanager.oracledatabase.models.FlexComponent; +import com.azure.resourcemanager.oracledatabase.models.FlexComponentProperties; + +public final class FlexComponentImpl implements FlexComponent { + private FlexComponentInner innerObject; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + FlexComponentImpl(FlexComponentInner innerObject, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public FlexComponentProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public FlexComponentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentsClientImpl.java new file mode 100644 index 000000000000..c15dfe4f9428 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentsClientImpl.java @@ -0,0 +1,469 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +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.oracledatabase.fluent.FlexComponentsClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner; +import com.azure.resourcemanager.oracledatabase.implementation.models.FlexComponentListResult; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in FlexComponentsClient. + */ +public final class FlexComponentsClientImpl implements FlexComponentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final FlexComponentsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseManagementClientImpl client; + + /** + * Initializes an instance of FlexComponentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FlexComponentsClientImpl(OracleDatabaseManagementClientImpl client) { + this.service + = RestProxy.create(FlexComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseManagementClientFlexComponents to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") + public interface FlexComponentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("flexComponentName") String flexComponentName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("flexComponentName") String flexComponentName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("shape") SystemShapes shape, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("shape") SystemShapes shape, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParentNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a FlexComponent. + * + * @param location The name of the Azure region. + * @param flexComponentName The name of the FlexComponent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FlexComponent along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String flexComponentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (flexComponentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter flexComponentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, flexComponentName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a FlexComponent. + * + * @param location The name of the Azure region. + * @param flexComponentName The name of the FlexComponent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FlexComponent on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String flexComponentName) { + return getWithResponseAsync(location, flexComponentName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a FlexComponent. + * + * @param location The name of the Azure region. + * @param flexComponentName The name of the FlexComponent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FlexComponent along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String flexComponentName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (flexComponentName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter flexComponentName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, flexComponentName, accept, context); + } + + /** + * Get a FlexComponent. + * + * @param location The name of the Azure region. + * @param flexComponentName The name of the FlexComponent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FlexComponent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FlexComponentInner get(String location, String flexComponentName) { + return getWithResponse(location, flexComponentName, Context.NONE).getValue(); + } + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @param shape If provided, filters the results for the given shape. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentSinglePageAsync(String location, SystemShapes shape) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, shape, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @param shape If provided, filters the results for the given shape. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String location, SystemShapes shape) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(location, shape), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String location) { + final SystemShapes shape = null; + return new PagedFlux<>(() -> listByParentSinglePageAsync(location, shape), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @param shape If provided, filters the results for the given shape. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String location, SystemShapes shape) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByParentSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, shape, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @param shape If provided, filters the results for the given shape. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String location, SystemShapes shape, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByParentSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, shape, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String location) { + final SystemShapes shape = null; + return new PagedIterable<>(() -> listByParentSinglePage(location, shape), + nextLink -> listByParentNextSinglePage(nextLink)); + } + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @param shape If provided, filters the results for the given shape. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String location, SystemShapes shape, Context context) { + return new PagedIterable<>(() -> listByParentSinglePage(location, shape, context), + nextLink -> listByParentNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParentNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(FlexComponentsClientImpl.class); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentsImpl.java new file mode 100644 index 000000000000..709de3eea2c4 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentsImpl.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner; +import com.azure.resourcemanager.oracledatabase.models.FlexComponent; +import com.azure.resourcemanager.oracledatabase.models.FlexComponents; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + +public final class FlexComponentsImpl implements FlexComponents { + private static final ClientLogger LOGGER = new ClientLogger(FlexComponentsImpl.class); + + private final FlexComponentsClient innerClient; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + public FlexComponentsImpl(FlexComponentsClient innerClient, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, String flexComponentName, Context context) { + Response inner = this.serviceClient().getWithResponse(location, flexComponentName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FlexComponentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FlexComponent get(String location, String flexComponentName) { + FlexComponentInner inner = this.serviceClient().get(location, flexComponentName); + if (inner != null) { + return new FlexComponentImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listByParent(String location) { + PagedIterable inner = this.serviceClient().listByParent(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexComponentImpl(inner1, this.manager())); + } + + public PagedIterable listByParent(String location, SystemShapes shape, Context context) { + PagedIterable inner = this.serviceClient().listByParent(location, shape, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FlexComponentImpl(inner1, this.manager())); + } + + private FlexComponentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionImpl.java new file mode 100644 index 000000000000..808b69194e34 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersion; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersionProperties; + +public final class GiMinorVersionImpl implements GiMinorVersion { + private GiMinorVersionInner innerObject; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + GiMinorVersionImpl(GiMinorVersionInner innerObject, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public GiMinorVersionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public GiMinorVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionsClientImpl.java new file mode 100644 index 000000000000..37b7428ee59f --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionsClientImpl.java @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +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.oracledatabase.fluent.GiMinorVersionsClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner; +import com.azure.resourcemanager.oracledatabase.implementation.models.GiMinorVersionListResult; +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GiMinorVersionsClient. + */ +public final class GiMinorVersionsClientImpl implements GiMinorVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final GiMinorVersionsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseManagementClientImpl client; + + /** + * Initializes an instance of GiMinorVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GiMinorVersionsClientImpl(OracleDatabaseManagementClientImpl client) { + this.service + = RestProxy.create(GiMinorVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseManagementClientGiMinorVersions to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") + public interface GiMinorVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("giversionname") String giversionname, + @QueryParam("shapeFamily") ShapeFamily shapeFamily, @QueryParam("zone") String zone, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("giversionname") String giversionname, + @QueryParam("shapeFamily") ShapeFamily shapeFamily, @QueryParam("zone") String zone, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("giversionname") String giversionname, + @PathParam("giMinorVersionName") String giMinorVersionName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("giversionname") String giversionname, + @PathParam("giMinorVersionName") String giMinorVersionName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParentNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByParentNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param shapeFamily If provided, filters the results to the set of database versions which are supported for the + * given shape family. + * @param zone Filters the result for the given Azure Availability Zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentSinglePageAsync(String location, String giversionname, + ShapeFamily shapeFamily, String zone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (giversionname == null) { + return Mono.error(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParent(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, giversionname, shapeFamily, zone, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param shapeFamily If provided, filters the results to the set of database versions which are supported for the + * given shape family. + * @param zone Filters the result for the given Azure Availability Zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String location, String giversionname, + ShapeFamily shapeFamily, String zone) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(location, giversionname, shapeFamily, zone), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByParentAsync(String location, String giversionname) { + final ShapeFamily shapeFamily = null; + final String zone = null; + return new PagedFlux<>(() -> listByParentSinglePageAsync(location, giversionname, shapeFamily, zone), + nextLink -> listByParentNextSinglePageAsync(nextLink)); + } + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param shapeFamily If provided, filters the results to the set of database versions which are supported for the + * given shape family. + * @param zone Filters the result for the given Azure Availability Zone. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String location, String giversionname, + ShapeFamily shapeFamily, String zone) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (giversionname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, giversionname, shapeFamily, zone, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param shapeFamily If provided, filters the results to the set of database versions which are supported for the + * given shape family. + * @param zone Filters the result for the given Azure Availability Zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentSinglePage(String location, String giversionname, + ShapeFamily shapeFamily, String zone, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (giversionname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, giversionname, shapeFamily, zone, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String location, String giversionname) { + final ShapeFamily shapeFamily = null; + final String zone = null; + return new PagedIterable<>(() -> listByParentSinglePage(location, giversionname, shapeFamily, zone), + nextLink -> listByParentNextSinglePage(nextLink)); + } + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param shapeFamily If provided, filters the results to the set of database versions which are supported for the + * given shape family. + * @param zone Filters the result for the given Azure Availability Zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByParent(String location, String giversionname, + ShapeFamily shapeFamily, String zone, Context context) { + return new PagedIterable<>(() -> listByParentSinglePage(location, giversionname, shapeFamily, zone, context), + nextLink -> listByParentNextSinglePage(nextLink, context)); + } + + /** + * Get a GiMinorVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param giMinorVersionName The name of the GiMinorVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiMinorVersion along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String giversionname, + String giMinorVersionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (giversionname == null) { + return Mono.error(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + } + if (giMinorVersionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter giMinorVersionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, giversionname, giMinorVersionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a GiMinorVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param giMinorVersionName The name of the GiMinorVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiMinorVersion on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String giversionname, String giMinorVersionName) { + return getWithResponseAsync(location, giversionname, giMinorVersionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a GiMinorVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param giMinorVersionName The name of the GiMinorVersion. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiMinorVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String giversionname, + String giMinorVersionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (giversionname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + } + if (giMinorVersionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter giMinorVersionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, giversionname, giMinorVersionName, accept, context); + } + + /** + * Get a GiMinorVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param giMinorVersionName The name of the GiMinorVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiMinorVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GiMinorVersionInner get(String location, String giversionname, String giMinorVersionName) { + return getWithResponse(location, giversionname, giMinorVersionName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByParentNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByParentNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByParentNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByParentNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + private static final ClientLogger LOGGER = new ClientLogger(GiMinorVersionsClientImpl.class); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionsImpl.java new file mode 100644 index 000000000000..5906d2651adf --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionsImpl.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersion; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersions; +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; + +public final class GiMinorVersionsImpl implements GiMinorVersions { + private static final ClientLogger LOGGER = new ClientLogger(GiMinorVersionsImpl.class); + + private final GiMinorVersionsClient innerClient; + + private final com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager; + + public GiMinorVersionsImpl(GiMinorVersionsClient innerClient, + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByParent(String location, String giversionname) { + PagedIterable inner = this.serviceClient().listByParent(location, giversionname); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GiMinorVersionImpl(inner1, this.manager())); + } + + public PagedIterable listByParent(String location, String giversionname, ShapeFamily shapeFamily, + String zone, Context context) { + PagedIterable inner + = this.serviceClient().listByParent(location, giversionname, shapeFamily, zone, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GiMinorVersionImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String giversionname, String giMinorVersionName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(location, giversionname, giMinorVersionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GiMinorVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GiMinorVersion get(String location, String giversionname, String giMinorVersionName) { + GiMinorVersionInner inner = this.serviceClient().get(location, giversionname, giMinorVersionName); + if (inner != null) { + return new GiMinorVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + private GiMinorVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionImpl.java index 3b98c0b2b0cc..e29d047f5ff0 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsClientImpl.java index 97bd9c373b72..aa7e00b068f4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,11 @@ 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.oracledatabase.fluent.GiVersionsClient; import com.azure.resourcemanager.oracledatabase.fluent.models.GiVersionInner; -import com.azure.resourcemanager.oracledatabase.models.GiVersionListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.GiVersionListResult; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; import reactor.core.publisher.Mono; /** @@ -42,64 +44,91 @@ public final class GiVersionsClientImpl implements GiVersionsClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of GiVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - GiVersionsClientImpl(OracleDatabaseResourceManagerImpl client) { + GiVersionsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(GiVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerGiVersions to be used by the proxy + * The interface defining all the services for OracleDatabaseManagementClientGiVersions to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface GiVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @PathParam("giversionname") String giversionname, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("giversionname") String giversionname, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("shape") SystemShapes shape, + @QueryParam("zone") String zone, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("shape") SystemShapes shape, + @QueryParam("zone") String zone, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List GiVersion resources by Location. + * Get a GiVersion. * * @param location The name of the Azure region. + * @param giversionname GiVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a GiVersion along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, String giversionname) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -111,219 +140,255 @@ private Mono> listByLocationSinglePageAsync(String if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (giversionname == null) { + return Mono.error(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, giversionname, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List GiVersion resources by Location. + * Get a GiVersion. * * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiVersion on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String giversionname) { + return getWithResponseAsync(location, giversionname).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a GiVersion along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, Context context) { + public Response getWithResponse(String location, String giversionname, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (giversionname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, giversionname, accept, context); } /** - * List GiVersion resources by Location. + * Get a GiVersion. * * @param location The name of the Azure region. + * @param giversionname GiVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation as paginated response with {@link PagedFlux}. + * @return a GiVersion. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public GiVersionInner get(String location, String giversionname) { + return getWithResponse(location, giversionname, Context.NONE).getValue(); } /** - * List GiVersion resources by Location. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param shape If provided, filters the results for the given shape. + * @param zone Filters the result for the given Azure Availability Zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation as paginated response with {@link PagedFlux}. + * @return the response of a GiVersion list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, SystemShapes shape, + String zone) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, shape, zone, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List GiVersion resources by Location. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. + * @param shape If provided, filters the results for the given shape. + * @param zone Filters the result for the given Azure Availability Zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. + * @return the response of a GiVersion list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + private PagedFlux listByLocationAsync(String location, SystemShapes shape, String zone) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, shape, zone), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * List GiVersion resources by Location. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. + * @return the response of a GiVersion list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + private PagedFlux listByLocationAsync(String location) { + final SystemShapes shape = null; + final String zone = null; + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, shape, zone), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Get a GiVersion. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param giversionname GiVersion name. + * @param shape If provided, filters the results for the given shape. + * @param zone Filters the result for the given Azure Availability Zone. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a GiVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String giversionname) { + private PagedResponse listByLocationSinglePage(String location, SystemShapes shape, String zone) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (giversionname == null) { - return Mono.error(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, giversionname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, shape, zone, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a GiVersion. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param giversionname GiVersion name. + * @param shape If provided, filters the results for the given shape. + * @param zone Filters the result for the given Azure Availability Zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a GiVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String giversionname, + private PagedResponse listByLocationSinglePage(String location, SystemShapes shape, String zone, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (giversionname == null) { - return Mono.error(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, giversionname, accept, context); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, shape, zone, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a GiVersion. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param giversionname GiVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion on successful completion of {@link Mono}. + * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String giversionname) { - return getWithResponseAsync(location, giversionname).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + final SystemShapes shape = null; + final String zone = null; + return new PagedIterable<>(() -> listByLocationSinglePage(location, shape, zone), + nextLink -> listByLocationNextSinglePage(nextLink)); } /** - * Get a GiVersion. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param giversionname GiVersion name. + * @param shape If provided, filters the results for the given shape. + * @param zone Filters the result for the given Azure Availability Zone. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String giversionname, Context context) { - return getWithResponseAsync(location, giversionname, context).block(); - } - - /** - * Get a GiVersion. - * - * @param location The name of the Azure region. - * @param giversionname GiVersion name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion. + * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GiVersionInner get(String location, String giversionname) { - return getWithResponse(location, giversionname, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, SystemShapes shape, String zone, + Context context) { + return new PagedIterable<>(() -> listByLocationSinglePage(location, shape, zone, context), + nextLink -> listByLocationNextSinglePage(nextLink, context)); } /** @@ -353,6 +418,33 @@ private Mono> listByLocationNextSinglePageAsync(St .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiVersion list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByLocationNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -361,22 +453,25 @@ private Mono> listByLocationNextSinglePageAsync(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 response of a GiVersion list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a GiVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listByLocationNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(GiVersionsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsImpl.java index e0c1077fd23a..6b1f5eb74dd4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.oracledatabase.fluent.models.GiVersionInner; import com.azure.resourcemanager.oracledatabase.models.GiVersion; import com.azure.resourcemanager.oracledatabase.models.GiVersions; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; public final class GiVersionsImpl implements GiVersions { private static final ClientLogger LOGGER = new ClientLogger(GiVersionsImpl.class); @@ -27,16 +28,6 @@ public GiVersionsImpl(GiVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new GiVersionImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new GiVersionImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String giversionname, Context context) { Response inner = this.serviceClient().getWithResponse(location, giversionname, context); if (inner != null) { @@ -56,6 +47,16 @@ public GiVersion get(String location, String giversionname) { } } + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GiVersionImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, SystemShapes shape, String zone, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, shape, zone, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GiVersionImpl(inner1, this.manager())); + } + private GiVersionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationImpl.java index 12c5060a6428..6f690907bc2f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationsClientImpl.java index b8113a106401..237dc29156c6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.OperationsClient; import com.azure.resourcemanager.oracledatabase.fluent.models.OperationInner; -import com.azure.resourcemanager.oracledatabase.models.OperationListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -42,31 +43,38 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(OracleDatabaseResourceManagerImpl client) { + OperationsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerOperations to be used by the proxy + * The interface defining all the services for OracleDatabaseManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Oracle.Database/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Oracle.Database/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +82,14 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -103,24 +118,14 @@ private Mono> listSinglePageAsync() { /** * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -128,12 +133,20 @@ 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 REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -143,13 +156,20 @@ 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 REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -162,7 +182,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -177,7 +197,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -206,6 +226,33 @@ private Mono> listNextSinglePageAsync(String nextL .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -214,22 +261,24 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationsImpl.java index 85d9fb9e0442..d237bd4fe6cb 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseResourceManagerBuilder.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseManagementClientBuilder.java similarity index 66% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseResourceManagerBuilder.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseManagementClientBuilder.java index b45b3cefa749..2833d50916ef 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseResourceManagerBuilder.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the OracleDatabaseResourceManagerImpl type. + * A builder for creating a new instance of the OracleDatabaseManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { OracleDatabaseResourceManagerImpl.class }) -public final class OracleDatabaseResourceManagerBuilder { +@ServiceClientBuilder(serviceClients = { OracleDatabaseManagementClientImpl.class }) +public final class OracleDatabaseManagementClientBuilder { /* - * The ID of the target subscription. The value must be an UUID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the OracleDatabaseResourceManagerBuilder. + * @param endpoint the endpoint value. + * @return the OracleDatabaseManagementClientBuilder. */ - public OracleDatabaseResourceManagerBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public OracleDatabaseManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the OracleDatabaseResourceManagerBuilder. + * @param subscriptionId the subscriptionId value. + * @return the OracleDatabaseManagementClientBuilder. */ - public OracleDatabaseResourceManagerBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public OracleDatabaseManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public OracleDatabaseResourceManagerBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the OracleDatabaseResourceManagerBuilder. + * @return the OracleDatabaseManagementClientBuilder. */ - public OracleDatabaseResourceManagerBuilder environment(AzureEnvironment environment) { + public OracleDatabaseManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public OracleDatabaseResourceManagerBuilder environment(AzureEnvironment environ * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the OracleDatabaseResourceManagerBuilder. + * @return the OracleDatabaseManagementClientBuilder. */ - public OracleDatabaseResourceManagerBuilder pipeline(HttpPipeline pipeline) { + public OracleDatabaseManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public OracleDatabaseResourceManagerBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the OracleDatabaseResourceManagerBuilder. + * @return the OracleDatabaseManagementClientBuilder. */ - public OracleDatabaseResourceManagerBuilder defaultPollInterval(Duration defaultPollInterval) { + public OracleDatabaseManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public OracleDatabaseResourceManagerBuilder defaultPollInterval(Duration default * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the OracleDatabaseResourceManagerBuilder. + * @return the OracleDatabaseManagementClientBuilder. */ - public OracleDatabaseResourceManagerBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public OracleDatabaseManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of OracleDatabaseResourceManagerImpl with the provided parameters. + * Builds an instance of OracleDatabaseManagementClientImpl with the provided parameters. * - * @return an instance of OracleDatabaseResourceManagerImpl. + * @return an instance of OracleDatabaseManagementClientImpl. */ - public OracleDatabaseResourceManagerImpl buildClient() { + public OracleDatabaseManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,8 +131,8 @@ public OracleDatabaseResourceManagerImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - OracleDatabaseResourceManagerImpl client = new OracleDatabaseResourceManagerImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + OracleDatabaseManagementClientImpl client = new OracleDatabaseManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseResourceManagerImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseManagementClientImpl.java similarity index 80% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseResourceManagerImpl.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseManagementClientImpl.java index 996a112cf085..ac8d7fd42caa 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseResourceManagerImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleDatabaseManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -13,21 +13,24 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; 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; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient; import com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient; import com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient; -import com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient; import com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient; +import com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient; import com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient; import com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient; import com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient; @@ -35,9 +38,14 @@ import com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient; import com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient; import com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient; +import com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient; +import com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient; +import com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient; +import com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient; +import com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient; import com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient; import com.azure.resourcemanager.oracledatabase.fluent.OperationsClient; -import com.azure.resourcemanager.oracledatabase.fluent.OracleDatabaseResourceManager; +import com.azure.resourcemanager.oracledatabase.fluent.OracleDatabaseManagementClient; import com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient; import com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient; import com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient; @@ -51,31 +59,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the OracleDatabaseResourceManagerImpl type. + * Initializes a new instance of the OracleDatabaseManagementClientImpl type. */ -@ServiceClient(builder = OracleDatabaseResourceManagerBuilder.class) -public final class OracleDatabaseResourceManagerImpl implements OracleDatabaseResourceManager { - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - +@ServiceClient(builder = OracleDatabaseManagementClientBuilder.class) +public final class OracleDatabaseManagementClientImpl implements OracleDatabaseManagementClient { /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -84,12 +78,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -97,6 +91,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -154,31 +162,31 @@ public OperationsClient getOperations() { } /** - * The AutonomousDatabasesClient object to access its operations. + * The CloudExadataInfrastructuresClient object to access its operations. */ - private final AutonomousDatabasesClient autonomousDatabases; + private final CloudExadataInfrastructuresClient cloudExadataInfrastructures; /** - * Gets the AutonomousDatabasesClient object to access its operations. + * Gets the CloudExadataInfrastructuresClient object to access its operations. * - * @return the AutonomousDatabasesClient object. + * @return the CloudExadataInfrastructuresClient object. */ - public AutonomousDatabasesClient getAutonomousDatabases() { - return this.autonomousDatabases; + public CloudExadataInfrastructuresClient getCloudExadataInfrastructures() { + return this.cloudExadataInfrastructures; } /** - * The CloudExadataInfrastructuresClient object to access its operations. + * The DbServersClient object to access its operations. */ - private final CloudExadataInfrastructuresClient cloudExadataInfrastructures; + private final DbServersClient dbServers; /** - * Gets the CloudExadataInfrastructuresClient object to access its operations. + * Gets the DbServersClient object to access its operations. * - * @return the CloudExadataInfrastructuresClient object. + * @return the DbServersClient object. */ - public CloudExadataInfrastructuresClient getCloudExadataInfrastructures() { - return this.cloudExadataInfrastructures; + public DbServersClient getDbServers() { + return this.dbServers; } /** @@ -196,45 +204,87 @@ public CloudVmClustersClient getCloudVmClusters() { } /** - * The AutonomousDatabaseCharacterSetsClient object to access its operations. + * The VirtualNetworkAddressesClient object to access its operations. */ - private final AutonomousDatabaseCharacterSetsClient autonomousDatabaseCharacterSets; + private final VirtualNetworkAddressesClient virtualNetworkAddresses; /** - * Gets the AutonomousDatabaseCharacterSetsClient object to access its operations. + * Gets the VirtualNetworkAddressesClient object to access its operations. * - * @return the AutonomousDatabaseCharacterSetsClient object. + * @return the VirtualNetworkAddressesClient object. */ - public AutonomousDatabaseCharacterSetsClient getAutonomousDatabaseCharacterSets() { - return this.autonomousDatabaseCharacterSets; + public VirtualNetworkAddressesClient getVirtualNetworkAddresses() { + return this.virtualNetworkAddresses; } /** - * The AutonomousDatabaseNationalCharacterSetsClient object to access its operations. + * The SystemVersionsClient object to access its operations. */ - private final AutonomousDatabaseNationalCharacterSetsClient autonomousDatabaseNationalCharacterSets; + private final SystemVersionsClient systemVersions; /** - * Gets the AutonomousDatabaseNationalCharacterSetsClient object to access its operations. + * Gets the SystemVersionsClient object to access its operations. * - * @return the AutonomousDatabaseNationalCharacterSetsClient object. + * @return the SystemVersionsClient object. */ - public AutonomousDatabaseNationalCharacterSetsClient getAutonomousDatabaseNationalCharacterSets() { - return this.autonomousDatabaseNationalCharacterSets; + public SystemVersionsClient getSystemVersions() { + return this.systemVersions; } /** - * The AutonomousDatabaseVersionsClient object to access its operations. + * The OracleSubscriptionsClient object to access its operations. */ - private final AutonomousDatabaseVersionsClient autonomousDatabaseVersions; + private final OracleSubscriptionsClient oracleSubscriptions; /** - * Gets the AutonomousDatabaseVersionsClient object to access its operations. + * Gets the OracleSubscriptionsClient object to access its operations. * - * @return the AutonomousDatabaseVersionsClient object. + * @return the OracleSubscriptionsClient object. */ - public AutonomousDatabaseVersionsClient getAutonomousDatabaseVersions() { - return this.autonomousDatabaseVersions; + public OracleSubscriptionsClient getOracleSubscriptions() { + return this.oracleSubscriptions; + } + + /** + * The DbNodesClient object to access its operations. + */ + private final DbNodesClient dbNodes; + + /** + * Gets the DbNodesClient object to access its operations. + * + * @return the DbNodesClient object. + */ + public DbNodesClient getDbNodes() { + return this.dbNodes; + } + + /** + * The GiVersionsClient object to access its operations. + */ + private final GiVersionsClient giVersions; + + /** + * Gets the GiVersionsClient object to access its operations. + * + * @return the GiVersionsClient object. + */ + public GiVersionsClient getGiVersions() { + return this.giVersions; + } + + /** + * The GiMinorVersionsClient object to access its operations. + */ + private final GiMinorVersionsClient giMinorVersions; + + /** + * Gets the GiMinorVersionsClient object to access its operations. + * + * @return the GiMinorVersionsClient object. + */ + public GiMinorVersionsClient getGiMinorVersions() { + return this.giMinorVersions; } /** @@ -280,138 +330,171 @@ public DnsPrivateZonesClient getDnsPrivateZones() { } /** - * The GiVersionsClient object to access its operations. + * The FlexComponentsClient object to access its operations. */ - private final GiVersionsClient giVersions; + private final FlexComponentsClient flexComponents; /** - * Gets the GiVersionsClient object to access its operations. + * Gets the FlexComponentsClient object to access its operations. * - * @return the GiVersionsClient object. + * @return the FlexComponentsClient object. */ - public GiVersionsClient getGiVersions() { - return this.giVersions; + public FlexComponentsClient getFlexComponents() { + return this.flexComponents; } /** - * The SystemVersionsClient object to access its operations. + * The AutonomousDatabasesClient object to access its operations. */ - private final SystemVersionsClient systemVersions; + private final AutonomousDatabasesClient autonomousDatabases; /** - * Gets the SystemVersionsClient object to access its operations. + * Gets the AutonomousDatabasesClient object to access its operations. * - * @return the SystemVersionsClient object. + * @return the AutonomousDatabasesClient object. */ - public SystemVersionsClient getSystemVersions() { - return this.systemVersions; + public AutonomousDatabasesClient getAutonomousDatabases() { + return this.autonomousDatabases; } /** - * The OracleSubscriptionsClient object to access its operations. + * The AutonomousDatabaseBackupsClient object to access its operations. */ - private final OracleSubscriptionsClient oracleSubscriptions; + private final AutonomousDatabaseBackupsClient autonomousDatabaseBackups; /** - * Gets the OracleSubscriptionsClient object to access its operations. + * Gets the AutonomousDatabaseBackupsClient object to access its operations. * - * @return the OracleSubscriptionsClient object. + * @return the AutonomousDatabaseBackupsClient object. */ - public OracleSubscriptionsClient getOracleSubscriptions() { - return this.oracleSubscriptions; + public AutonomousDatabaseBackupsClient getAutonomousDatabaseBackups() { + return this.autonomousDatabaseBackups; } /** - * The AutonomousDatabaseBackupsClient object to access its operations. + * The AutonomousDatabaseCharacterSetsClient object to access its operations. */ - private final AutonomousDatabaseBackupsClient autonomousDatabaseBackups; + private final AutonomousDatabaseCharacterSetsClient autonomousDatabaseCharacterSets; /** - * Gets the AutonomousDatabaseBackupsClient object to access its operations. + * Gets the AutonomousDatabaseCharacterSetsClient object to access its operations. * - * @return the AutonomousDatabaseBackupsClient object. + * @return the AutonomousDatabaseCharacterSetsClient object. */ - public AutonomousDatabaseBackupsClient getAutonomousDatabaseBackups() { - return this.autonomousDatabaseBackups; + public AutonomousDatabaseCharacterSetsClient getAutonomousDatabaseCharacterSets() { + return this.autonomousDatabaseCharacterSets; } /** - * The DbServersClient object to access its operations. + * The AutonomousDatabaseNationalCharacterSetsClient object to access its operations. */ - private final DbServersClient dbServers; + private final AutonomousDatabaseNationalCharacterSetsClient autonomousDatabaseNationalCharacterSets; /** - * Gets the DbServersClient object to access its operations. + * Gets the AutonomousDatabaseNationalCharacterSetsClient object to access its operations. * - * @return the DbServersClient object. + * @return the AutonomousDatabaseNationalCharacterSetsClient object. */ - public DbServersClient getDbServers() { - return this.dbServers; + public AutonomousDatabaseNationalCharacterSetsClient getAutonomousDatabaseNationalCharacterSets() { + return this.autonomousDatabaseNationalCharacterSets; } /** - * The DbNodesClient object to access its operations. + * The AutonomousDatabaseVersionsClient object to access its operations. */ - private final DbNodesClient dbNodes; + private final AutonomousDatabaseVersionsClient autonomousDatabaseVersions; /** - * Gets the DbNodesClient object to access its operations. + * Gets the AutonomousDatabaseVersionsClient object to access its operations. * - * @return the DbNodesClient object. + * @return the AutonomousDatabaseVersionsClient object. */ - public DbNodesClient getDbNodes() { - return this.dbNodes; + public AutonomousDatabaseVersionsClient getAutonomousDatabaseVersions() { + return this.autonomousDatabaseVersions; } /** - * The VirtualNetworkAddressesClient object to access its operations. + * The ExadbVmClustersClient object to access its operations. */ - private final VirtualNetworkAddressesClient virtualNetworkAddresses; + private final ExadbVmClustersClient exadbVmClusters; /** - * Gets the VirtualNetworkAddressesClient object to access its operations. + * Gets the ExadbVmClustersClient object to access its operations. * - * @return the VirtualNetworkAddressesClient object. + * @return the ExadbVmClustersClient object. */ - public VirtualNetworkAddressesClient getVirtualNetworkAddresses() { - return this.virtualNetworkAddresses; + public ExadbVmClustersClient getExadbVmClusters() { + return this.exadbVmClusters; } /** - * Initializes an instance of OracleDatabaseResourceManager client. + * The ExascaleDbNodesClient object to access its operations. + */ + private final ExascaleDbNodesClient exascaleDbNodes; + + /** + * Gets the ExascaleDbNodesClient object to access its operations. + * + * @return the ExascaleDbNodesClient object. + */ + public ExascaleDbNodesClient getExascaleDbNodes() { + return this.exascaleDbNodes; + } + + /** + * The ExascaleDbStorageVaultsClient object to access its operations. + */ + private final ExascaleDbStorageVaultsClient exascaleDbStorageVaults; + + /** + * Gets the ExascaleDbStorageVaultsClient object to access its operations. + * + * @return the ExascaleDbStorageVaultsClient object. + */ + public ExascaleDbStorageVaultsClient getExascaleDbStorageVaults() { + return this.exascaleDbStorageVaults; + } + + /** + * Initializes an instance of OracleDatabaseManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. + * @param endpoint Service host. * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. */ - OracleDatabaseResourceManagerImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + OracleDatabaseManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-09-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-03-01"; this.operations = new OperationsClientImpl(this); - this.autonomousDatabases = new AutonomousDatabasesClientImpl(this); this.cloudExadataInfrastructures = new CloudExadataInfrastructuresClientImpl(this); + this.dbServers = new DbServersClientImpl(this); this.cloudVmClusters = new CloudVmClustersClientImpl(this); - this.autonomousDatabaseCharacterSets = new AutonomousDatabaseCharacterSetsClientImpl(this); - this.autonomousDatabaseNationalCharacterSets = new AutonomousDatabaseNationalCharacterSetsClientImpl(this); - this.autonomousDatabaseVersions = new AutonomousDatabaseVersionsClientImpl(this); + this.virtualNetworkAddresses = new VirtualNetworkAddressesClientImpl(this); + this.systemVersions = new SystemVersionsClientImpl(this); + this.oracleSubscriptions = new OracleSubscriptionsClientImpl(this); + this.dbNodes = new DbNodesClientImpl(this); + this.giVersions = new GiVersionsClientImpl(this); + this.giMinorVersions = new GiMinorVersionsClientImpl(this); this.dbSystemShapes = new DbSystemShapesClientImpl(this); this.dnsPrivateViews = new DnsPrivateViewsClientImpl(this); this.dnsPrivateZones = new DnsPrivateZonesClientImpl(this); - this.giVersions = new GiVersionsClientImpl(this); - this.systemVersions = new SystemVersionsClientImpl(this); - this.oracleSubscriptions = new OracleSubscriptionsClientImpl(this); + this.flexComponents = new FlexComponentsClientImpl(this); + this.autonomousDatabases = new AutonomousDatabasesClientImpl(this); this.autonomousDatabaseBackups = new AutonomousDatabaseBackupsClientImpl(this); - this.dbServers = new DbServersClientImpl(this); - this.dbNodes = new DbNodesClientImpl(this); - this.virtualNetworkAddresses = new VirtualNetworkAddressesClientImpl(this); + this.autonomousDatabaseCharacterSets = new AutonomousDatabaseCharacterSetsClientImpl(this); + this.autonomousDatabaseNationalCharacterSets = new AutonomousDatabaseNationalCharacterSetsClientImpl(this); + this.autonomousDatabaseVersions = new AutonomousDatabaseVersionsClientImpl(this); + this.exadbVmClusters = new ExadbVmClustersClientImpl(this); + this.exascaleDbNodes = new ExascaleDbNodesClientImpl(this); + this.exascaleDbStorageVaults = new ExascaleDbStorageVaultsClientImpl(this); } /** @@ -451,6 +534,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -540,5 +640,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(OracleDatabaseResourceManagerImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OracleDatabaseManagementClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionImpl.java index fc7d7af53482..52b7bbd1a4e9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionsClientImpl.java index 60475db20a66..b2cd3006de8a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -29,8 +29,10 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; 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.oracledatabase.fluent.OracleSubscriptionsClient; @@ -38,7 +40,8 @@ import com.azure.resourcemanager.oracledatabase.fluent.models.CloudAccountDetailsInner; import com.azure.resourcemanager.oracledatabase.fluent.models.OracleSubscriptionInner; import com.azure.resourcemanager.oracledatabase.fluent.models.SaasSubscriptionDetailsInner; -import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.OracleSubscriptionListResult; +import com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions; import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -56,73 +59,111 @@ public final class OracleSubscriptionsClientImpl implements OracleSubscriptionsC /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of OracleSubscriptionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OracleSubscriptionsClientImpl(OracleDatabaseResourceManagerImpl client) { + OracleSubscriptionsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(OracleSubscriptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerOracleSubscriptions to be used by the + * The interface defining all the services for OracleDatabaseManagementClientOracleSubscriptions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface OracleSubscriptionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OracleSubscriptionInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") OracleSubscriptionInner resource, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OracleSubscriptionInner resource, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Patch("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OracleSubscriptionUpdate properties, Context context); + @Patch("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") OracleSubscriptionUpdate properties, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OracleSubscriptionUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks") + @Delete("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listActivationLinks(@HostParam("$host") String endpoint, + Mono>> listCloudAccountDetails(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -130,7 +171,15 @@ Mono>> listActivationLinks(@HostParam("$host") String @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listCloudAccountDetails(@HostParam("$host") String endpoint, + Response listCloudAccountDetailsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> listSaasSubscriptionDetails(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -138,16 +187,56 @@ Mono>> listCloudAccountDetails(@HostParam("$host") Str @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> listSaasSubscriptionDetails(@HostParam("$host") String endpoint, + Response listSaasSubscriptionDetailsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> listActivationLinks(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listActivationLinksSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> addAzureSubscriptions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AzureSubscriptions body, Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response addAzureSubscriptionsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") AzureSubscriptions body, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -178,35 +267,6 @@ private Mono> listSinglePageAsync() { .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * List OracleSubscription resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OracleSubscription list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** * List OracleSubscription resources by subscription ID. * @@ -223,129 +283,82 @@ private PagedFlux listAsync() { /** * List OracleSubscription resources by subscription ID. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OracleSubscription list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List OracleSubscription resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OracleSubscription list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List OracleSubscription resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OracleSubscription list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get a OracleSubscription. - * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a OracleSubscription list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync() { + private PagedResponse listSinglePage() { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a OracleSubscription. + * List OracleSubscription resources by subscription ID. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a OracleSubscription list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(Context context) { + private PagedResponse listSinglePage(Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - accept, context); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a OracleSubscription. + * List OracleSubscription resources by subscription ID. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription on successful completion of {@link Mono}. + * @return the response of a OracleSubscription list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync() { - return getWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Get a OracleSubscription. + * List OracleSubscription resources by subscription ID. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(Context context) { - return getWithResponseAsync(context).block(); - } - - /** - * Get a OracleSubscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription. + * @return the response of a OracleSubscription list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OracleSubscriptionInner get() { - return getWithResponse(Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -373,10 +386,11 @@ private Mono>> createOrUpdateWithResponseAsync(OracleS } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resource, accept, context)) + this.client.getSubscriptionId(), contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -384,58 +398,73 @@ private Mono>> createOrUpdateWithResponseAsync(OracleS * Create a OracleSubscription. * * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oracleSubscription resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return oracleSubscription resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(OracleSubscriptionInner resource, - Context context) { + private Response createOrUpdateWithResponse(OracleSubscriptionInner resource) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resource, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, resource, Context.NONE); } /** * Create a OracleSubscription. * * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of oracleSubscription resource definition. + * @return oracleSubscription resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OracleSubscriptionInner> - beginCreateOrUpdateAsync(OracleSubscriptionInner resource) { - Mono>> mono = createOrUpdateWithResponseAsync(resource); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(OracleSubscriptionInner resource, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resource == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, resource, context); } /** * Create a OracleSubscription. * * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -443,11 +472,11 @@ private Mono>> createOrUpdateWithResponseAsync(OracleS */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OracleSubscriptionInner> - beginCreateOrUpdateAsync(OracleSubscriptionInner resource, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resource, context); + beginCreateOrUpdateAsync(OracleSubscriptionInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resource); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, context); + this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, + this.client.getContext()); } /** @@ -462,7 +491,9 @@ private Mono>> createOrUpdateWithResponseAsync(OracleS @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OracleSubscriptionInner> beginCreateOrUpdate(OracleSubscriptionInner resource) { - return this.beginCreateOrUpdateAsync(resource).getSyncPoller(); + Response response = createOrUpdateWithResponse(resource); + return this.client.getLroResult(response, + OracleSubscriptionInner.class, OracleSubscriptionInner.class, Context.NONE); } /** @@ -478,7 +509,9 @@ private Mono>> createOrUpdateWithResponseAsync(OracleS @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OracleSubscriptionInner> beginCreateOrUpdate(OracleSubscriptionInner resource, Context context) { - return this.beginCreateOrUpdateAsync(resource, context).getSyncPoller(); + Response response = createOrUpdateWithResponse(resource, context); + return this.client.getLroResult(response, + OracleSubscriptionInner.class, OracleSubscriptionInner.class, context); } /** @@ -495,21 +528,6 @@ private Mono createOrUpdateAsync(OracleSubscriptionInne return beginCreateOrUpdateAsync(resource).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Create a OracleSubscription. - * - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oracleSubscription resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(OracleSubscriptionInner resource, Context context) { - return beginCreateOrUpdateAsync(resource, context).last().flatMap(this.client::getLroFinalResultOrError); - } - /** * Create a OracleSubscription. * @@ -521,7 +539,7 @@ private Mono createOrUpdateAsync(OracleSubscriptionInne */ @ServiceMethod(returns = ReturnType.SINGLE) public OracleSubscriptionInner createOrUpdate(OracleSubscriptionInner resource) { - return createOrUpdateAsync(resource).block(); + return beginCreateOrUpdate(resource).getFinalResult(); } /** @@ -536,21 +554,18 @@ public OracleSubscriptionInner createOrUpdate(OracleSubscriptionInner resource) */ @ServiceMethod(returns = ReturnType.SINGLE) public OracleSubscriptionInner createOrUpdate(OracleSubscriptionInner resource, Context context) { - return createOrUpdateAsync(resource, context).block(); + return beginCreateOrUpdate(resource, context).getFinalResult(); } /** - * Update a OracleSubscription. + * Get a OracleSubscription. * - * @param properties The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oracleSubscription resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a OracleSubscription along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(OracleSubscriptionUpdate properties) { + private Mono> getWithResponseAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -559,35 +574,78 @@ private Mono>> updateWithResponseAsync(OracleSubscript return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), properties, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a OracleSubscription. + * Get a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync() { + return getWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a OracleSubscription. * - * @param properties The resource properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oracleSubscription resource definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a OracleSubscription along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(OracleSubscriptionUpdate properties, - Context context) { + public Response getWithResponse(Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + accept, context); + } + + /** + * Get a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OracleSubscriptionInner get() { + return getWithResponse(Context.NONE).getValue(); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(OracleSubscriptionUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( @@ -598,10 +656,12 @@ private Mono>> updateWithResponseAsync(OracleSubscript } else { properties.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - properties, accept, context); + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -611,15 +671,30 @@ private Mono>> updateWithResponseAsync(OracleSubscript * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of oracleSubscription resource definition. + * @return oracleSubscription resource definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OracleSubscriptionInner> - beginUpdateAsync(OracleSubscriptionUpdate properties) { - Mono>> mono = updateWithResponseAsync(properties); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(OracleSubscriptionUpdate properties) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, properties, Context.NONE); } /** @@ -630,15 +705,48 @@ private Mono>> updateWithResponseAsync(OracleSubscript * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(OracleSubscriptionUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (properties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, properties, context); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of oracleSubscription resource definition. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OracleSubscriptionInner> - beginUpdateAsync(OracleSubscriptionUpdate properties, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(properties, context); + beginUpdateAsync(OracleSubscriptionUpdate properties) { + Mono>> mono = updateWithResponseAsync(properties); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, context); + this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, + this.client.getContext()); } /** @@ -653,7 +761,9 @@ private Mono>> updateWithResponseAsync(OracleSubscript @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OracleSubscriptionInner> beginUpdate(OracleSubscriptionUpdate properties) { - return this.beginUpdateAsync(properties).getSyncPoller(); + Response response = updateWithResponse(properties); + return this.client.getLroResult(response, + OracleSubscriptionInner.class, OracleSubscriptionInner.class, Context.NONE); } /** @@ -669,7 +779,9 @@ private Mono>> updateWithResponseAsync(OracleSubscript @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OracleSubscriptionInner> beginUpdate(OracleSubscriptionUpdate properties, Context context) { - return this.beginUpdateAsync(properties, context).getSyncPoller(); + Response response = updateWithResponse(properties, context); + return this.client.getLroResult(response, + OracleSubscriptionInner.class, OracleSubscriptionInner.class, context); } /** @@ -686,21 +798,6 @@ private Mono updateAsync(OracleSubscriptionUpdate prope return beginUpdateAsync(properties).last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Update a OracleSubscription. - * - * @param properties The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oracleSubscription resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(OracleSubscriptionUpdate properties, Context context) { - return beginUpdateAsync(properties, context).last().flatMap(this.client::getLroFinalResultOrError); - } - /** * Update a OracleSubscription. * @@ -712,7 +809,7 @@ private Mono updateAsync(OracleSubscriptionUpdate prope */ @ServiceMethod(returns = ReturnType.SINGLE) public OracleSubscriptionInner update(OracleSubscriptionUpdate properties) { - return updateAsync(properties).block(); + return beginUpdate(properties).getFinalResult(); } /** @@ -727,7 +824,7 @@ public OracleSubscriptionInner update(OracleSubscriptionUpdate properties) { */ @ServiceMethod(returns = ReturnType.SINGLE) public OracleSubscriptionInner update(OracleSubscriptionUpdate properties, Context context) { - return updateAsync(properties, context).block(); + return beginUpdate(properties, context).getFinalResult(); } /** @@ -757,57 +854,65 @@ private Mono>> deleteWithResponseAsync() { /** * Delete a OracleSubscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(Context context) { + private Response deleteWithResponse() { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); } /** * Delete a OracleSubscription. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync() { - Mono>> mono = deleteWithResponseAsync(); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** * Delete a OracleSubscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(context); + private PollerFlux, Void> beginDeleteAsync() { + Mono>> mono = deleteWithResponseAsync(); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -819,7 +924,8 @@ private PollerFlux, Void> beginDeleteAsync(Context context) { */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete() { - return this.beginDeleteAsync().getSyncPoller(); + Response response = deleteWithResponse(); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -833,7 +939,8 @@ public SyncPoller, Void> beginDelete() { */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(Context context) { - return this.beginDeleteAsync(context).getSyncPoller(); + Response response = deleteWithResponse(context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -848,20 +955,6 @@ private Mono deleteAsync() { return beginDeleteAsync().last().flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a OracleSubscription. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(Context context) { - return beginDeleteAsync(context).last().flatMap(this.client::getLroFinalResultOrError); - } - /** * Delete a OracleSubscription. * @@ -870,7 +963,7 @@ private Mono deleteAsync(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete() { - deleteAsync().block(); + beginDelete().getFinalResult(); } /** @@ -883,18 +976,18 @@ public void delete() { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(Context context) { - deleteAsync(context).block(); + beginDelete(context).getFinalResult(); } /** - * List Activation Links. + * List Cloud Account Details. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model along with {@link Response} on successful completion of {@link Mono}. + * @return cloud Account Details model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listActivationLinksWithResponseAsync() { + private Mono>> listCloudAccountDetailsWithResponseAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -905,156 +998,155 @@ private Mono>> listActivationLinksWithResponseAsync() } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listActivationLinks(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listCloudAccountDetails(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Activation Links. + * List Cloud Account Details. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model along with {@link Response} on successful completion of {@link Mono}. + * @return cloud Account Details model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listActivationLinksWithResponseAsync(Context context) { + private Response listCloudAccountDetailsWithResponse() { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listActivationLinks(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.listCloudAccountDetailsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); } /** - * List Activation Links. + * List Cloud Account Details. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of activation Links model. + * @return cloud Account Details model along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ActivationLinksInner> beginListActivationLinksAsync() { - Mono>> mono = listActivationLinksWithResponseAsync(); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ActivationLinksInner.class, ActivationLinksInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response listCloudAccountDetailsWithResponse(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return service.listCloudAccountDetailsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** - * List Activation Links. + * List Cloud Account Details. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of activation Links model. + * @return the {@link PollerFlux} for polling of cloud Account Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ActivationLinksInner> - beginListActivationLinksAsync(Context context) { - context = this.client.mergeContext(context); - Mono>> mono = listActivationLinksWithResponseAsync(context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ActivationLinksInner.class, ActivationLinksInner.class, context); + private PollerFlux, CloudAccountDetailsInner> + beginListCloudAccountDetailsAsync() { + Mono>> mono = listCloudAccountDetailsWithResponseAsync(); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudAccountDetailsInner.class, CloudAccountDetailsInner.class, + this.client.getContext()); } /** - * List Activation Links. + * List Cloud Account Details. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of activation Links model. + * @return the {@link SyncPoller} for polling of cloud Account Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ActivationLinksInner> beginListActivationLinks() { - return this.beginListActivationLinksAsync().getSyncPoller(); + public SyncPoller, CloudAccountDetailsInner> beginListCloudAccountDetails() { + Response response = listCloudAccountDetailsWithResponse(); + return this.client.getLroResult(response, + CloudAccountDetailsInner.class, CloudAccountDetailsInner.class, Context.NONE); } /** - * List Activation Links. + * List Cloud Account Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of activation Links model. + * @return the {@link SyncPoller} for polling of cloud Account Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ActivationLinksInner> - beginListActivationLinks(Context context) { - return this.beginListActivationLinksAsync(context).getSyncPoller(); - } - - /** - * List Activation Links. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listActivationLinksAsync() { - return beginListActivationLinksAsync().last().flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, CloudAccountDetailsInner> + beginListCloudAccountDetails(Context context) { + Response response = listCloudAccountDetailsWithResponse(context); + return this.client.getLroResult(response, + CloudAccountDetailsInner.class, CloudAccountDetailsInner.class, context); } /** - * List Activation Links. + * List Cloud Account Details. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model on successful completion of {@link Mono}. + * @return cloud Account Details model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listActivationLinksAsync(Context context) { - return beginListActivationLinksAsync(context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono listCloudAccountDetailsAsync() { + return beginListCloudAccountDetailsAsync().last().flatMap(this.client::getLroFinalResultOrError); } /** - * List Activation Links. + * List Cloud Account Details. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model. + * @return cloud Account Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActivationLinksInner listActivationLinks() { - return listActivationLinksAsync().block(); + public CloudAccountDetailsInner listCloudAccountDetails() { + return beginListCloudAccountDetails().getFinalResult(); } /** - * List Activation Links. + * List Cloud Account Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model. + * @return cloud Account Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ActivationLinksInner listActivationLinks(Context context) { - return listActivationLinksAsync(context).block(); + public CloudAccountDetailsInner listCloudAccountDetails(Context context) { + return beginListCloudAccountDetails(context).getFinalResult(); } /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model along with {@link Response} on successful completion of {@link Mono}. + * @return saaS Subscription Details model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listCloudAccountDetailsWithResponseAsync() { + private Mono>> listSaasSubscriptionDetailsWithResponseAsync() { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1065,184 +1157,315 @@ private Mono>> listCloudAccountDetailsWithResponseAsyn } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listCloudAccountDetails(this.client.getEndpoint(), + .withContext(context -> service.listSaasSubscriptionDetails(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Cloud Account Details. + * List Saas Subscription Details. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model along with {@link Response} on successful completion of {@link Mono}. + * @return saaS Subscription Details model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listCloudAccountDetailsWithResponseAsync(Context context) { + private Response listSaasSubscriptionDetailsWithResponse() { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listCloudAccountDetails(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.listSaasSubscriptionDetailsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); } /** - * List Cloud Account Details. + * List Saas Subscription Details. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloud Account Details model. + * @return saaS Subscription Details model along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudAccountDetailsInner> - beginListCloudAccountDetailsAsync() { - Mono>> mono = listCloudAccountDetailsWithResponseAsync(); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), CloudAccountDetailsInner.class, CloudAccountDetailsInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response listSaasSubscriptionDetailsWithResponse(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return service.listSaasSubscriptionDetailsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** - * List Cloud Account Details. + * List Saas Subscription Details. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of cloud Account Details model. + * @return the {@link PollerFlux} for polling of saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudAccountDetailsInner> - beginListCloudAccountDetailsAsync(Context context) { - context = this.client.mergeContext(context); - Mono>> mono = listCloudAccountDetailsWithResponseAsync(context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), CloudAccountDetailsInner.class, CloudAccountDetailsInner.class, context); + private PollerFlux, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetailsAsync() { + Mono>> mono = listSaasSubscriptionDetailsWithResponseAsync(); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SaasSubscriptionDetailsInner.class, SaasSubscriptionDetailsInner.class, + this.client.getContext()); } /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloud Account Details model. + * @return the {@link SyncPoller} for polling of saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudAccountDetailsInner> beginListCloudAccountDetails() { - return this.beginListCloudAccountDetailsAsync().getSyncPoller(); + public SyncPoller, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetails() { + Response response = listSaasSubscriptionDetailsWithResponse(); + return this.client.getLroResult(response, + SaasSubscriptionDetailsInner.class, SaasSubscriptionDetailsInner.class, Context.NONE); } /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of cloud Account Details model. + * @return the {@link SyncPoller} for polling of saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudAccountDetailsInner> - beginListCloudAccountDetails(Context context) { - return this.beginListCloudAccountDetailsAsync(context).getSyncPoller(); + public SyncPoller, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetails(Context context) { + Response response = listSaasSubscriptionDetailsWithResponse(context); + return this.client.getLroResult(response, + SaasSubscriptionDetailsInner.class, SaasSubscriptionDetailsInner.class, context); } /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model on successful completion of {@link Mono}. + * @return saaS Subscription Details model on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listCloudAccountDetailsAsync() { - return beginListCloudAccountDetailsAsync().last().flatMap(this.client::getLroFinalResultOrError); + private Mono listSaasSubscriptionDetailsAsync() { + return beginListSaasSubscriptionDetailsAsync().last().flatMap(this.client::getLroFinalResultOrError); } /** - * List Cloud Account Details. + * List Saas Subscription Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaasSubscriptionDetailsInner listSaasSubscriptionDetails() { + return beginListSaasSubscriptionDetails().getFinalResult(); + } + + /** + * List Saas Subscription Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model on successful completion of {@link Mono}. + * @return saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listCloudAccountDetailsAsync(Context context) { - return beginListCloudAccountDetailsAsync(context).last().flatMap(this.client::getLroFinalResultOrError); + public SaasSubscriptionDetailsInner listSaasSubscriptionDetails(Context context) { + return beginListSaasSubscriptionDetails(context).getFinalResult(); } /** - * List Cloud Account Details. + * List Activation Links. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model. + * @return activation Links model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudAccountDetailsInner listCloudAccountDetails() { - return listCloudAccountDetailsAsync().block(); + private Mono>> listActivationLinksWithResponseAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listActivationLinks(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Cloud Account Details. + * List Activation Links. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model. + * @return activation Links model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudAccountDetailsInner listCloudAccountDetails(Context context) { - return listCloudAccountDetailsAsync(context).block(); + private Response listActivationLinksWithResponse() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return service.listActivationLinksSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); } /** - * List Saas Subscription Details. + * List Activation Links. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model along with {@link Response} on successful completion of {@link Mono}. + * @return activation Links model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listSaasSubscriptionDetailsWithResponseAsync() { + private Response listActivationLinksWithResponse(Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSaasSubscriptionDetails(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.listActivationLinksSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** - * List Saas Subscription Details. + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ActivationLinksInner> beginListActivationLinksAsync() { + Mono>> mono = listActivationLinksWithResponseAsync(); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ActivationLinksInner.class, ActivationLinksInner.class, this.client.getContext()); + } + + /** + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActivationLinksInner> beginListActivationLinks() { + Response response = listActivationLinksWithResponse(); + return this.client.getLroResult(response, + ActivationLinksInner.class, ActivationLinksInner.class, Context.NONE); + } + + /** + * List Activation Links. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActivationLinksInner> + beginListActivationLinks(Context context) { + Response response = listActivationLinksWithResponse(context); + return this.client.getLroResult(response, + ActivationLinksInner.class, ActivationLinksInner.class, context); + } + + /** + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listActivationLinksAsync() { + return beginListActivationLinksAsync().last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActivationLinksInner listActivationLinks() { + return beginListActivationLinks().getFinalResult(); + } + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> listSaasSubscriptionDetailsWithResponseAsync(Context context) { + public ActivationLinksInner listActivationLinks(Context context) { + return beginListActivationLinks(context).getFinalResult(); + } + + /** + * Add Azure Subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addAzureSubscriptionsWithResponseAsync(AzureSubscriptions body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1251,125 +1474,170 @@ private Mono>> listSaasSubscriptionDetailsWithResponse return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSaasSubscriptionDetails(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return FluxUtil + .withContext(context -> service.addAzureSubscriptions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Saas Subscription Details. + * Add Azure Subscriptions. * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of saaS Subscription Details model. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SaasSubscriptionDetailsInner> - beginListSaasSubscriptionDetailsAsync() { - Mono>> mono = listSaasSubscriptionDetailsWithResponseAsync(); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), SaasSubscriptionDetailsInner.class, SaasSubscriptionDetailsInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response addAzureSubscriptionsWithResponse(AzureSubscriptions body) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.addAzureSubscriptionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, body, Context.NONE); } /** - * List Saas Subscription Details. + * Add Azure Subscriptions. * + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of saaS Subscription Details model. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SaasSubscriptionDetailsInner> - beginListSaasSubscriptionDetailsAsync(Context context) { - context = this.client.mergeContext(context); - Mono>> mono = listSaasSubscriptionDetailsWithResponseAsync(context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), SaasSubscriptionDetailsInner.class, SaasSubscriptionDetailsInner.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response addAzureSubscriptionsWithResponse(AzureSubscriptions body, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (body == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.addAzureSubscriptionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, body, context); } /** - * List Saas Subscription Details. + * Add Azure Subscriptions. * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of saaS Subscription Details model. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SaasSubscriptionDetailsInner> - beginListSaasSubscriptionDetails() { - return this.beginListSaasSubscriptionDetailsAsync().getSyncPoller(); + private PollerFlux, Void> beginAddAzureSubscriptionsAsync(AzureSubscriptions body) { + Mono>> mono = addAzureSubscriptionsWithResponseAsync(body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * List Saas Subscription Details. + * Add Azure Subscriptions. * - * @param context The context to associate with this operation. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of saaS Subscription Details model. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SaasSubscriptionDetailsInner> - beginListSaasSubscriptionDetails(Context context) { - return this.beginListSaasSubscriptionDetailsAsync(context).getSyncPoller(); + public SyncPoller, Void> beginAddAzureSubscriptions(AzureSubscriptions body) { + Response response = addAzureSubscriptionsWithResponse(body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * List Saas Subscription Details. + * Add Azure Subscriptions. * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSaasSubscriptionDetailsAsync() { - return beginListSaasSubscriptionDetailsAsync().last().flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAddAzureSubscriptions(AzureSubscriptions body, Context context) { + Response response = addAzureSubscriptionsWithResponse(body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * List Saas Subscription Details. + * Add Azure Subscriptions. * - * @param context The context to associate with this operation. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSaasSubscriptionDetailsAsync(Context context) { - return beginListSaasSubscriptionDetailsAsync(context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono addAzureSubscriptionsAsync(AzureSubscriptions body) { + return beginAddAzureSubscriptionsAsync(body).last().flatMap(this.client::getLroFinalResultOrError); } /** - * List Saas Subscription Details. + * Add Azure Subscriptions. * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SaasSubscriptionDetailsInner listSaasSubscriptionDetails() { - return listSaasSubscriptionDetailsAsync().block(); + public void addAzureSubscriptions(AzureSubscriptions body) { + beginAddAzureSubscriptions(body).getFinalResult(); } /** - * List Saas Subscription Details. + * Add Azure Subscriptions. * + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SaasSubscriptionDetailsInner listSaasSubscriptionDetails(Context context) { - return listSaasSubscriptionDetailsAsync(context).block(); + public void addAzureSubscriptions(AzureSubscriptions body, Context context) { + beginAddAzureSubscriptions(body, context).getFinalResult(); } /** @@ -1400,6 +1668,33 @@ private Mono> listBySubscriptionNextSingl .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1408,23 +1703,25 @@ private Mono> listBySubscriptionNextSingl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a OracleSubscription list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a OracleSubscription list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(OracleSubscriptionsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionsImpl.java index a7d1afc4f147..8dff9bdefbea 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/OracleSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -15,10 +15,11 @@ import com.azure.resourcemanager.oracledatabase.fluent.models.OracleSubscriptionInner; import com.azure.resourcemanager.oracledatabase.fluent.models.SaasSubscriptionDetailsInner; import com.azure.resourcemanager.oracledatabase.models.ActivationLinks; +import com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions; import com.azure.resourcemanager.oracledatabase.models.CloudAccountDetails; import com.azure.resourcemanager.oracledatabase.models.OracleSubscription; -import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptions; import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; +import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptions; import com.azure.resourcemanager.oracledatabase.models.SaasSubscriptionDetails; public final class OracleSubscriptionsImpl implements OracleSubscriptions { @@ -44,18 +45,17 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new OracleSubscriptionImpl(inner1, this.manager())); } - public Response getWithResponse(Context context) { - Response inner = this.serviceClient().getWithResponse(context); + public OracleSubscription createOrUpdate(OracleSubscriptionInner resource) { + OracleSubscriptionInner inner = this.serviceClient().createOrUpdate(resource); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OracleSubscriptionImpl(inner.getValue(), this.manager())); + return new OracleSubscriptionImpl(inner, this.manager()); } else { return null; } } - public OracleSubscription get() { - OracleSubscriptionInner inner = this.serviceClient().get(); + public OracleSubscription createOrUpdate(OracleSubscriptionInner resource, Context context) { + OracleSubscriptionInner inner = this.serviceClient().createOrUpdate(resource, context); if (inner != null) { return new OracleSubscriptionImpl(inner, this.manager()); } else { @@ -63,17 +63,18 @@ public OracleSubscription get() { } } - public OracleSubscription createOrUpdate(OracleSubscriptionInner resource) { - OracleSubscriptionInner inner = this.serviceClient().createOrUpdate(resource); + public Response getWithResponse(Context context) { + Response inner = this.serviceClient().getWithResponse(context); if (inner != null) { - return new OracleSubscriptionImpl(inner, this.manager()); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OracleSubscriptionImpl(inner.getValue(), this.manager())); } else { return null; } } - public OracleSubscription createOrUpdate(OracleSubscriptionInner resource, Context context) { - OracleSubscriptionInner inner = this.serviceClient().createOrUpdate(resource, context); + public OracleSubscription get() { + OracleSubscriptionInner inner = this.serviceClient().get(); if (inner != null) { return new OracleSubscriptionImpl(inner, this.manager()); } else { @@ -107,24 +108,6 @@ public void delete(Context context) { this.serviceClient().delete(context); } - public ActivationLinks listActivationLinks() { - ActivationLinksInner inner = this.serviceClient().listActivationLinks(); - if (inner != null) { - return new ActivationLinksImpl(inner, this.manager()); - } else { - return null; - } - } - - public ActivationLinks listActivationLinks(Context context) { - ActivationLinksInner inner = this.serviceClient().listActivationLinks(context); - if (inner != null) { - return new ActivationLinksImpl(inner, this.manager()); - } else { - return null; - } - } - public CloudAccountDetails listCloudAccountDetails() { CloudAccountDetailsInner inner = this.serviceClient().listCloudAccountDetails(); if (inner != null) { @@ -161,6 +144,32 @@ public SaasSubscriptionDetails listSaasSubscriptionDetails(Context context) { } } + public ActivationLinks listActivationLinks() { + ActivationLinksInner inner = this.serviceClient().listActivationLinks(); + if (inner != null) { + return new ActivationLinksImpl(inner, this.manager()); + } else { + return null; + } + } + + public ActivationLinks listActivationLinks(Context context) { + ActivationLinksInner inner = this.serviceClient().listActivationLinks(context); + if (inner != null) { + return new ActivationLinksImpl(inner, this.manager()); + } else { + return null; + } + } + + public void addAzureSubscriptions(AzureSubscriptions body) { + this.serviceClient().addAzureSubscriptions(body); + } + + public void addAzureSubscriptions(AzureSubscriptions body, Context context) { + this.serviceClient().addAzureSubscriptions(body, context); + } + private OracleSubscriptionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/PrivateIpAddressPropertiesImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/PrivateIpAddressPropertiesImpl.java index f2c7d86f48b9..0fbf0c679423 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/PrivateIpAddressPropertiesImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/PrivateIpAddressPropertiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ResourceManagerUtils.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ResourceManagerUtils.java index 41c7cd4c5655..806f3764d640 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ResourceManagerUtils.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SaasSubscriptionDetailsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SaasSubscriptionDetailsImpl.java index 42e32dfbff56..4ca6ecfc5634 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SaasSubscriptionDetailsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SaasSubscriptionDetailsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionImpl.java index c2f5728da9c6..d7b47fe9296e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionsClientImpl.java index a22ea5599467..f86b45628232 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionsClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -25,9 +25,10 @@ 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.oracledatabase.fluent.SystemVersionsClient; import com.azure.resourcemanager.oracledatabase.fluent.models.SystemVersionInner; -import com.azure.resourcemanager.oracledatabase.models.SystemVersionListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.SystemVersionListResult; import reactor.core.publisher.Mono; /** @@ -42,64 +43,89 @@ public final class SystemVersionsClientImpl implements SystemVersionsClient { /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of SystemVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - SystemVersionsClientImpl(OracleDatabaseResourceManagerImpl client) { + SystemVersionsClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(SystemVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerSystemVersions to be used by the proxy + * The interface defining all the services for OracleDatabaseManagementClientSystemVersions to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface SystemVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions") + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @PathParam("location") String location, @PathParam("systemversionname") String systemversionname, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("systemversionname") String systemversionname, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByLocationNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List SystemVersion resources by Location. + * Get a SystemVersion. * * @param location The name of the Azure region. + * @param systemversionname SystemVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a SystemVersion along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + private Mono> getWithResponseAsync(String location, String systemversionname) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -111,221 +137,224 @@ private Mono> listByLocationSinglePageAsync(St if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (systemversionname == null) { + return Mono + .error(new IllegalArgumentException("Parameter systemversionname is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, systemversionname, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List SystemVersion resources by Location. + * Get a SystemVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param systemversionname SystemVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a SystemVersion on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String location, String systemversionname) { + return getWithResponseAsync(location, systemversionname).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List SystemVersion resources by Location. + * Get a SystemVersion. * * @param location The name of the Azure region. + * @param systemversionname SystemVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation as paginated response with {@link PagedFlux}. + * @return a SystemVersion along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), - nextLink -> listByLocationNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String systemversionname, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (systemversionname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter systemversionname is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, systemversionname, accept, context); } /** - * List SystemVersion resources by Location. + * Get a SystemVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param systemversionname SystemVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation as paginated response with {@link PagedFlux}. + * @return a SystemVersion. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public SystemVersionInner get(String location, String systemversionname) { + return getWithResponse(location, systemversionname, Context.NONE).getValue(); } /** - * List SystemVersion resources by Location. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. + * @return the response of a SystemVersion list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List SystemVersion resources by Location. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. + * @return the response of a SystemVersion list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** - * Get a SystemVersion. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a SystemVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String systemversionname) { + private PagedResponse listByLocationSinglePage(String location) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (systemversionname == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemversionname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, systemversionname, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a SystemVersion. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a SystemVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, String systemversionname, - Context context) { + private PagedResponse listByLocationSinglePage(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (systemversionname == null) { - return Mono - .error(new IllegalArgumentException("Parameter systemversionname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, systemversionname, accept, context); + Response res = service.listByLocationSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Get a SystemVersion. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion on successful completion of {@link Mono}. + * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location, String systemversionname) { - return getWithResponseAsync(location, systemversionname).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(() -> listByLocationSinglePage(location), + nextLink -> listByLocationNextSinglePage(nextLink)); } /** - * Get a SystemVersion. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String systemversionname, Context context) { - return getWithResponseAsync(location, systemversionname, context).block(); - } - - /** - * Get a SystemVersion. - * - * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion. + * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SystemVersionInner get(String location, String systemversionname) { - return getWithResponse(location, systemversionname, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(() -> listByLocationSinglePage(location, context), + nextLink -> listByLocationNextSinglePage(nextLink, context)); } /** @@ -355,6 +384,33 @@ private Mono> listByLocationNextSinglePageAsyn .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a SystemVersion list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByLocationNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -363,23 +419,25 @@ private Mono> listByLocationNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the response of a SystemVersion list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByLocationNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByLocationNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(SystemVersionsClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionsImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionsImpl.java index 9b04a96a9693..9275bfe12929 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionsImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/SystemVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,16 +27,6 @@ public SystemVersionsImpl(SystemVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemVersionImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemVersionImpl(inner1, this.manager())); - } - public Response getWithResponse(String location, String systemversionname, Context context) { Response inner = this.serviceClient().getWithResponse(location, systemversionname, context); if (inner != null) { @@ -56,6 +46,16 @@ public SystemVersion get(String location, String systemversionname) { } } + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemVersionImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SystemVersionImpl(inner1, this.manager())); + } + private SystemVersionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressImpl.java index 9b30a35ed221..133b4f6204fc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressesClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressesClientImpl.java index fab7014f689c..16b03b1495e0 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressesClientImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,13 +27,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; 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.oracledatabase.fluent.VirtualNetworkAddressesClient; import com.azure.resourcemanager.oracledatabase.fluent.models.VirtualNetworkAddressInner; -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressListResult; +import com.azure.resourcemanager.oracledatabase.implementation.models.VirtualNetworkAddressListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,41 +52,64 @@ public final class VirtualNetworkAddressesClientImpl implements VirtualNetworkAd /** * The service client containing this operation class. */ - private final OracleDatabaseResourceManagerImpl client; + private final OracleDatabaseManagementClientImpl client; /** * Initializes an instance of VirtualNetworkAddressesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualNetworkAddressesClientImpl(OracleDatabaseResourceManagerImpl client) { + VirtualNetworkAddressesClientImpl(OracleDatabaseManagementClientImpl client) { this.service = RestProxy.create(VirtualNetworkAddressesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for OracleDatabaseResourceManagerVirtualNetworkAddresses to be used by + * The interface defining all the services for OracleDatabaseManagementClientVirtualNetworkAddresses to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "OracleDatabaseResour") + @Host("{endpoint}") + @ServiceInterface(name = "OracleDatabaseManage") public interface VirtualNetworkAddressesService { + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, + @PathParam("virtualnetworkaddressname") String virtualnetworkaddressname, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkAddressInner resource, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, + @PathParam("virtualnetworkaddressname") String virtualnetworkaddressname, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") VirtualNetworkAddressInner resource, Context context); + @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudVmCluster(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, - Context context); + @PathParam("cloudvmclustername") String cloudvmclustername, + @PathParam("virtualnetworkaddressname") String virtualnetworkaddressname, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @@ -92,199 +117,80 @@ Mono> get(@HostParam("$host") String endpoi @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") - @ExpectedResponses({ 200, 201 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @PathParam("virtualnetworkaddressname") String virtualnetworkaddressname, - @BodyParam("application/json") VirtualNetworkAddressInner resource, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @PathParam("virtualnetworkaddressname") String virtualnetworkaddressname, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudVmCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByCloudVmClusterSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCloudVmClusterNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List VirtualNetworkAddress resources by CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByCloudVmClusterSinglePageAsync(String resourceGroupName, String cloudvmclustername) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List VirtualNetworkAddress resources by CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByCloudVmClusterSinglePageAsync(String resourceGroupName, String cloudvmclustername, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List VirtualNetworkAddress resources by CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, - String cloudvmclustername) { - return new PagedFlux<>(() -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername), - nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink)); - } - - /** - * List VirtualNetworkAddress resources by CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, - String cloudvmclustername, Context context) { - return new PagedFlux<>( - () -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername, context), - nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink, context)); - } - - /** - * List VirtualNetworkAddress resources by CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCloudVmCluster(String resourceGroupName, - String cloudvmclustername) { - return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername)); - } - /** - * List VirtualNetworkAddress resources by CloudVmCluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByCloudVmCluster(String resourceGroupName, - String cloudvmclustername, Context context) { - return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByCloudVmClusterNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Get a VirtualNetworkAddress. + * Create a VirtualNetworkAddress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress along with {@link Response} on successful completion of {@link Mono}. + * @return virtual IP resource belonging to a vm cluster resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String cloudvmclustername, String virtualnetworkaddressname) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -305,109 +211,20 @@ private Mono> getWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, - accept, context)) + contentType, accept, resource, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get a VirtualNetworkAddress. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String cloudvmclustername, String virtualnetworkaddressname, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); - } - if (virtualnetworkaddressname == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudvmclustername, virtualnetworkaddressname, accept, context); - } - - /** - * Get a VirtualNetworkAddress. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname) { - return getWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a VirtualNetworkAddress. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname, Context context) { - return getWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context).block(); - } - - /** - * Get a VirtualNetworkAddress. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkAddressInner get(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname) { - return getWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, Context.NONE) - .getValue(); - } - /** * Create a VirtualNetworkAddress. * @@ -418,43 +235,45 @@ public VirtualNetworkAddressInner get(String resourceGroupName, String cloudvmcl * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual IP resource belonging to a vm cluster resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return virtual IP resource belonging to a vm cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String cloudvmclustername, String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { + private Response createOrUpdateWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } if (virtualnetworkaddressname == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter virtualnetworkaddressname is required and cannot be null.")); } if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, - resource, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, + contentType, accept, resource, Context.NONE); } /** @@ -468,43 +287,45 @@ private Mono>> createOrUpdateWithResponseAsync(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 virtual IP resource belonging to a vm cluster resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return virtual IP resource belonging to a vm cluster resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String cloudvmclustername, String virtualnetworkaddressname, VirtualNetworkAddressInner resource, - Context context) { + private Response createOrUpdateWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } if (virtualnetworkaddressname == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter virtualnetworkaddressname is required and cannot be null.")); } if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resource is required and cannot be null.")); } else { resource.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource, - accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, + contentType, accept, resource, context); } /** @@ -537,21 +358,19 @@ private PollerFlux, VirtualNetworkAddress * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of virtual IP resource belonging to a vm cluster resource. + * @return the {@link SyncPoller} for polling of virtual IP resource belonging to a vm cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, VirtualNetworkAddressInner> beginCreateOrUpdateAsync( + public SyncPoller, VirtualNetworkAddressInner> beginCreateOrUpdate( String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, - VirtualNetworkAddressInner resource, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, cloudvmclustername, - virtualnetworkaddressname, resource, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), VirtualNetworkAddressInner.class, VirtualNetworkAddressInner.class, context); + VirtualNetworkAddressInner resource) { + Response response + = createOrUpdateWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource); + return this.client.getLroResult(response, + VirtualNetworkAddressInner.class, VirtualNetworkAddressInner.class, Context.NONE); } /** @@ -561,6 +380,7 @@ private PollerFlux, VirtualNetworkAddress * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -569,9 +389,11 @@ private PollerFlux, VirtualNetworkAddress @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, VirtualNetworkAddressInner> beginCreateOrUpdate( String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, - VirtualNetworkAddressInner resource) { - return this.beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource) - .getSyncPoller(); + VirtualNetworkAddressInner resource, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, cloudvmclustername, + virtualnetworkaddressname, resource, context); + return this.client.getLroResult(response, + VirtualNetworkAddressInner.class, VirtualNetworkAddressInner.class, context); } /** @@ -581,20 +403,17 @@ public SyncPoller, VirtualNetworkAddressI * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of virtual IP resource belonging to a vm cluster resource. + * @return virtual IP resource belonging to a vm cluster resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, VirtualNetworkAddressInner> beginCreateOrUpdate( - String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, - VirtualNetworkAddressInner resource, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource, - context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -607,72 +426,154 @@ public SyncPoller, VirtualNetworkAddressI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual IP resource belonging to a vm cluster resource on successful completion of {@link Mono}. + * @return virtual IP resource belonging to a vm cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, + public VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { - return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdate(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource) + .getFinalResult(); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource, Context context) { + return beginCreateOrUpdate(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource, context) + .getFinalResult(); + } + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String virtualnetworkaddressname) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a VirtualNetworkAddress. + * Get a VirtualNetworkAddress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual IP resource belonging to a vm cluster resource on successful completion of {@link Mono}. + * @return a VirtualNetworkAddress on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname, VirtualNetworkAddressInner resource, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource, - context).last().flatMap(this.client::getLroFinalResultOrError); + private Mono getAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { + return getWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create a VirtualNetworkAddress. + * Get a VirtualNetworkAddress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. - * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual IP resource belonging to a vm cluster resource. + * @return a VirtualNetworkAddress along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { - return createOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource).block(); + public Response getWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter virtualnetworkaddressname is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudvmclustername, virtualnetworkaddressname, accept, context); } /** - * Create a VirtualNetworkAddress. + * Get a VirtualNetworkAddress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. - * @param resource Resource create parameters. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return virtual IP resource belonging to a vm cluster resource. + * @return a VirtualNetworkAddress. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname, VirtualNetworkAddressInner resource, Context context) { - return createOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource, context) - .block(); + public VirtualNetworkAddressInner get(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { + return getWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, Context.NONE) + .getValue(); } /** @@ -723,39 +624,41 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, - String cloudvmclustername, String virtualnetworkaddressname, Context context) { + private Response deleteWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (cloudvmclustername == null) { - return Mono - .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); } if (virtualnetworkaddressname == null) { - return Mono.error( - new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter virtualnetworkaddressname is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, cloudvmclustername, virtualnetworkaddressname, accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, accept, + Context.NONE); } /** @@ -764,18 +667,42 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter virtualnetworkaddressname is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, accept, + context); } /** @@ -784,7 +711,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -792,12 +718,11 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname, Context context) { - context = this.client.mergeContext(context); + String virtualnetworkaddressname) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context); + = deleteWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -814,7 +739,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname) { - return this.beginDeleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -832,8 +759,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, Context context) { - return this.beginDeleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -860,17 +788,13 @@ private Mono deleteAsync(String resourceGroupName, String cloudvmclusterna * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname, Context context) { - return beginDeleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname) { + beginDelete(resourceGroupName, cloudvmclustername, virtualnetworkaddressname).getFinalResult(); } /** @@ -879,30 +803,185 @@ private Mono deleteAsync(String resourceGroupName, String cloudvmclusterna * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname) { - deleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname).block(); + public void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + Context context) { + beginDelete(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context).getFinalResult(); } /** - * Delete a VirtualNetworkAddress. + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByCloudVmClusterSinglePageAsync(String resourceGroupName, String cloudvmclustername) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, + String cloudvmclustername) { + return new PagedFlux<>(() -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername), + nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink)); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByCloudVmClusterSinglePage(String resourceGroupName, + String cloudvmclustername) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByCloudVmClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, - Context context) { - deleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context).block(); + private PagedResponse listByCloudVmClusterSinglePage(String resourceGroupName, + String cloudvmclustername, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByCloudVmClusterSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudVmCluster(String resourceGroupName, + String cloudvmclustername) { + return new PagedIterable<>(() -> listByCloudVmClusterSinglePage(resourceGroupName, cloudvmclustername), + nextLink -> listByCloudVmClusterNextSinglePage(nextLink)); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudVmCluster(String resourceGroupName, + String cloudvmclustername, Context context) { + return new PagedIterable<>(() -> listByCloudVmClusterSinglePage(resourceGroupName, cloudvmclustername, context), + nextLink -> listByCloudVmClusterNextSinglePage(nextLink, context)); } /** @@ -933,6 +1012,33 @@ private Mono> listByCloudVmClusterNext .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByCloudVmClusterNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByCloudVmClusterNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -941,23 +1047,26 @@ private Mono> listByCloudVmClusterNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterNextSinglePageAsync(String nextLink, + private PagedResponse listByCloudVmClusterNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByCloudVmClusterNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByCloudVmClusterNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkAddressesClientImpl.class); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressesImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressesImpl.java index 86dd82f3cb3d..3dcb53191f05 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressesImpl.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/VirtualNetworkAddressesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.implementation; @@ -27,20 +27,6 @@ public VirtualNetworkAddressesImpl(VirtualNetworkAddressesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCloudVmCluster(String resourceGroupName, - String cloudvmclustername) { - PagedIterable inner - = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkAddressImpl(inner1, this.manager())); - } - - public PagedIterable listByCloudVmCluster(String resourceGroupName, - String cloudvmclustername, Context context) { - PagedIterable inner - = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkAddressImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, Context context) { Response inner = this.serviceClient() @@ -73,6 +59,20 @@ public void delete(String resourceGroupName, String cloudvmclustername, String v this.serviceClient().delete(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context); } + public PagedIterable listByCloudVmCluster(String resourceGroupName, + String cloudvmclustername) { + PagedIterable inner + = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkAddressImpl(inner1, this.manager())); + } + + public PagedIterable listByCloudVmCluster(String resourceGroupName, + String cloudvmclustername, Context context) { + PagedIterable inner + = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkAddressImpl(inner1, this.manager())); + } + public VirtualNetworkAddress getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseBackupListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseBackupListResult.java index 8ad50a3e16be..13303c33e103 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseBackupListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSetListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseCharacterSetListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSetListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseCharacterSetListResult.java index 7fd849a61b1a..8339e7396ca2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSetListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseCharacterSetListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseListResult.java index fe1668e43fa1..64c46730b57a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSetListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseNationalCharacterSetListResult.java similarity index 97% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSetListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseNationalCharacterSetListResult.java index eab1af129bfa..9ebb5a696bf4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSetListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDatabaseNationalCharacterSetListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersionListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDbVersionListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersionListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDbVersionListResult.java index 1dba47ef2d20..ccd9635334ff 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersionListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/AutonomousDbVersionListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/CloudExadataInfrastructureListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/CloudExadataInfrastructureListResult.java index d572b2480dc3..960607408e0a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/CloudExadataInfrastructureListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/CloudVmClusterListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/CloudVmClusterListResult.java index 176b7afbea95..057cfd126bd9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/CloudVmClusterListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbNodeListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbNodeListResult.java index 39966fe2a0f5..b7261d057e5b 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbNodeListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbServerListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbServerListResult.java index e2f7fecf5209..bb7310cf44c5 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbServerListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShapeListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbSystemShapeListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShapeListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbSystemShapeListResult.java index 938c29212a79..62bb8028250c 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShapeListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DbSystemShapeListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DnsPrivateViewListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DnsPrivateViewListResult.java index 519f80d36391..306ca1a8f0dc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DnsPrivateViewListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZoneListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DnsPrivateZoneListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZoneListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DnsPrivateZoneListResult.java index bfe6d07654d3..86837603bcf6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZoneListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/DnsPrivateZoneListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExadbVmClusterListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExadbVmClusterListResult.java new file mode 100644 index 000000000000..10f467062e98 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExadbVmClusterListResult.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ExadbVmCluster list operation. + */ +@Immutable +public final class ExadbVmClusterListResult implements JsonSerializable { + /* + * The ExadbVmCluster items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExadbVmClusterListResult class. + */ + private ExadbVmClusterListResult() { + } + + /** + * Get the value property: The ExadbVmCluster items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ExadbVmClusterListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExadbVmClusterListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExadbVmClusterListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExadbVmClusterListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExadbVmClusterListResult. + */ + public static ExadbVmClusterListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExadbVmClusterListResult deserializedExadbVmClusterListResult = new ExadbVmClusterListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExadbVmClusterInner.fromJson(reader1)); + deserializedExadbVmClusterListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExadbVmClusterListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExadbVmClusterListResult; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExascaleDbNodeListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExascaleDbNodeListResult.java new file mode 100644 index 000000000000..05c3371eefb3 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExascaleDbNodeListResult.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ExascaleDbNode list operation. + */ +@Immutable +public final class ExascaleDbNodeListResult implements JsonSerializable { + /* + * The ExascaleDbNode items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExascaleDbNodeListResult class. + */ + private ExascaleDbNodeListResult() { + } + + /** + * Get the value property: The ExascaleDbNode items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ExascaleDbNodeListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExascaleDbNodeListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbNodeListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbNodeListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExascaleDbNodeListResult. + */ + public static ExascaleDbNodeListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbNodeListResult deserializedExascaleDbNodeListResult = new ExascaleDbNodeListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExascaleDbNodeInner.fromJson(reader1)); + deserializedExascaleDbNodeListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExascaleDbNodeListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbNodeListResult; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExascaleDbStorageVaultListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExascaleDbStorageVaultListResult.java new file mode 100644 index 000000000000..cab01975153b --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/ExascaleDbStorageVaultListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ExascaleDbStorageVault list operation. + */ +@Immutable +public final class ExascaleDbStorageVaultListResult implements JsonSerializable { + /* + * The ExascaleDbStorageVault items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ExascaleDbStorageVaultListResult class. + */ + private ExascaleDbStorageVaultListResult() { + } + + /** + * Get the value property: The ExascaleDbStorageVault items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ExascaleDbStorageVaultListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExascaleDbStorageVaultListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbStorageVaultListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbStorageVaultListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExascaleDbStorageVaultListResult. + */ + public static ExascaleDbStorageVaultListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbStorageVaultListResult deserializedExascaleDbStorageVaultListResult + = new ExascaleDbStorageVaultListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ExascaleDbStorageVaultInner.fromJson(reader1)); + deserializedExascaleDbStorageVaultListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedExascaleDbStorageVaultListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbStorageVaultListResult; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/FlexComponentListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/FlexComponentListResult.java new file mode 100644 index 000000000000..dbb0b19bfd2e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/FlexComponentListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a FlexComponent list operation. + */ +@Immutable +public final class FlexComponentListResult implements JsonSerializable { + /* + * The FlexComponent items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of FlexComponentListResult class. + */ + private FlexComponentListResult() { + } + + /** + * Get the value property: The FlexComponent items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model FlexComponentListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FlexComponentListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FlexComponentListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FlexComponentListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FlexComponentListResult. + */ + public static FlexComponentListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FlexComponentListResult deserializedFlexComponentListResult = new FlexComponentListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> FlexComponentInner.fromJson(reader1)); + deserializedFlexComponentListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedFlexComponentListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFlexComponentListResult; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/GiMinorVersionListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/GiMinorVersionListResult.java new file mode 100644 index 000000000000..14de88b44d4e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/GiMinorVersionListResult.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a GiMinorVersion list operation. + */ +@Immutable +public final class GiMinorVersionListResult implements JsonSerializable { + /* + * The GiMinorVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of GiMinorVersionListResult class. + */ + private GiMinorVersionListResult() { + } + + /** + * Get the value property: The GiMinorVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model GiMinorVersionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GiMinorVersionListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GiMinorVersionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GiMinorVersionListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GiMinorVersionListResult. + */ + public static GiMinorVersionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GiMinorVersionListResult deserializedGiMinorVersionListResult = new GiMinorVersionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GiMinorVersionInner.fromJson(reader1)); + deserializedGiMinorVersionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGiMinorVersionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGiMinorVersionListResult; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersionListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/GiVersionListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersionListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/GiVersionListResult.java index 8f5e1113ce89..41ddf712da86 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersionListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/GiVersionListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/OperationListResult.java similarity index 74% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/OperationListResult.java index 7591451b5979..62c03e36e88f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/OperationListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,12 +21,12 @@ @Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the resource provider + * The Operation items on this page */ private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ private String nextLink; @@ -36,7 +37,7 @@ private OperationListResult() { } /** - * Get the value property: List of operations supported by the resource provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -45,7 +46,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -59,17 +60,24 @@ public String nextLink() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (value() != null) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -79,6 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/OracleSubscriptionListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/OracleSubscriptionListResult.java index 1a2be909de8e..8767d4dc7a9e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/OracleSubscriptionListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersionListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/SystemVersionListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersionListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/SystemVersionListResult.java index bf7f9dbbdc79..3c14f4400f2a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersionListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/SystemVersionListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/VirtualNetworkAddressListResult.java similarity index 96% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressListResult.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/VirtualNetworkAddressListResult.java index 5f77956ebbe8..c82b89056937 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressListResult.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/models/VirtualNetworkAddressListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.oracledatabase.models; +package com.azure.resourcemanager.oracledatabase.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/package-info.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/package-info.java index 34ec7a4c8f53..b5b9265c619b 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/package-info.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for OracleDatabaseResourceManager. - * null. + * Package containing the implementations for OracleDatabase. */ package com.azure.resourcemanager.oracledatabase.implementation; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ActionType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ActionType.java index f38c0b8a7253..e7f38a5d850d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ActionType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Internal for ActionType. + * Actions are for internal-only APIs. */ public static final ActionType INTERNAL = fromString("Internal"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ActivationLinks.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ActivationLinks.java index cc7793ca6779..e93c1b854e18 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ActivationLinks.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ActivationLinks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AddRemoveDbNode.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AddRemoveDbNode.java index 471d86e1659a..4c0856a899c6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AddRemoveDbNode.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AddRemoveDbNode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AddSubscriptionOperationState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AddSubscriptionOperationState.java new file mode 100644 index 000000000000..740d80c1844d --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AddSubscriptionOperationState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Add Subscription Operation state enum. + */ +public final class AddSubscriptionOperationState extends ExpandableStringEnum { + /** + * Succeeded - State when Add Subscription operation succeeded. + */ + public static final AddSubscriptionOperationState SUCCEEDED = fromString("Succeeded"); + + /** + * Updating - State when Add Subscription operation is being Updated. + */ + public static final AddSubscriptionOperationState UPDATING = fromString("Updating"); + + /** + * Failed - State when Add Subscription operation failed. + */ + public static final AddSubscriptionOperationState FAILED = fromString("Failed"); + + /** + * Creates a new instance of AddSubscriptionOperationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AddSubscriptionOperationState() { + } + + /** + * Creates or finds a AddSubscriptionOperationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AddSubscriptionOperationState. + */ + public static AddSubscriptionOperationState fromString(String name) { + return fromString(name, AddSubscriptionOperationState.class); + } + + /** + * Gets known AddSubscriptionOperationState values. + * + * @return known AddSubscriptionOperationState values. + */ + public static Collection values() { + return values(AddSubscriptionOperationState.class); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AllConnectionStringType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AllConnectionStringType.java index 7dbe1c89c246..1eb0b079edaa 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AllConnectionStringType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AllConnectionStringType.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ * The connection string profile to allow clients to group, filter and select connection string values based on * structured metadata. */ -@Fluent +@Immutable public final class AllConnectionStringType implements JsonSerializable { /* * The High database service provides the highest level of resources to each SQL statement resulting in the highest @@ -38,7 +38,7 @@ public final class AllConnectionStringType implements JsonSerializable { /* * The Oracle APEX Application Development version. @@ -29,7 +29,7 @@ public final class ApexDetailsType implements JsonSerializable /** * Creates an instance of ApexDetailsType class. */ - public ApexDetailsType() { + private ApexDetailsType() { } /** @@ -41,17 +41,6 @@ public String apexVersion() { return this.apexVersion; } - /** - * Set the apexVersion property: The Oracle APEX Application Development version. - * - * @param apexVersion the apexVersion value to set. - * @return the ApexDetailsType object itself. - */ - public ApexDetailsType withApexVersion(String apexVersion) { - this.apexVersion = apexVersion; - return this; - } - /** * Get the ordsVersion property: The Oracle REST Data Services (ORDS) version. * @@ -61,17 +50,6 @@ public String ordsVersion() { return this.ordsVersion; } - /** - * Set the ordsVersion property: The Oracle REST Data Services (ORDS) version. - * - * @param ordsVersion the ordsVersion value to set. - * @return the ApexDetailsType object itself. - */ - public ApexDetailsType withOrdsVersion(String ordsVersion) { - this.ordsVersion = ordsVersion; - return this; - } - /** * Validates the instance. * diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabase.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabase.java index b13a73ffb9dd..774258c0fb7a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabase.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -240,9 +240,9 @@ interface WithTags { */ interface WithProperties { /** - * Specifies the properties property: The updatable properties of the AutonomousDatabase.. + * Specifies the properties property: The resource-specific properties for this resource.. * - * @param properties The updatable properties of the AutonomousDatabase. + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ Update withProperties(AutonomousDatabaseUpdateProperties properties); @@ -264,6 +264,29 @@ interface WithProperties { */ AutonomousDatabase refresh(Context context); + /** + * Perform switchover action on Autonomous Database. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + AutonomousDatabase switchover(PeerDbDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + AutonomousDatabase switchover(PeerDbDetails body, Context context); + /** * Perform failover action on Autonomous Database. * @@ -271,7 +294,7 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase failover(PeerDbDetails body); @@ -283,7 +306,7 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase failover(PeerDbDetails body, Context context); @@ -318,7 +341,7 @@ Response generateWalletWithResponse(GenerateAutono * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase restore(RestoreAutonomousDatabaseDetails body); @@ -330,7 +353,7 @@ Response generateWalletWithResponse(GenerateAutono * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase restore(RestoreAutonomousDatabaseDetails body, Context context); @@ -339,7 +362,7 @@ Response generateWalletWithResponse(GenerateAutono * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase shrink(); @@ -350,30 +373,30 @@ Response generateWalletWithResponse(GenerateAutono * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase shrink(Context context); /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ - AutonomousDatabase switchover(PeerDbDetails body); + AutonomousDatabase changeDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails body); /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ - AutonomousDatabase switchover(PeerDbDetails body, Context context); + AutonomousDatabase changeDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails body, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackup.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackup.java index c1fd352b7cfb..049f4deb1951 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackup.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackup.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -163,9 +163,9 @@ interface UpdateStages { */ interface WithProperties { /** - * Specifies the properties property: The updatable properties of the AutonomousDatabaseBackup.. + * Specifies the properties property: The resource-specific properties for this resource.. * - * @param properties The updatable properties of the AutonomousDatabaseBackup. + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ Update withProperties(AutonomousDatabaseBackupUpdateProperties properties); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupLifecycleState.java index 266682e017d7..36b6d8f5e363 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupLifecycleState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupLifecycleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,27 +13,27 @@ public final class AutonomousDatabaseBackupLifecycleState extends ExpandableStringEnum { /** - * Static value Creating for AutonomousDatabaseBackupLifecycleState. + * AutonomousDatabase backup is creating. */ public static final AutonomousDatabaseBackupLifecycleState CREATING = fromString("Creating"); /** - * Static value Active for AutonomousDatabaseBackupLifecycleState. + * AutonomousDatabase backup is active. */ public static final AutonomousDatabaseBackupLifecycleState ACTIVE = fromString("Active"); /** - * Static value Deleting for AutonomousDatabaseBackupLifecycleState. + * AutonomousDatabase backup is deleting. */ public static final AutonomousDatabaseBackupLifecycleState DELETING = fromString("Deleting"); /** - * Static value Failed for AutonomousDatabaseBackupLifecycleState. + * AutonomousDatabase backup is failed. */ public static final AutonomousDatabaseBackupLifecycleState FAILED = fromString("Failed"); /** - * Static value Updating for AutonomousDatabaseBackupLifecycleState. + * AutonomousDatabase backup is updating. */ public static final AutonomousDatabaseBackupLifecycleState UPDATING = fromString("Updating"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupProperties.java index a4d4b5e62f0a..c48b63505170 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -64,7 +64,7 @@ public final class AutonomousDatabaseBackupProperties implements JsonSerializabl private AutonomousDatabaseBackupLifecycleState lifecycleState; /* - * Retention period, in days, for long-term backups. + * Retention period, in days */ private Integer retentionPeriodInDays; @@ -198,7 +198,7 @@ public AutonomousDatabaseBackupLifecycleState lifecycleState() { } /** - * Get the retentionPeriodInDays property: Retention period, in days, for long-term backups. + * Get the retentionPeriodInDays property: Retention period, in days. * * @return the retentionPeriodInDays value. */ @@ -207,7 +207,7 @@ public Integer retentionPeriodInDays() { } /** - * Set the retentionPeriodInDays property: Retention period, in days, for long-term backups. + * Set the retentionPeriodInDays property: Retention period, in days. * * @param retentionPeriodInDays the retentionPeriodInDays value to set. * @return the AutonomousDatabaseBackupProperties object itself. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupType.java index 1300e3d1c9e2..69c2be7c1bbe 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,17 +12,17 @@ */ public final class AutonomousDatabaseBackupType extends ExpandableStringEnum { /** - * Static value Incremental for AutonomousDatabaseBackupType. + * Incremental backup. */ public static final AutonomousDatabaseBackupType INCREMENTAL = fromString("Incremental"); /** - * Static value Full for AutonomousDatabaseBackupType. + * Full backup. */ public static final AutonomousDatabaseBackupType FULL = fromString("Full"); /** - * Static value LongTerm for AutonomousDatabaseBackupType. + * LongTerm backup. */ public static final AutonomousDatabaseBackupType LONG_TERM = fromString("LongTerm"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdate.java index 683199e82006..0a51a6704644 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdate.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -17,7 +17,7 @@ @Fluent public final class AutonomousDatabaseBackupUpdate implements JsonSerializable { /* - * The updatable properties of the AutonomousDatabaseBackup. + * The resource-specific properties for this resource. */ private AutonomousDatabaseBackupUpdateProperties properties; @@ -28,7 +28,7 @@ public AutonomousDatabaseBackupUpdate() { } /** - * Get the properties property: The updatable properties of the AutonomousDatabaseBackup. + * Get the properties property: The resource-specific properties for this resource. * * @return the properties value. */ @@ -37,7 +37,7 @@ public AutonomousDatabaseBackupUpdateProperties properties() { } /** - * Set the properties property: The updatable properties of the AutonomousDatabaseBackup. + * Set the properties property: The resource-specific properties for this resource. * * @param properties the properties value to set. * @return the AutonomousDatabaseBackupUpdate object itself. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdateProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdateProperties.java index 93fc10d79971..6febda5f43fc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdateProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -18,7 +18,7 @@ public final class AutonomousDatabaseBackupUpdateProperties implements JsonSerializable { /* - * Retention period, in days, for long-term backups. + * Retention period, in days */ private Integer retentionPeriodInDays; @@ -29,7 +29,7 @@ public AutonomousDatabaseBackupUpdateProperties() { } /** - * Get the retentionPeriodInDays property: Retention period, in days, for long-term backups. + * Get the retentionPeriodInDays property: Retention period, in days. * * @return the retentionPeriodInDays value. */ @@ -38,7 +38,7 @@ public Integer retentionPeriodInDays() { } /** - * Set the retentionPeriodInDays property: Retention period, in days, for long-term backups. + * Set the retentionPeriodInDays property: Retention period, in days. * * @param retentionPeriodInDays the retentionPeriodInDays value to set. * @return the AutonomousDatabaseBackupUpdateProperties object itself. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackups.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackups.java index 177c9d49ef59..735d92dc7ccd 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackups.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackups.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,86 +13,86 @@ */ public interface AutonomousDatabaseBackups { /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Get a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseBackup along with {@link Response}. */ - PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename); + Response getWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context); /** - * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * Get a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. + * @param adbbackupid AutonomousDatabaseBackup id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseBackup list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseBackup. */ - PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename, Context context); + AutonomousDatabaseBackup get(String resourceGroupName, String autonomousdatabasename, String adbbackupid); /** - * Get a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseBackup along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String autonomousdatabasename, - String adbbackupid, Context context); + void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid); /** - * Get a AutonomousDatabaseBackup. + * Delete a AutonomousDatabaseBackup. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseBackup. */ - AutonomousDatabaseBackup get(String resourceGroupName, String autonomousdatabasename, String adbbackupid); + void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context); /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. */ - void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid); + PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename); /** - * Delete a AutonomousDatabaseBackup. + * List AutonomousDatabaseBackup resources by AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param adbbackupid AutonomousDatabaseBackup id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. */ - void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context); + PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename, Context context); /** * Get a AutonomousDatabaseBackup. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBaseProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBaseProperties.java index 36b215438158..20867eabf861 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBaseProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -42,7 +42,7 @@ public class AutonomousDatabaseBaseProperties implements JsonSerializable peerDbIds; /* - * The database OCID of the Disaster Recovery peer database, which is located in a different region from the current - * peer database. + * The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the + * current peer database. */ private String peerDbId; @@ -125,6 +124,16 @@ public class AutonomousDatabaseBaseProperties implements JsonSerializable peerDbIds() { } /** - * Set the peerDbIds property: The list of - * [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in - * Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous - * Database Serverless instances, standby databases located in the same region as the source primary database do not - * have OCIDs. + * Set the peerDbIds property: The list of Azure resource IDs of standby databases located in Autonomous Data Guard + * remote regions that are associated with the source database. Note that for Autonomous Database Serverless + * instances, standby databases located in the same region as the source primary database do not have Azure IDs. * * @param peerDbIds the peerDbIds value to set. * @return the AutonomousDatabaseBaseProperties object itself. @@ -740,7 +745,7 @@ AutonomousDatabaseBaseProperties withPeerDbIds(List peerDbIds) { } /** - * Get the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * Get the peerDbId property: The Azure resource ID of the Disaster Recovery peer database, which is located in a * different region from the current peer database. * * @return the peerDbId value. @@ -750,7 +755,7 @@ public String peerDbId() { } /** - * Set the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * Set the peerDbId property: The Azure resource ID of the Disaster Recovery peer database, which is located in a * different region from the current peer database. * * @param peerDbId the peerDbId value to set. @@ -831,6 +836,50 @@ AutonomousDatabaseBaseProperties withLocalDisasterRecoveryType(DisasterRecoveryT return this; } + /** + * Get the timeDisasterRecoveryRoleChanged property: The date and time the Disaster Recovery role was switched for + * the standby Autonomous Database. + * + * @return the timeDisasterRecoveryRoleChanged value. + */ + public OffsetDateTime timeDisasterRecoveryRoleChanged() { + return this.timeDisasterRecoveryRoleChanged; + } + + /** + * Set the timeDisasterRecoveryRoleChanged property: The date and time the Disaster Recovery role was switched for + * the standby Autonomous Database. + * + * @param timeDisasterRecoveryRoleChanged the timeDisasterRecoveryRoleChanged value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + AutonomousDatabaseBaseProperties + withTimeDisasterRecoveryRoleChanged(OffsetDateTime timeDisasterRecoveryRoleChanged) { + this.timeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; + return this; + } + + /** + * Get the remoteDisasterRecoveryConfiguration property: Indicates remote disaster recovery configuration. + * + * @return the remoteDisasterRecoveryConfiguration value. + */ + public DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration() { + return this.remoteDisasterRecoveryConfiguration; + } + + /** + * Set the remoteDisasterRecoveryConfiguration property: Indicates remote disaster recovery configuration. + * + * @param remoteDisasterRecoveryConfiguration the remoteDisasterRecoveryConfiguration value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + AutonomousDatabaseBaseProperties withRemoteDisasterRecoveryConfiguration( + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration) { + this.remoteDisasterRecoveryConfiguration = remoteDisasterRecoveryConfiguration; + return this; + } + /** * Get the localStandbyDb property: Local Autonomous Disaster Recovery standby database details. * @@ -1982,6 +2031,9 @@ public void validate() { if (customerContacts() != null) { customerContacts().forEach(e -> e.validate()); } + if (remoteDisasterRecoveryConfiguration() != null) { + remoteDisasterRecoveryConfiguration().validate(); + } if (localStandbyDb() != null) { localStandbyDb().validate(); } @@ -2076,10 +2128,14 @@ public static AutonomousDatabaseBaseProperties fromJson(JsonReader jsonReader) t } } // Use the discriminator value to determine which subtype should be deserialized. - if ("Clone".equals(discriminatorValue)) { - return AutonomousDatabaseCloneProperties.fromJson(readerToUse.reset()); - } else if ("Regular".equals(discriminatorValue)) { + if ("Regular".equals(discriminatorValue)) { return AutonomousDatabaseProperties.fromJson(readerToUse.reset()); + } else if ("Clone".equals(discriminatorValue)) { + return AutonomousDatabaseCloneProperties.fromJson(readerToUse.reset()); + } else if ("CrossRegionDisasterRecovery".equals(discriminatorValue)) { + return AutonomousDatabaseCrossRegionDisasterRecoveryProperties.fromJson(readerToUse.reset()); + } else if ("CloneFromBackupTimestamp".equals(discriminatorValue)) { + return AutonomousDatabaseFromBackupTimestampProperties.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -2107,7 +2163,7 @@ static AutonomousDatabaseBaseProperties fromJsonKnownDiscriminator(JsonReader js deserializedAutonomousDatabaseBaseProperties.characterSet = reader.getString(); } else if ("computeCount".equals(fieldName)) { deserializedAutonomousDatabaseBaseProperties.computeCount - = reader.getNullable(JsonReader::getFloat); + = reader.getNullable(JsonReader::getDouble); } else if ("computeModel".equals(fieldName)) { deserializedAutonomousDatabaseBaseProperties.computeModel = ComputeModel.fromString(reader.getString()); @@ -2150,6 +2206,12 @@ static AutonomousDatabaseBaseProperties fromJsonKnownDiscriminator(JsonReader js } else if ("localDisasterRecoveryType".equals(fieldName)) { deserializedAutonomousDatabaseBaseProperties.localDisasterRecoveryType = DisasterRecoveryType.fromString(reader.getString()); + } else if ("timeDisasterRecoveryRoleChanged".equals(fieldName)) { + deserializedAutonomousDatabaseBaseProperties.timeDisasterRecoveryRoleChanged = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("remoteDisasterRecoveryConfiguration".equals(fieldName)) { + deserializedAutonomousDatabaseBaseProperties.remoteDisasterRecoveryConfiguration + = DisasterRecoveryConfigurationDetails.fromJson(reader); } else if ("localStandbyDb".equals(fieldName)) { deserializedAutonomousDatabaseBaseProperties.localStandbyDb = AutonomousDatabaseStandbySummary.fromJson(reader); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSet.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSet.java index d6d4733329c5..16a14368b39a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSet.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSetProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSetProperties.java index 0025e4ea51e0..b8656a7b1fd3 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSetProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSetProperties.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -25,7 +26,7 @@ public final class AutonomousDatabaseCharacterSetProperties /** * Creates an instance of AutonomousDatabaseCharacterSetProperties class. */ - public AutonomousDatabaseCharacterSetProperties() { + private AutonomousDatabaseCharacterSetProperties() { } /** @@ -43,14 +44,22 @@ public String characterSet() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (characterSet() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property characterSet in model AutonomousDatabaseCharacterSetProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseCharacterSetProperties.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("characterSet", this.characterSet); return jsonWriter.writeEndObject(); } @@ -60,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AutonomousDatabaseCharacterSetProperties if the JsonReader was pointing to an instance of * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AutonomousDatabaseCharacterSetProperties. */ public static AutonomousDatabaseCharacterSetProperties fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSets.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSets.java index 177ce6192b18..f8428d5a34a2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSets.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,52 +13,52 @@ */ public interface AutonomousDatabaseCharacterSets { /** - * List AutonomousDatabaseCharacterSet resources by Location. + * Get a AutonomousDatabaseCharacterSet. * * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseCharacterSet along with {@link Response}. */ - PagedIterable listByLocation(String location); + Response getWithResponse(String location, String adbscharsetname, Context context); /** - * List AutonomousDatabaseCharacterSet resources by Location. + * Get a AutonomousDatabaseCharacterSet. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseCharacterSet. */ - PagedIterable listByLocation(String location, Context context); + AutonomousDatabaseCharacterSet get(String location, String adbscharsetname); /** - * Get a AutonomousDatabaseCharacterSet. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet along with {@link Response}. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String location, String adbscharsetname, Context context); + PagedIterable listByLocation(String location); /** - * Get a AutonomousDatabaseCharacterSet. + * List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseCharacterSet. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - AutonomousDatabaseCharacterSet get(String location, String adbscharsetname); + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCloneProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCloneProperties.java index 880e28e2807e..0dd1d97e324e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCloneProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCloneProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -30,7 +29,7 @@ public final class AutonomousDatabaseCloneProperties extends AutonomousDatabaseB private SourceType source; /* - * The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + * The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. */ private String sourceId; @@ -65,215 +64,6 @@ public final class AutonomousDatabaseCloneProperties extends AutonomousDatabaseB */ private String timeUntilReconnectCloneEnabled; - /* - * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases - * located in Autonomous Data Guard remote regions that are associated with the source database. Note that for - * Autonomous Database Serverless instances, standby databases located in the same region as the source primary - * database do not have OCIDs. - */ - private List peerDbIds; - - /* - * Indicates whether the Autonomous Database has Cross Region Data Guard enabled. - */ - private Boolean isRemoteDataGuardEnabled; - - /* - * Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data - * Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or - * switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. - */ - private DisasterRecoveryType localDisasterRecoveryType; - - /* - * Local Autonomous Disaster Recovery standby database details. - */ - private AutonomousDatabaseStandbySummary localStandbyDb; - - /* - * Indicates the number of seconds of data loss for a Data Guard failover. - */ - private Integer failedDataRecoveryInSeconds; - - /* - * Additional information about the current lifecycle state. - */ - private String lifecycleDetails; - - /* - * Azure resource provisioning state. - */ - private AzureResourceProvisioningState provisioningState; - - /* - * Views lifecycleState - */ - private AutonomousDatabaseLifecycleState lifecycleState; - - /* - * HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. - */ - private String ociUrl; - - /* - * The date and time that the database was created. - */ - private OffsetDateTime timeCreated; - - /* - * The date and time when maintenance will begin. - */ - private OffsetDateTime timeMaintenanceBegin; - - /* - * The date and time when maintenance will end. - */ - private OffsetDateTime timeMaintenanceEnd; - - /* - * The current amount of storage in use for user and system data, in terabytes (TB). - */ - private Double actualUsedDataStorageSizeInTbs; - - /* - * The amount of storage currently allocated for the database tables and billed for, rounded up. - */ - private Double allocatedStorageSizeInTbs; - - /* - * Information about Oracle APEX Application Development. - */ - private ApexDetailsType apexDetails; - - /* - * List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, - * this list is empty. - */ - private List availableUpgradeVersions; - - /* - * The connection string used to connect to the Autonomous Database. - */ - private ConnectionStringType connectionStrings; - - /* - * The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute - * instance within your VCN or that has a direct connection to your VCN. - */ - private ConnectionUrlType connectionUrls; - - /* - * Status of the Data Safe registration for this Autonomous Database. - */ - private DataSafeStatusType dataSafeStatus; - - /* - * The area assigned to In-Memory tables in Autonomous Database. - */ - private Integer inMemoryAreaInGbs; - - /* - * The date and time when the next long-term backup would be created. - */ - private OffsetDateTime nextLongTermBackupTimestamp; - - /* - * Indicates if the Autonomous Database version is a preview version. - */ - private Boolean isPreview; - - /* - * The amount of memory (in GBs) enabled per ECPU or OCPU. - */ - private Integer memoryPerOracleComputeUnitInGbs; - - /* - * Status of Operations Insights for this Autonomous Database. - */ - private OperationsInsightsStatusType operationsInsightsStatus; - - /* - * The private endpoint for the resource. - */ - private String privateEndpoint; - - /* - * An array of CPU values that an Autonomous Database can be scaled to. - */ - private List provisionableCpus; - - /* - * The URL of the Service Console for the Autonomous Database. - */ - private String serviceConsoleUrl; - - /* - * The SQL Web Developer URL for the Oracle Autonomous Database. - */ - private String sqlWebDeveloperUrl; - - /* - * The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby - * database. - */ - private List supportedRegionsToCloneTo; - - /* - * The date and time the Autonomous Data Guard role was switched for the Autonomous Database. - */ - private String timeDataGuardRoleChanged; - - /* - * The date and time the Always Free database will be automatically deleted because of inactivity. - */ - private String timeDeletionOfFreeAutonomousDatabase; - - /* - * The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was - * provisioned in the same region as the primary database. - */ - private String timeLocalDataGuardEnabled; - - /* - * The timestamp of the last failover operation. - */ - private String timeOfLastFailover; - - /* - * The date and time when last refresh happened. - */ - private String timeOfLastRefresh; - - /* - * The refresh point timestamp (UTC). - */ - private String timeOfLastRefreshPoint; - - /* - * The timestamp of the last switchover operation for the Autonomous Database. - */ - private String timeOfLastSwitchover; - - /* - * The date and time the Always Free database will be stopped because of inactivity. - */ - private String timeReclamationOfFreeAutonomousDatabase; - - /* - * The storage space consumed by Autonomous Database in GBs. - */ - private Integer usedDataStorageSizeInGbs; - - /* - * The amount of storage that has been used, in terabytes. - */ - private Integer usedDataStorageSizeInTbs; - - /* - * Database ocid - */ - private String ocid; - /** * Creates an instance of AutonomousDatabaseCloneProperties class. */ @@ -311,7 +101,7 @@ public AutonomousDatabaseCloneProperties withSource(SourceType source) { } /** - * Get the sourceId property: The Azure ID of the Autonomous Database that was cloned to create the current + * Get the sourceId property: The Azure resource ID of the Autonomous Database that was cloned to create the current * Autonomous Database. * * @return the sourceId value. @@ -321,7 +111,7 @@ public String sourceId() { } /** - * Set the sourceId property: The Azure ID of the Autonomous Database that was cloned to create the current + * Set the sourceId property: The Azure resource ID of the Autonomous Database that was cloned to create the current * Autonomous Database. * * @param sourceId the sourceId value to set. @@ -422,425 +212,6 @@ public AutonomousDatabaseCloneProperties withTimeUntilReconnectCloneEnabled(Stri return this; } - /** - * Get the peerDbIds property: The list of - * [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in - * Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous - * Database Serverless instances, standby databases located in the same region as the source primary database do not - * have OCIDs. - * - * @return the peerDbIds value. - */ - @Override - public List peerDbIds() { - return this.peerDbIds; - } - - /** - * Get the isRemoteDataGuardEnabled property: Indicates whether the Autonomous Database has Cross Region Data Guard - * enabled. - * - * @return the isRemoteDataGuardEnabled value. - */ - @Override - public Boolean isRemoteDataGuardEnabled() { - return this.isRemoteDataGuardEnabled; - } - - /** - * Get the localDisasterRecoveryType property: Indicates the local disaster recovery (DR) type of the Autonomous - * Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster - * recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a - * slower RTO during failover or switchover. - * - * @return the localDisasterRecoveryType value. - */ - @Override - public DisasterRecoveryType localDisasterRecoveryType() { - return this.localDisasterRecoveryType; - } - - /** - * Get the localStandbyDb property: Local Autonomous Disaster Recovery standby database details. - * - * @return the localStandbyDb value. - */ - @Override - public AutonomousDatabaseStandbySummary localStandbyDb() { - return this.localStandbyDb; - } - - /** - * Get the failedDataRecoveryInSeconds property: Indicates the number of seconds of data loss for a Data Guard - * failover. - * - * @return the failedDataRecoveryInSeconds value. - */ - @Override - public Integer failedDataRecoveryInSeconds() { - return this.failedDataRecoveryInSeconds; - } - - /** - * Get the lifecycleDetails property: Additional information about the current lifecycle state. - * - * @return the lifecycleDetails value. - */ - @Override - public String lifecycleDetails() { - return this.lifecycleDetails; - } - - /** - * Get the provisioningState property: Azure resource provisioning state. - * - * @return the provisioningState value. - */ - @Override - public AzureResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the lifecycleState property: Views lifecycleState. - * - * @return the lifecycleState value. - */ - @Override - public AutonomousDatabaseLifecycleState lifecycleState() { - return this.lifecycleState; - } - - /** - * Get the ociUrl property: HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. - * - * @return the ociUrl value. - */ - @Override - public String ociUrl() { - return this.ociUrl; - } - - /** - * Get the timeCreated property: The date and time that the database was created. - * - * @return the timeCreated value. - */ - @Override - public OffsetDateTime timeCreated() { - return this.timeCreated; - } - - /** - * Get the timeMaintenanceBegin property: The date and time when maintenance will begin. - * - * @return the timeMaintenanceBegin value. - */ - @Override - public OffsetDateTime timeMaintenanceBegin() { - return this.timeMaintenanceBegin; - } - - /** - * Get the timeMaintenanceEnd property: The date and time when maintenance will end. - * - * @return the timeMaintenanceEnd value. - */ - @Override - public OffsetDateTime timeMaintenanceEnd() { - return this.timeMaintenanceEnd; - } - - /** - * Get the actualUsedDataStorageSizeInTbs property: The current amount of storage in use for user and system data, - * in terabytes (TB). - * - * @return the actualUsedDataStorageSizeInTbs value. - */ - @Override - public Double actualUsedDataStorageSizeInTbs() { - return this.actualUsedDataStorageSizeInTbs; - } - - /** - * Get the allocatedStorageSizeInTbs property: The amount of storage currently allocated for the database tables and - * billed for, rounded up. - * - * @return the allocatedStorageSizeInTbs value. - */ - @Override - public Double allocatedStorageSizeInTbs() { - return this.allocatedStorageSizeInTbs; - } - - /** - * Get the apexDetails property: Information about Oracle APEX Application Development. - * - * @return the apexDetails value. - */ - @Override - public ApexDetailsType apexDetails() { - return this.apexDetails; - } - - /** - * Get the availableUpgradeVersions property: List of Oracle Database versions available for a database upgrade. If - * there are no version upgrades available, this list is empty. - * - * @return the availableUpgradeVersions value. - */ - @Override - public List availableUpgradeVersions() { - return this.availableUpgradeVersions; - } - - /** - * Get the connectionStrings property: The connection string used to connect to the Autonomous Database. - * - * @return the connectionStrings value. - */ - @Override - public ConnectionStringType connectionStrings() { - return this.connectionStrings; - } - - /** - * Get the connectionUrls property: The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web - * with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. - * - * @return the connectionUrls value. - */ - @Override - public ConnectionUrlType connectionUrls() { - return this.connectionUrls; - } - - /** - * Get the dataSafeStatus property: Status of the Data Safe registration for this Autonomous Database. - * - * @return the dataSafeStatus value. - */ - @Override - public DataSafeStatusType dataSafeStatus() { - return this.dataSafeStatus; - } - - /** - * Get the inMemoryAreaInGbs property: The area assigned to In-Memory tables in Autonomous Database. - * - * @return the inMemoryAreaInGbs value. - */ - @Override - public Integer inMemoryAreaInGbs() { - return this.inMemoryAreaInGbs; - } - - /** - * Get the nextLongTermBackupTimestamp property: The date and time when the next long-term backup would be created. - * - * @return the nextLongTermBackupTimestamp value. - */ - @Override - public OffsetDateTime nextLongTermBackupTimestamp() { - return this.nextLongTermBackupTimestamp; - } - - /** - * Get the isPreview property: Indicates if the Autonomous Database version is a preview version. - * - * @return the isPreview value. - */ - @Override - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Get the memoryPerOracleComputeUnitInGbs property: The amount of memory (in GBs) enabled per ECPU or OCPU. - * - * @return the memoryPerOracleComputeUnitInGbs value. - */ - @Override - public Integer memoryPerOracleComputeUnitInGbs() { - return this.memoryPerOracleComputeUnitInGbs; - } - - /** - * Get the operationsInsightsStatus property: Status of Operations Insights for this Autonomous Database. - * - * @return the operationsInsightsStatus value. - */ - @Override - public OperationsInsightsStatusType operationsInsightsStatus() { - return this.operationsInsightsStatus; - } - - /** - * Get the privateEndpoint property: The private endpoint for the resource. - * - * @return the privateEndpoint value. - */ - @Override - public String privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Get the provisionableCpus property: An array of CPU values that an Autonomous Database can be scaled to. - * - * @return the provisionableCpus value. - */ - @Override - public List provisionableCpus() { - return this.provisionableCpus; - } - - /** - * Get the serviceConsoleUrl property: The URL of the Service Console for the Autonomous Database. - * - * @return the serviceConsoleUrl value. - */ - @Override - public String serviceConsoleUrl() { - return this.serviceConsoleUrl; - } - - /** - * Get the sqlWebDeveloperUrl property: The SQL Web Developer URL for the Oracle Autonomous Database. - * - * @return the sqlWebDeveloperUrl value. - */ - @Override - public String sqlWebDeveloperUrl() { - return this.sqlWebDeveloperUrl; - } - - /** - * Get the supportedRegionsToCloneTo property: The list of regions that support the creation of an Autonomous - * Database clone or an Autonomous Data Guard standby database. - * - * @return the supportedRegionsToCloneTo value. - */ - @Override - public List supportedRegionsToCloneTo() { - return this.supportedRegionsToCloneTo; - } - - /** - * Get the timeDataGuardRoleChanged property: The date and time the Autonomous Data Guard role was switched for the - * Autonomous Database. - * - * @return the timeDataGuardRoleChanged value. - */ - @Override - public String timeDataGuardRoleChanged() { - return this.timeDataGuardRoleChanged; - } - - /** - * Get the timeDeletionOfFreeAutonomousDatabase property: The date and time the Always Free database will be - * automatically deleted because of inactivity. - * - * @return the timeDeletionOfFreeAutonomousDatabase value. - */ - @Override - public String timeDeletionOfFreeAutonomousDatabase() { - return this.timeDeletionOfFreeAutonomousDatabase; - } - - /** - * Get the timeLocalDataGuardEnabled property: The date and time that Autonomous Data Guard was enabled for an - * Autonomous Database where the standby was provisioned in the same region as the primary database. - * - * @return the timeLocalDataGuardEnabled value. - */ - @Override - public String timeLocalDataGuardEnabled() { - return this.timeLocalDataGuardEnabled; - } - - /** - * Get the timeOfLastFailover property: The timestamp of the last failover operation. - * - * @return the timeOfLastFailover value. - */ - @Override - public String timeOfLastFailover() { - return this.timeOfLastFailover; - } - - /** - * Get the timeOfLastRefresh property: The date and time when last refresh happened. - * - * @return the timeOfLastRefresh value. - */ - @Override - public String timeOfLastRefresh() { - return this.timeOfLastRefresh; - } - - /** - * Get the timeOfLastRefreshPoint property: The refresh point timestamp (UTC). - * - * @return the timeOfLastRefreshPoint value. - */ - @Override - public String timeOfLastRefreshPoint() { - return this.timeOfLastRefreshPoint; - } - - /** - * Get the timeOfLastSwitchover property: The timestamp of the last switchover operation for the Autonomous - * Database. - * - * @return the timeOfLastSwitchover value. - */ - @Override - public String timeOfLastSwitchover() { - return this.timeOfLastSwitchover; - } - - /** - * Get the timeReclamationOfFreeAutonomousDatabase property: The date and time the Always Free database will be - * stopped because of inactivity. - * - * @return the timeReclamationOfFreeAutonomousDatabase value. - */ - @Override - public String timeReclamationOfFreeAutonomousDatabase() { - return this.timeReclamationOfFreeAutonomousDatabase; - } - - /** - * Get the usedDataStorageSizeInGbs property: The storage space consumed by Autonomous Database in GBs. - * - * @return the usedDataStorageSizeInGbs value. - */ - @Override - public Integer usedDataStorageSizeInGbs() { - return this.usedDataStorageSizeInGbs; - } - - /** - * Get the usedDataStorageSizeInTbs property: The amount of storage that has been used, in terabytes. - * - * @return the usedDataStorageSizeInTbs value. - */ - @Override - public Integer usedDataStorageSizeInTbs() { - return this.usedDataStorageSizeInTbs; - } - - /** - * Get the ocid property: Database ocid. - * - * @return the ocid value. - */ - @Override - public String ocid() { - return this.ocid; - } - /** * {@inheritDoc} */ @@ -873,7 +244,7 @@ public AutonomousDatabaseCloneProperties withCharacterSet(String characterSet) { * {@inheritDoc} */ @Override - public AutonomousDatabaseCloneProperties withComputeCount(Float computeCount) { + public AutonomousDatabaseCloneProperties withComputeCount(Double computeCount) { super.withComputeCount(computeCount); return this; } @@ -1159,7 +530,6 @@ public AutonomousDatabaseCloneProperties withWhitelistedIps(List whiteli */ @Override public void validate() { - super.validate(); if (sourceId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -1170,6 +540,30 @@ public void validate() { .log(new IllegalArgumentException( "Missing required property cloneType in model AutonomousDatabaseCloneProperties")); } + if (customerContacts() != null) { + customerContacts().forEach(e -> e.validate()); + } + if (remoteDisasterRecoveryConfiguration() != null) { + remoteDisasterRecoveryConfiguration().validate(); + } + if (localStandbyDb() != null) { + localStandbyDb().validate(); + } + if (scheduledOperations() != null) { + scheduledOperations().validate(); + } + if (apexDetails() != null) { + apexDetails().validate(); + } + if (connectionStrings() != null) { + connectionStrings().validate(); + } + if (connectionUrls() != null) { + connectionUrls().validate(); + } + if (longTermBackupSchedule() != null) { + longTermBackupSchedule().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseCloneProperties.class); @@ -1254,7 +648,7 @@ public static AutonomousDatabaseCloneProperties fromJson(JsonReader jsonReader) deserializedAutonomousDatabaseCloneProperties.withCharacterSet(reader.getString()); } else if ("computeCount".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties - .withComputeCount(reader.getNullable(JsonReader::getFloat)); + .withComputeCount(reader.getNullable(JsonReader::getDouble)); } else if ("computeModel".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withComputeModel(ComputeModel.fromString(reader.getString())); @@ -1286,24 +680,30 @@ public static AutonomousDatabaseCloneProperties fromJson(JsonReader jsonReader) .withIsAutoScalingForStorageEnabled(reader.getNullable(JsonReader::getBoolean)); } else if ("peerDbIds".equals(fieldName)) { List peerDbIds = reader.readArray(reader1 -> reader1.getString()); - deserializedAutonomousDatabaseCloneProperties.peerDbIds = peerDbIds; + deserializedAutonomousDatabaseCloneProperties.withPeerDbIds(peerDbIds); } else if ("peerDbId".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties.withPeerDbId(reader.getString()); } else if ("isLocalDataGuardEnabled".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withIsLocalDataGuardEnabled(reader.getNullable(JsonReader::getBoolean)); } else if ("isRemoteDataGuardEnabled".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.isRemoteDataGuardEnabled - = reader.getNullable(JsonReader::getBoolean); + deserializedAutonomousDatabaseCloneProperties + .withIsRemoteDataGuardEnabled(reader.getNullable(JsonReader::getBoolean)); } else if ("localDisasterRecoveryType".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.localDisasterRecoveryType - = DisasterRecoveryType.fromString(reader.getString()); + deserializedAutonomousDatabaseCloneProperties + .withLocalDisasterRecoveryType(DisasterRecoveryType.fromString(reader.getString())); + } else if ("timeDisasterRecoveryRoleChanged".equals(fieldName)) { + deserializedAutonomousDatabaseCloneProperties.withTimeDisasterRecoveryRoleChanged(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("remoteDisasterRecoveryConfiguration".equals(fieldName)) { + deserializedAutonomousDatabaseCloneProperties + .withRemoteDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails.fromJson(reader)); } else if ("localStandbyDb".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.localStandbyDb - = AutonomousDatabaseStandbySummary.fromJson(reader); + deserializedAutonomousDatabaseCloneProperties + .withLocalStandbyDb(AutonomousDatabaseStandbySummary.fromJson(reader)); } else if ("failedDataRecoveryInSeconds".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.failedDataRecoveryInSeconds - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseCloneProperties + .withFailedDataRecoveryInSeconds(reader.getNullable(JsonReader::getInt)); } else if ("isMtlsConnectionRequired".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withIsMtlsConnectionRequired(reader.getNullable(JsonReader::getBoolean)); @@ -1316,13 +716,13 @@ public static AutonomousDatabaseCloneProperties fromJson(JsonReader jsonReader) } else if ("ncharacterSet".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties.withNcharacterSet(reader.getString()); } else if ("lifecycleDetails".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.lifecycleDetails = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withLifecycleDetails(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.provisioningState - = AzureResourceProvisioningState.fromString(reader.getString()); + deserializedAutonomousDatabaseCloneProperties + .withProvisioningState(AzureResourceProvisioningState.fromString(reader.getString())); } else if ("lifecycleState".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.lifecycleState - = AutonomousDatabaseLifecycleState.fromString(reader.getString()); + deserializedAutonomousDatabaseCloneProperties + .withLifecycleState(AutonomousDatabaseLifecycleState.fromString(reader.getString())); } else if ("scheduledOperations".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withScheduledOperations(ScheduledOperationsType.fromJson(reader)); @@ -1331,111 +731,114 @@ public static AutonomousDatabaseCloneProperties fromJson(JsonReader jsonReader) } else if ("privateEndpointLabel".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties.withPrivateEndpointLabel(reader.getString()); } else if ("ociUrl".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.ociUrl = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withOciUrl(reader.getString()); } else if ("subnetId".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties.withSubnetId(reader.getString()); } else if ("vnetId".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties.withVnetId(reader.getString()); } else if ("timeCreated".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeCreated = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAutonomousDatabaseCloneProperties.withTimeCreated(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("timeMaintenanceBegin".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeMaintenanceBegin = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAutonomousDatabaseCloneProperties.withTimeMaintenanceBegin(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("timeMaintenanceEnd".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeMaintenanceEnd = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAutonomousDatabaseCloneProperties.withTimeMaintenanceEnd(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("actualUsedDataStorageSizeInTbs".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.actualUsedDataStorageSizeInTbs - = reader.getNullable(JsonReader::getDouble); + deserializedAutonomousDatabaseCloneProperties + .withActualUsedDataStorageSizeInTbs(reader.getNullable(JsonReader::getDouble)); } else if ("allocatedStorageSizeInTbs".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.allocatedStorageSizeInTbs - = reader.getNullable(JsonReader::getDouble); + deserializedAutonomousDatabaseCloneProperties + .withAllocatedStorageSizeInTbs(reader.getNullable(JsonReader::getDouble)); } else if ("apexDetails".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.apexDetails = ApexDetailsType.fromJson(reader); + deserializedAutonomousDatabaseCloneProperties.withApexDetails(ApexDetailsType.fromJson(reader)); } else if ("availableUpgradeVersions".equals(fieldName)) { List availableUpgradeVersions = reader.readArray(reader1 -> reader1.getString()); - deserializedAutonomousDatabaseCloneProperties.availableUpgradeVersions = availableUpgradeVersions; + deserializedAutonomousDatabaseCloneProperties + .withAvailableUpgradeVersions(availableUpgradeVersions); } else if ("connectionStrings".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.connectionStrings - = ConnectionStringType.fromJson(reader); + deserializedAutonomousDatabaseCloneProperties + .withConnectionStrings(ConnectionStringType.fromJson(reader)); } else if ("connectionUrls".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.connectionUrls = ConnectionUrlType.fromJson(reader); + deserializedAutonomousDatabaseCloneProperties + .withConnectionUrls(ConnectionUrlType.fromJson(reader)); } else if ("dataSafeStatus".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.dataSafeStatus - = DataSafeStatusType.fromString(reader.getString()); + deserializedAutonomousDatabaseCloneProperties + .withDataSafeStatus(DataSafeStatusType.fromString(reader.getString())); } else if ("databaseEdition".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withDatabaseEdition(DatabaseEditionType.fromString(reader.getString())); } else if ("autonomousDatabaseId".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties.withAutonomousDatabaseId(reader.getString()); } else if ("inMemoryAreaInGbs".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.inMemoryAreaInGbs - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseCloneProperties + .withInMemoryAreaInGbs(reader.getNullable(JsonReader::getInt)); } else if ("nextLongTermBackupTimeStamp".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.nextLongTermBackupTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAutonomousDatabaseCloneProperties.withNextLongTermBackupTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("longTermBackupSchedule".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withLongTermBackupSchedule(LongTermBackUpScheduleDetails.fromJson(reader)); } else if ("isPreview".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.isPreview - = reader.getNullable(JsonReader::getBoolean); + deserializedAutonomousDatabaseCloneProperties + .withIsPreview(reader.getNullable(JsonReader::getBoolean)); } else if ("localAdgAutoFailoverMaxDataLossLimit".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withLocalAdgAutoFailoverMaxDataLossLimit(reader.getNullable(JsonReader::getInt)); } else if ("memoryPerOracleComputeUnitInGbs".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.memoryPerOracleComputeUnitInGbs - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseCloneProperties + .withMemoryPerOracleComputeUnitInGbs(reader.getNullable(JsonReader::getInt)); } else if ("openMode".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withOpenMode(OpenModeType.fromString(reader.getString())); } else if ("operationsInsightsStatus".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.operationsInsightsStatus - = OperationsInsightsStatusType.fromString(reader.getString()); + deserializedAutonomousDatabaseCloneProperties + .withOperationsInsightsStatus(OperationsInsightsStatusType.fromString(reader.getString())); } else if ("permissionLevel".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withPermissionLevel(PermissionLevelType.fromString(reader.getString())); } else if ("privateEndpoint".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.privateEndpoint = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withPrivateEndpoint(reader.getString()); } else if ("provisionableCpus".equals(fieldName)) { List provisionableCpus = reader.readArray(reader1 -> reader1.getInt()); - deserializedAutonomousDatabaseCloneProperties.provisionableCpus = provisionableCpus; + deserializedAutonomousDatabaseCloneProperties.withProvisionableCpus(provisionableCpus); } else if ("role".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties.withRole(RoleType.fromString(reader.getString())); } else if ("serviceConsoleUrl".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.serviceConsoleUrl = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withServiceConsoleUrl(reader.getString()); } else if ("sqlWebDeveloperUrl".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.sqlWebDeveloperUrl = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withSqlWebDeveloperUrl(reader.getString()); } else if ("supportedRegionsToCloneTo".equals(fieldName)) { List supportedRegionsToCloneTo = reader.readArray(reader1 -> reader1.getString()); - deserializedAutonomousDatabaseCloneProperties.supportedRegionsToCloneTo = supportedRegionsToCloneTo; + deserializedAutonomousDatabaseCloneProperties + .withSupportedRegionsToCloneTo(supportedRegionsToCloneTo); } else if ("timeDataGuardRoleChanged".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeDataGuardRoleChanged = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withTimeDataGuardRoleChanged(reader.getString()); } else if ("timeDeletionOfFreeAutonomousDatabase".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeDeletionOfFreeAutonomousDatabase - = reader.getString(); + deserializedAutonomousDatabaseCloneProperties + .withTimeDeletionOfFreeAutonomousDatabase(reader.getString()); } else if ("timeLocalDataGuardEnabled".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeLocalDataGuardEnabled = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withTimeLocalDataGuardEnabled(reader.getString()); } else if ("timeOfLastFailover".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeOfLastFailover = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withTimeOfLastFailover(reader.getString()); } else if ("timeOfLastRefresh".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeOfLastRefresh = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withTimeOfLastRefresh(reader.getString()); } else if ("timeOfLastRefreshPoint".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeOfLastRefreshPoint = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withTimeOfLastRefreshPoint(reader.getString()); } else if ("timeOfLastSwitchover".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeOfLastSwitchover = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withTimeOfLastSwitchover(reader.getString()); } else if ("timeReclamationOfFreeAutonomousDatabase".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.timeReclamationOfFreeAutonomousDatabase - = reader.getString(); + deserializedAutonomousDatabaseCloneProperties + .withTimeReclamationOfFreeAutonomousDatabase(reader.getString()); } else if ("usedDataStorageSizeInGbs".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.usedDataStorageSizeInGbs - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseCloneProperties + .withUsedDataStorageSizeInGbs(reader.getNullable(JsonReader::getInt)); } else if ("usedDataStorageSizeInTbs".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.usedDataStorageSizeInTbs - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseCloneProperties + .withUsedDataStorageSizeInTbs(reader.getNullable(JsonReader::getInt)); } else if ("ocid".equals(fieldName)) { - deserializedAutonomousDatabaseCloneProperties.ocid = reader.getString(); + deserializedAutonomousDatabaseCloneProperties.withOcid(reader.getString()); } else if ("backupRetentionPeriodInDays".equals(fieldName)) { deserializedAutonomousDatabaseCloneProperties .withBackupRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.java new file mode 100644 index 000000000000..a89c9224ee02 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.java @@ -0,0 +1,900 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Autonomous Database Cross Region Disaster Recovery resource model. + */ +@Fluent +public final class AutonomousDatabaseCrossRegionDisasterRecoveryProperties extends AutonomousDatabaseBaseProperties { + /* + * Database type to be created. + */ + private DataBaseType dataBaseType = DataBaseType.CROSS_REGION_DISASTER_RECOVERY; + + /* + * The source of the database. + */ + private final SourceType source = SourceType.CROSS_REGION_DISASTER_RECOVERY; + + /* + * The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR + * association. + */ + private String sourceId; + + /* + * The name of the region where source Autonomous Database exists. + */ + private String sourceLocation; + + /* + * The source database ocid + */ + private String sourceOcid; + + /* + * Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. + * Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) + * during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or + * switchover. + */ + private DisasterRecoveryType remoteDisasterRecoveryType; + + /* + * If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between + * Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + */ + private Boolean isReplicateAutomaticBackups; + + /** + * Creates an instance of AutonomousDatabaseCrossRegionDisasterRecoveryProperties class. + */ + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties() { + } + + /** + * Get the dataBaseType property: Database type to be created. + * + * @return the dataBaseType value. + */ + @Override + public DataBaseType dataBaseType() { + return this.dataBaseType; + } + + /** + * Get the source property: The source of the database. + * + * @return the source value. + */ + public SourceType source() { + return this.source; + } + + /** + * Get the sourceId property: The Azure ID of the source Autonomous Database that will be used to create a new peer + * database for the DR association. + * + * @return the sourceId value. + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set the sourceId property: The Azure ID of the source Autonomous Database that will be used to create a new peer + * database for the DR association. + * + * @param sourceId the sourceId value to set. + * @return the AutonomousDatabaseCrossRegionDisasterRecoveryProperties object itself. + */ + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get the sourceLocation property: The name of the region where source Autonomous Database exists. + * + * @return the sourceLocation value. + */ + public String sourceLocation() { + return this.sourceLocation; + } + + /** + * Set the sourceLocation property: The name of the region where source Autonomous Database exists. + * + * @param sourceLocation the sourceLocation value to set. + * @return the AutonomousDatabaseCrossRegionDisasterRecoveryProperties object itself. + */ + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withSourceLocation(String sourceLocation) { + this.sourceLocation = sourceLocation; + return this; + } + + /** + * Get the sourceOcid property: The source database ocid. + * + * @return the sourceOcid value. + */ + public String sourceOcid() { + return this.sourceOcid; + } + + /** + * Set the sourceOcid property: The source database ocid. + * + * @param sourceOcid the sourceOcid value to set. + * @return the AutonomousDatabaseCrossRegionDisasterRecoveryProperties object itself. + */ + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withSourceOcid(String sourceOcid) { + this.sourceOcid = sourceOcid; + return this; + } + + /** + * Get the remoteDisasterRecoveryType property: Indicates the cross-region disaster recovery (DR) type of the + * standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical + * DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower + * cost DR with a slower RTO during failover or switchover. + * + * @return the remoteDisasterRecoveryType value. + */ + public DisasterRecoveryType remoteDisasterRecoveryType() { + return this.remoteDisasterRecoveryType; + } + + /** + * Set the remoteDisasterRecoveryType property: Indicates the cross-region disaster recovery (DR) type of the + * standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical + * DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower + * cost DR with a slower RTO during failover or switchover. + * + * @param remoteDisasterRecoveryType the remoteDisasterRecoveryType value to set. + * @return the AutonomousDatabaseCrossRegionDisasterRecoveryProperties object itself. + */ + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withRemoteDisasterRecoveryType(DisasterRecoveryType remoteDisasterRecoveryType) { + this.remoteDisasterRecoveryType = remoteDisasterRecoveryType; + return this; + } + + /** + * Get the isReplicateAutomaticBackups property: If true, 7 days worth of backups are replicated across regions for + * Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are + * not replicated to the Standby database. + * + * @return the isReplicateAutomaticBackups value. + */ + public Boolean isReplicateAutomaticBackups() { + return this.isReplicateAutomaticBackups; + } + + /** + * Set the isReplicateAutomaticBackups property: If true, 7 days worth of backups are replicated across regions for + * Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are + * not replicated to the Standby database. + * + * @param isReplicateAutomaticBackups the isReplicateAutomaticBackups value to set. + * @return the AutonomousDatabaseCrossRegionDisasterRecoveryProperties object itself. + */ + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withIsReplicateAutomaticBackups(Boolean isReplicateAutomaticBackups) { + this.isReplicateAutomaticBackups = isReplicateAutomaticBackups; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withAdminPassword(String adminPassword) { + super.withAdminPassword(adminPassword); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType) { + super.withAutonomousMaintenanceScheduleType(autonomousMaintenanceScheduleType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withCharacterSet(String characterSet) { + super.withCharacterSet(characterSet); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withComputeCount(Double computeCount) { + super.withComputeCount(computeCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withComputeModel(ComputeModel computeModel) { + super.withComputeModel(computeModel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withCpuCoreCount(Integer cpuCoreCount) { + super.withCpuCoreCount(cpuCoreCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withCustomerContacts(List customerContacts) { + super.withCustomerContacts(customerContacts); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withDataStorageSizeInTbs(Integer dataStorageSizeInTbs) { + super.withDataStorageSizeInTbs(dataStorageSizeInTbs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withDataStorageSizeInGbs(Integer dataStorageSizeInGbs) { + super.withDataStorageSizeInGbs(dataStorageSizeInGbs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withDbVersion(String dbVersion) { + super.withDbVersion(dbVersion); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withDbWorkload(WorkloadType dbWorkload) { + super.withDbWorkload(dbWorkload); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withIsAutoScalingEnabled(Boolean isAutoScalingEnabled) { + super.withIsAutoScalingEnabled(isAutoScalingEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withIsAutoScalingForStorageEnabled(Boolean isAutoScalingForStorageEnabled) { + super.withIsAutoScalingForStorageEnabled(isAutoScalingForStorageEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withPeerDbId(String peerDbId) { + super.withPeerDbId(peerDbId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withIsLocalDataGuardEnabled(Boolean isLocalDataGuardEnabled) { + super.withIsLocalDataGuardEnabled(isLocalDataGuardEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withIsMtlsConnectionRequired(Boolean isMtlsConnectionRequired) { + super.withIsMtlsConnectionRequired(isMtlsConnectionRequired); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withIsPreviewVersionWithServiceTermsAccepted(Boolean isPreviewVersionWithServiceTermsAccepted) { + super.withIsPreviewVersionWithServiceTermsAccepted(isPreviewVersionWithServiceTermsAccepted); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withLicenseModel(LicenseModel licenseModel) { + super.withLicenseModel(licenseModel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withNcharacterSet(String ncharacterSet) { + super.withNcharacterSet(ncharacterSet); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withScheduledOperations(ScheduledOperationsType scheduledOperations) { + super.withScheduledOperations(scheduledOperations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withPrivateEndpointIp(String privateEndpointIp) { + super.withPrivateEndpointIp(privateEndpointIp); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withPrivateEndpointLabel(String privateEndpointLabel) { + super.withPrivateEndpointLabel(privateEndpointLabel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withSubnetId(String subnetId) { + super.withSubnetId(subnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withVnetId(String vnetId) { + super.withVnetId(vnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withDatabaseEdition(DatabaseEditionType databaseEdition) { + super.withDatabaseEdition(databaseEdition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withAutonomousDatabaseId(String autonomousDatabaseId) { + super.withAutonomousDatabaseId(autonomousDatabaseId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withLongTermBackupSchedule(LongTermBackUpScheduleDetails longTermBackupSchedule) { + super.withLongTermBackupSchedule(longTermBackupSchedule); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withLocalAdgAutoFailoverMaxDataLossLimit(Integer localAdgAutoFailoverMaxDataLossLimit) { + super.withLocalAdgAutoFailoverMaxDataLossLimit(localAdgAutoFailoverMaxDataLossLimit); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withOpenMode(OpenModeType openMode) { + super.withOpenMode(openMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withPermissionLevel(PermissionLevelType permissionLevel) { + super.withPermissionLevel(permissionLevel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withRole(RoleType role) { + super.withRole(role); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties + withBackupRetentionPeriodInDays(Integer backupRetentionPeriodInDays) { + super.withBackupRetentionPeriodInDays(backupRetentionPeriodInDays); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties withWhitelistedIps(List whitelistedIps) { + super.withWhitelistedIps(whitelistedIps); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (sourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sourceId in model AutonomousDatabaseCrossRegionDisasterRecoveryProperties")); + } + if (remoteDisasterRecoveryType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property remoteDisasterRecoveryType in model AutonomousDatabaseCrossRegionDisasterRecoveryProperties")); + } + if (customerContacts() != null) { + customerContacts().forEach(e -> e.validate()); + } + if (remoteDisasterRecoveryConfiguration() != null) { + remoteDisasterRecoveryConfiguration().validate(); + } + if (localStandbyDb() != null) { + localStandbyDb().validate(); + } + if (scheduledOperations() != null) { + scheduledOperations().validate(); + } + if (apexDetails() != null) { + apexDetails().validate(); + } + if (connectionStrings() != null) { + connectionStrings().validate(); + } + if (connectionUrls() != null) { + connectionUrls().validate(); + } + if (longTermBackupSchedule() != null) { + longTermBackupSchedule().validate(); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(AutonomousDatabaseCrossRegionDisasterRecoveryProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("adminPassword", adminPassword()); + jsonWriter.writeStringField("autonomousMaintenanceScheduleType", + autonomousMaintenanceScheduleType() == null ? null : autonomousMaintenanceScheduleType().toString()); + jsonWriter.writeStringField("characterSet", characterSet()); + jsonWriter.writeNumberField("computeCount", computeCount()); + jsonWriter.writeStringField("computeModel", computeModel() == null ? null : computeModel().toString()); + jsonWriter.writeNumberField("cpuCoreCount", cpuCoreCount()); + jsonWriter.writeArrayField("customerContacts", customerContacts(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("dataStorageSizeInTbs", dataStorageSizeInTbs()); + jsonWriter.writeNumberField("dataStorageSizeInGbs", dataStorageSizeInGbs()); + jsonWriter.writeStringField("dbVersion", dbVersion()); + jsonWriter.writeStringField("dbWorkload", dbWorkload() == null ? null : dbWorkload().toString()); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeBooleanField("isAutoScalingEnabled", isAutoScalingEnabled()); + jsonWriter.writeBooleanField("isAutoScalingForStorageEnabled", isAutoScalingForStorageEnabled()); + jsonWriter.writeStringField("peerDbId", peerDbId()); + jsonWriter.writeBooleanField("isLocalDataGuardEnabled", isLocalDataGuardEnabled()); + jsonWriter.writeBooleanField("isMtlsConnectionRequired", isMtlsConnectionRequired()); + jsonWriter.writeBooleanField("isPreviewVersionWithServiceTermsAccepted", + isPreviewVersionWithServiceTermsAccepted()); + jsonWriter.writeStringField("licenseModel", licenseModel() == null ? null : licenseModel().toString()); + jsonWriter.writeStringField("ncharacterSet", ncharacterSet()); + jsonWriter.writeJsonField("scheduledOperations", scheduledOperations()); + jsonWriter.writeStringField("privateEndpointIp", privateEndpointIp()); + jsonWriter.writeStringField("privateEndpointLabel", privateEndpointLabel()); + jsonWriter.writeStringField("subnetId", subnetId()); + jsonWriter.writeStringField("vnetId", vnetId()); + jsonWriter.writeStringField("databaseEdition", databaseEdition() == null ? null : databaseEdition().toString()); + jsonWriter.writeStringField("autonomousDatabaseId", autonomousDatabaseId()); + jsonWriter.writeJsonField("longTermBackupSchedule", longTermBackupSchedule()); + jsonWriter.writeNumberField("localAdgAutoFailoverMaxDataLossLimit", localAdgAutoFailoverMaxDataLossLimit()); + jsonWriter.writeStringField("openMode", openMode() == null ? null : openMode().toString()); + jsonWriter.writeStringField("permissionLevel", permissionLevel() == null ? null : permissionLevel().toString()); + jsonWriter.writeStringField("role", role() == null ? null : role().toString()); + jsonWriter.writeNumberField("backupRetentionPeriodInDays", backupRetentionPeriodInDays()); + jsonWriter.writeArrayField("whitelistedIps", whitelistedIps(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("source", this.source == null ? null : this.source.toString()); + jsonWriter.writeStringField("sourceId", this.sourceId); + jsonWriter.writeStringField("remoteDisasterRecoveryType", + this.remoteDisasterRecoveryType == null ? null : this.remoteDisasterRecoveryType.toString()); + jsonWriter.writeStringField("dataBaseType", this.dataBaseType == null ? null : this.dataBaseType.toString()); + jsonWriter.writeStringField("sourceLocation", this.sourceLocation); + jsonWriter.writeStringField("sourceOcid", this.sourceOcid); + jsonWriter.writeBooleanField("isReplicateAutomaticBackups", this.isReplicateAutomaticBackups); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutonomousDatabaseCrossRegionDisasterRecoveryProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutonomousDatabaseCrossRegionDisasterRecoveryProperties if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AutonomousDatabaseCrossRegionDisasterRecoveryProperties. + */ + public static AutonomousDatabaseCrossRegionDisasterRecoveryProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + AutonomousDatabaseCrossRegionDisasterRecoveryProperties deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + = new AutonomousDatabaseCrossRegionDisasterRecoveryProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adminPassword".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withAdminPassword(reader.getString()); + } else if ("autonomousMaintenanceScheduleType".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withAutonomousMaintenanceScheduleType( + AutonomousMaintenanceScheduleType.fromString(reader.getString())); + } else if ("characterSet".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withCharacterSet(reader.getString()); + } else if ("computeCount".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withComputeCount(reader.getNullable(JsonReader::getDouble)); + } else if ("computeModel".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withComputeModel(ComputeModel.fromString(reader.getString())); + } else if ("cpuCoreCount".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withCpuCoreCount(reader.getNullable(JsonReader::getInt)); + } else if ("customerContacts".equals(fieldName)) { + List customerContacts + = reader.readArray(reader1 -> CustomerContact.fromJson(reader1)); + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withCustomerContacts(customerContacts); + } else if ("dataStorageSizeInTbs".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withDataStorageSizeInTbs(reader.getNullable(JsonReader::getInt)); + } else if ("dataStorageSizeInGbs".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withDataStorageSizeInGbs(reader.getNullable(JsonReader::getInt)); + } else if ("dbVersion".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withDbVersion(reader.getString()); + } else if ("dbWorkload".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withDbWorkload(WorkloadType.fromString(reader.getString())); + } else if ("displayName".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withDisplayName(reader.getString()); + } else if ("isAutoScalingEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withIsAutoScalingEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("isAutoScalingForStorageEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withIsAutoScalingForStorageEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("peerDbIds".equals(fieldName)) { + List peerDbIds = reader.readArray(reader1 -> reader1.getString()); + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.withPeerDbIds(peerDbIds); + } else if ("peerDbId".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withPeerDbId(reader.getString()); + } else if ("isLocalDataGuardEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withIsLocalDataGuardEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("isRemoteDataGuardEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withIsRemoteDataGuardEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("localDisasterRecoveryType".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withLocalDisasterRecoveryType(DisasterRecoveryType.fromString(reader.getString())); + } else if ("timeDisasterRecoveryRoleChanged".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeDisasterRecoveryRoleChanged(reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("remoteDisasterRecoveryConfiguration".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withRemoteDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails.fromJson(reader)); + } else if ("localStandbyDb".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withLocalStandbyDb(AutonomousDatabaseStandbySummary.fromJson(reader)); + } else if ("failedDataRecoveryInSeconds".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withFailedDataRecoveryInSeconds(reader.getNullable(JsonReader::getInt)); + } else if ("isMtlsConnectionRequired".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withIsMtlsConnectionRequired(reader.getNullable(JsonReader::getBoolean)); + } else if ("isPreviewVersionWithServiceTermsAccepted".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withIsPreviewVersionWithServiceTermsAccepted(reader.getNullable(JsonReader::getBoolean)); + } else if ("licenseModel".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withLicenseModel(LicenseModel.fromString(reader.getString())); + } else if ("ncharacterSet".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withNcharacterSet(reader.getString()); + } else if ("lifecycleDetails".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withLifecycleDetails(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withProvisioningState(AzureResourceProvisioningState.fromString(reader.getString())); + } else if ("lifecycleState".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withLifecycleState(AutonomousDatabaseLifecycleState.fromString(reader.getString())); + } else if ("scheduledOperations".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withScheduledOperations(ScheduledOperationsType.fromJson(reader)); + } else if ("privateEndpointIp".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withPrivateEndpointIp(reader.getString()); + } else if ("privateEndpointLabel".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withPrivateEndpointLabel(reader.getString()); + } else if ("ociUrl".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.withOciUrl(reader.getString()); + } else if ("subnetId".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withSubnetId(reader.getString()); + } else if ("vnetId".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.withVnetId(reader.getString()); + } else if ("timeCreated".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.withTimeCreated(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("timeMaintenanceBegin".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.withTimeMaintenanceBegin(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("timeMaintenanceEnd".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.withTimeMaintenanceEnd(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("actualUsedDataStorageSizeInTbs".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withActualUsedDataStorageSizeInTbs(reader.getNullable(JsonReader::getDouble)); + } else if ("allocatedStorageSizeInTbs".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withAllocatedStorageSizeInTbs(reader.getNullable(JsonReader::getDouble)); + } else if ("apexDetails".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withApexDetails(ApexDetailsType.fromJson(reader)); + } else if ("availableUpgradeVersions".equals(fieldName)) { + List availableUpgradeVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withAvailableUpgradeVersions(availableUpgradeVersions); + } else if ("connectionStrings".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withConnectionStrings(ConnectionStringType.fromJson(reader)); + } else if ("connectionUrls".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withConnectionUrls(ConnectionUrlType.fromJson(reader)); + } else if ("dataSafeStatus".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withDataSafeStatus(DataSafeStatusType.fromString(reader.getString())); + } else if ("databaseEdition".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withDatabaseEdition(DatabaseEditionType.fromString(reader.getString())); + } else if ("autonomousDatabaseId".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withAutonomousDatabaseId(reader.getString()); + } else if ("inMemoryAreaInGbs".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withInMemoryAreaInGbs(reader.getNullable(JsonReader::getInt)); + } else if ("nextLongTermBackupTimeStamp".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withNextLongTermBackupTimestamp(reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("longTermBackupSchedule".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withLongTermBackupSchedule(LongTermBackUpScheduleDetails.fromJson(reader)); + } else if ("isPreview".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withIsPreview(reader.getNullable(JsonReader::getBoolean)); + } else if ("localAdgAutoFailoverMaxDataLossLimit".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withLocalAdgAutoFailoverMaxDataLossLimit(reader.getNullable(JsonReader::getInt)); + } else if ("memoryPerOracleComputeUnitInGbs".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withMemoryPerOracleComputeUnitInGbs(reader.getNullable(JsonReader::getInt)); + } else if ("openMode".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withOpenMode(OpenModeType.fromString(reader.getString())); + } else if ("operationsInsightsStatus".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withOperationsInsightsStatus(OperationsInsightsStatusType.fromString(reader.getString())); + } else if ("permissionLevel".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withPermissionLevel(PermissionLevelType.fromString(reader.getString())); + } else if ("privateEndpoint".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withPrivateEndpoint(reader.getString()); + } else if ("provisionableCpus".equals(fieldName)) { + List provisionableCpus = reader.readArray(reader1 -> reader1.getInt()); + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withProvisionableCpus(provisionableCpus); + } else if ("role".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withRole(RoleType.fromString(reader.getString())); + } else if ("serviceConsoleUrl".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withServiceConsoleUrl(reader.getString()); + } else if ("sqlWebDeveloperUrl".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withSqlWebDeveloperUrl(reader.getString()); + } else if ("supportedRegionsToCloneTo".equals(fieldName)) { + List supportedRegionsToCloneTo = reader.readArray(reader1 -> reader1.getString()); + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withSupportedRegionsToCloneTo(supportedRegionsToCloneTo); + } else if ("timeDataGuardRoleChanged".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeDataGuardRoleChanged(reader.getString()); + } else if ("timeDeletionOfFreeAutonomousDatabase".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeDeletionOfFreeAutonomousDatabase(reader.getString()); + } else if ("timeLocalDataGuardEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeLocalDataGuardEnabled(reader.getString()); + } else if ("timeOfLastFailover".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeOfLastFailover(reader.getString()); + } else if ("timeOfLastRefresh".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeOfLastRefresh(reader.getString()); + } else if ("timeOfLastRefreshPoint".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeOfLastRefreshPoint(reader.getString()); + } else if ("timeOfLastSwitchover".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeOfLastSwitchover(reader.getString()); + } else if ("timeReclamationOfFreeAutonomousDatabase".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withTimeReclamationOfFreeAutonomousDatabase(reader.getString()); + } else if ("usedDataStorageSizeInGbs".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withUsedDataStorageSizeInGbs(reader.getNullable(JsonReader::getInt)); + } else if ("usedDataStorageSizeInTbs".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withUsedDataStorageSizeInTbs(reader.getNullable(JsonReader::getInt)); + } else if ("ocid".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.withOcid(reader.getString()); + } else if ("backupRetentionPeriodInDays".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withBackupRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); + } else if ("whitelistedIps".equals(fieldName)) { + List whitelistedIps = reader.readArray(reader1 -> reader1.getString()); + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties + .withWhitelistedIps(whitelistedIps); + } else if ("sourceId".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.sourceId = reader.getString(); + } else if ("remoteDisasterRecoveryType".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.remoteDisasterRecoveryType + = DisasterRecoveryType.fromString(reader.getString()); + } else if ("dataBaseType".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.dataBaseType + = DataBaseType.fromString(reader.getString()); + } else if ("sourceLocation".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.sourceLocation + = reader.getString(); + } else if ("sourceOcid".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.sourceOcid = reader.getString(); + } else if ("isReplicateAutomaticBackups".equals(fieldName)) { + deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties.isReplicateAutomaticBackups + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAutonomousDatabaseCrossRegionDisasterRecoveryProperties; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseFromBackupTimestampProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseFromBackupTimestampProperties.java new file mode 100644 index 000000000000..764bafda7ea4 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseFromBackupTimestampProperties.java @@ -0,0 +1,840 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Autonomous Database From Backup Timestamp resource model. + */ +@Fluent +public final class AutonomousDatabaseFromBackupTimestampProperties extends AutonomousDatabaseBaseProperties { + /* + * Database type to be created. + */ + private DataBaseType dataBaseType = DataBaseType.CLONE_FROM_BACKUP_TIMESTAMP; + + /* + * The source of the database. + */ + private final SourceType source = SourceType.BACKUP_FROM_TIMESTAMP; + + /* + * The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + */ + private String sourceId; + + /* + * The Autonomous Database clone type. + */ + private CloneType cloneType; + + /* + * The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in + * the past. + */ + private OffsetDateTime timestamp; + + /* + * Clone from latest available backup timestamp. + */ + private Boolean useLatestAvailableBackupTimeStamp; + + /** + * Creates an instance of AutonomousDatabaseFromBackupTimestampProperties class. + */ + public AutonomousDatabaseFromBackupTimestampProperties() { + } + + /** + * Get the dataBaseType property: Database type to be created. + * + * @return the dataBaseType value. + */ + @Override + public DataBaseType dataBaseType() { + return this.dataBaseType; + } + + /** + * Get the source property: The source of the database. + * + * @return the source value. + */ + public SourceType source() { + return this.source; + } + + /** + * Get the sourceId property: The ID of the source Autonomous Database that you will clone to create a new + * Autonomous Database. + * + * @return the sourceId value. + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set the sourceId property: The ID of the source Autonomous Database that you will clone to create a new + * Autonomous Database. + * + * @param sourceId the sourceId value to set. + * @return the AutonomousDatabaseFromBackupTimestampProperties object itself. + */ + public AutonomousDatabaseFromBackupTimestampProperties withSourceId(String sourceId) { + this.sourceId = sourceId; + return this; + } + + /** + * Get the cloneType property: The Autonomous Database clone type. + * + * @return the cloneType value. + */ + public CloneType cloneType() { + return this.cloneType; + } + + /** + * Set the cloneType property: The Autonomous Database clone type. + * + * @param cloneType the cloneType value to set. + * @return the AutonomousDatabaseFromBackupTimestampProperties object itself. + */ + public AutonomousDatabaseFromBackupTimestampProperties withCloneType(CloneType cloneType) { + this.cloneType = cloneType; + return this; + } + + /** + * Get the timestamp property: The timestamp specified for the point-in-time clone of the source Autonomous + * Database. The timestamp must be in the past. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: The timestamp specified for the point-in-time clone of the source Autonomous + * Database. The timestamp must be in the past. + * + * @param timestamp the timestamp value to set. + * @return the AutonomousDatabaseFromBackupTimestampProperties object itself. + */ + public AutonomousDatabaseFromBackupTimestampProperties withTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the useLatestAvailableBackupTimeStamp property: Clone from latest available backup timestamp. + * + * @return the useLatestAvailableBackupTimeStamp value. + */ + public Boolean useLatestAvailableBackupTimeStamp() { + return this.useLatestAvailableBackupTimeStamp; + } + + /** + * Set the useLatestAvailableBackupTimeStamp property: Clone from latest available backup timestamp. + * + * @param useLatestAvailableBackupTimeStamp the useLatestAvailableBackupTimeStamp value to set. + * @return the AutonomousDatabaseFromBackupTimestampProperties object itself. + */ + public AutonomousDatabaseFromBackupTimestampProperties + withUseLatestAvailableBackupTimeStamp(Boolean useLatestAvailableBackupTimeStamp) { + this.useLatestAvailableBackupTimeStamp = useLatestAvailableBackupTimeStamp; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withAdminPassword(String adminPassword) { + super.withAdminPassword(adminPassword); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType) { + super.withAutonomousMaintenanceScheduleType(autonomousMaintenanceScheduleType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withCharacterSet(String characterSet) { + super.withCharacterSet(characterSet); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withComputeCount(Double computeCount) { + super.withComputeCount(computeCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withComputeModel(ComputeModel computeModel) { + super.withComputeModel(computeModel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withCpuCoreCount(Integer cpuCoreCount) { + super.withCpuCoreCount(cpuCoreCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withCustomerContacts(List customerContacts) { + super.withCustomerContacts(customerContacts); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withDataStorageSizeInTbs(Integer dataStorageSizeInTbs) { + super.withDataStorageSizeInTbs(dataStorageSizeInTbs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withDataStorageSizeInGbs(Integer dataStorageSizeInGbs) { + super.withDataStorageSizeInGbs(dataStorageSizeInGbs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withDbVersion(String dbVersion) { + super.withDbVersion(dbVersion); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withDbWorkload(WorkloadType dbWorkload) { + super.withDbWorkload(dbWorkload); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withIsAutoScalingEnabled(Boolean isAutoScalingEnabled) { + super.withIsAutoScalingEnabled(isAutoScalingEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withIsAutoScalingForStorageEnabled(Boolean isAutoScalingForStorageEnabled) { + super.withIsAutoScalingForStorageEnabled(isAutoScalingForStorageEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withPeerDbId(String peerDbId) { + super.withPeerDbId(peerDbId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withIsLocalDataGuardEnabled(Boolean isLocalDataGuardEnabled) { + super.withIsLocalDataGuardEnabled(isLocalDataGuardEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withIsMtlsConnectionRequired(Boolean isMtlsConnectionRequired) { + super.withIsMtlsConnectionRequired(isMtlsConnectionRequired); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withIsPreviewVersionWithServiceTermsAccepted(Boolean isPreviewVersionWithServiceTermsAccepted) { + super.withIsPreviewVersionWithServiceTermsAccepted(isPreviewVersionWithServiceTermsAccepted); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withLicenseModel(LicenseModel licenseModel) { + super.withLicenseModel(licenseModel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withNcharacterSet(String ncharacterSet) { + super.withNcharacterSet(ncharacterSet); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withScheduledOperations(ScheduledOperationsType scheduledOperations) { + super.withScheduledOperations(scheduledOperations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withPrivateEndpointIp(String privateEndpointIp) { + super.withPrivateEndpointIp(privateEndpointIp); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withPrivateEndpointLabel(String privateEndpointLabel) { + super.withPrivateEndpointLabel(privateEndpointLabel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withSubnetId(String subnetId) { + super.withSubnetId(subnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withVnetId(String vnetId) { + super.withVnetId(vnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withDatabaseEdition(DatabaseEditionType databaseEdition) { + super.withDatabaseEdition(databaseEdition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withAutonomousDatabaseId(String autonomousDatabaseId) { + super.withAutonomousDatabaseId(autonomousDatabaseId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withLongTermBackupSchedule(LongTermBackUpScheduleDetails longTermBackupSchedule) { + super.withLongTermBackupSchedule(longTermBackupSchedule); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withLocalAdgAutoFailoverMaxDataLossLimit(Integer localAdgAutoFailoverMaxDataLossLimit) { + super.withLocalAdgAutoFailoverMaxDataLossLimit(localAdgAutoFailoverMaxDataLossLimit); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withOpenMode(OpenModeType openMode) { + super.withOpenMode(openMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withPermissionLevel(PermissionLevelType permissionLevel) { + super.withPermissionLevel(permissionLevel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withRole(RoleType role) { + super.withRole(role); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties + withBackupRetentionPeriodInDays(Integer backupRetentionPeriodInDays) { + super.withBackupRetentionPeriodInDays(backupRetentionPeriodInDays); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseFromBackupTimestampProperties withWhitelistedIps(List whitelistedIps) { + super.withWhitelistedIps(whitelistedIps); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (sourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sourceId in model AutonomousDatabaseFromBackupTimestampProperties")); + } + if (cloneType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property cloneType in model AutonomousDatabaseFromBackupTimestampProperties")); + } + if (customerContacts() != null) { + customerContacts().forEach(e -> e.validate()); + } + if (remoteDisasterRecoveryConfiguration() != null) { + remoteDisasterRecoveryConfiguration().validate(); + } + if (localStandbyDb() != null) { + localStandbyDb().validate(); + } + if (scheduledOperations() != null) { + scheduledOperations().validate(); + } + if (apexDetails() != null) { + apexDetails().validate(); + } + if (connectionStrings() != null) { + connectionStrings().validate(); + } + if (connectionUrls() != null) { + connectionUrls().validate(); + } + if (longTermBackupSchedule() != null) { + longTermBackupSchedule().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseFromBackupTimestampProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("adminPassword", adminPassword()); + jsonWriter.writeStringField("autonomousMaintenanceScheduleType", + autonomousMaintenanceScheduleType() == null ? null : autonomousMaintenanceScheduleType().toString()); + jsonWriter.writeStringField("characterSet", characterSet()); + jsonWriter.writeNumberField("computeCount", computeCount()); + jsonWriter.writeStringField("computeModel", computeModel() == null ? null : computeModel().toString()); + jsonWriter.writeNumberField("cpuCoreCount", cpuCoreCount()); + jsonWriter.writeArrayField("customerContacts", customerContacts(), + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("dataStorageSizeInTbs", dataStorageSizeInTbs()); + jsonWriter.writeNumberField("dataStorageSizeInGbs", dataStorageSizeInGbs()); + jsonWriter.writeStringField("dbVersion", dbVersion()); + jsonWriter.writeStringField("dbWorkload", dbWorkload() == null ? null : dbWorkload().toString()); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeBooleanField("isAutoScalingEnabled", isAutoScalingEnabled()); + jsonWriter.writeBooleanField("isAutoScalingForStorageEnabled", isAutoScalingForStorageEnabled()); + jsonWriter.writeStringField("peerDbId", peerDbId()); + jsonWriter.writeBooleanField("isLocalDataGuardEnabled", isLocalDataGuardEnabled()); + jsonWriter.writeBooleanField("isMtlsConnectionRequired", isMtlsConnectionRequired()); + jsonWriter.writeBooleanField("isPreviewVersionWithServiceTermsAccepted", + isPreviewVersionWithServiceTermsAccepted()); + jsonWriter.writeStringField("licenseModel", licenseModel() == null ? null : licenseModel().toString()); + jsonWriter.writeStringField("ncharacterSet", ncharacterSet()); + jsonWriter.writeJsonField("scheduledOperations", scheduledOperations()); + jsonWriter.writeStringField("privateEndpointIp", privateEndpointIp()); + jsonWriter.writeStringField("privateEndpointLabel", privateEndpointLabel()); + jsonWriter.writeStringField("subnetId", subnetId()); + jsonWriter.writeStringField("vnetId", vnetId()); + jsonWriter.writeStringField("databaseEdition", databaseEdition() == null ? null : databaseEdition().toString()); + jsonWriter.writeStringField("autonomousDatabaseId", autonomousDatabaseId()); + jsonWriter.writeJsonField("longTermBackupSchedule", longTermBackupSchedule()); + jsonWriter.writeNumberField("localAdgAutoFailoverMaxDataLossLimit", localAdgAutoFailoverMaxDataLossLimit()); + jsonWriter.writeStringField("openMode", openMode() == null ? null : openMode().toString()); + jsonWriter.writeStringField("permissionLevel", permissionLevel() == null ? null : permissionLevel().toString()); + jsonWriter.writeStringField("role", role() == null ? null : role().toString()); + jsonWriter.writeNumberField("backupRetentionPeriodInDays", backupRetentionPeriodInDays()); + jsonWriter.writeArrayField("whitelistedIps", whitelistedIps(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("source", this.source == null ? null : this.source.toString()); + jsonWriter.writeStringField("sourceId", this.sourceId); + jsonWriter.writeStringField("cloneType", this.cloneType == null ? null : this.cloneType.toString()); + jsonWriter.writeStringField("dataBaseType", this.dataBaseType == null ? null : this.dataBaseType.toString()); + jsonWriter.writeStringField("timestamp", + this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); + jsonWriter.writeBooleanField("useLatestAvailableBackupTimeStamp", this.useLatestAvailableBackupTimeStamp); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutonomousDatabaseFromBackupTimestampProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutonomousDatabaseFromBackupTimestampProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AutonomousDatabaseFromBackupTimestampProperties. + */ + public static AutonomousDatabaseFromBackupTimestampProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutonomousDatabaseFromBackupTimestampProperties deserializedAutonomousDatabaseFromBackupTimestampProperties + = new AutonomousDatabaseFromBackupTimestampProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("adminPassword".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withAdminPassword(reader.getString()); + } else if ("autonomousMaintenanceScheduleType".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withAutonomousMaintenanceScheduleType( + AutonomousMaintenanceScheduleType.fromString(reader.getString())); + } else if ("characterSet".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withCharacterSet(reader.getString()); + } else if ("computeCount".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withComputeCount(reader.getNullable(JsonReader::getDouble)); + } else if ("computeModel".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withComputeModel(ComputeModel.fromString(reader.getString())); + } else if ("cpuCoreCount".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withCpuCoreCount(reader.getNullable(JsonReader::getInt)); + } else if ("customerContacts".equals(fieldName)) { + List customerContacts + = reader.readArray(reader1 -> CustomerContact.fromJson(reader1)); + deserializedAutonomousDatabaseFromBackupTimestampProperties.withCustomerContacts(customerContacts); + } else if ("dataStorageSizeInTbs".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withDataStorageSizeInTbs(reader.getNullable(JsonReader::getInt)); + } else if ("dataStorageSizeInGbs".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withDataStorageSizeInGbs(reader.getNullable(JsonReader::getInt)); + } else if ("dbVersion".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withDbVersion(reader.getString()); + } else if ("dbWorkload".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withDbWorkload(WorkloadType.fromString(reader.getString())); + } else if ("displayName".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withDisplayName(reader.getString()); + } else if ("isAutoScalingEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withIsAutoScalingEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("isAutoScalingForStorageEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withIsAutoScalingForStorageEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("peerDbIds".equals(fieldName)) { + List peerDbIds = reader.readArray(reader1 -> reader1.getString()); + deserializedAutonomousDatabaseFromBackupTimestampProperties.withPeerDbIds(peerDbIds); + } else if ("peerDbId".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withPeerDbId(reader.getString()); + } else if ("isLocalDataGuardEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withIsLocalDataGuardEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("isRemoteDataGuardEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withIsRemoteDataGuardEnabled(reader.getNullable(JsonReader::getBoolean)); + } else if ("localDisasterRecoveryType".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withLocalDisasterRecoveryType(DisasterRecoveryType.fromString(reader.getString())); + } else if ("timeDisasterRecoveryRoleChanged".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeDisasterRecoveryRoleChanged(reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("remoteDisasterRecoveryConfiguration".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withRemoteDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails.fromJson(reader)); + } else if ("localStandbyDb".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withLocalStandbyDb(AutonomousDatabaseStandbySummary.fromJson(reader)); + } else if ("failedDataRecoveryInSeconds".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withFailedDataRecoveryInSeconds(reader.getNullable(JsonReader::getInt)); + } else if ("isMtlsConnectionRequired".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withIsMtlsConnectionRequired(reader.getNullable(JsonReader::getBoolean)); + } else if ("isPreviewVersionWithServiceTermsAccepted".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withIsPreviewVersionWithServiceTermsAccepted(reader.getNullable(JsonReader::getBoolean)); + } else if ("licenseModel".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withLicenseModel(LicenseModel.fromString(reader.getString())); + } else if ("ncharacterSet".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withNcharacterSet(reader.getString()); + } else if ("lifecycleDetails".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withLifecycleDetails(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withProvisioningState(AzureResourceProvisioningState.fromString(reader.getString())); + } else if ("lifecycleState".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withLifecycleState(AutonomousDatabaseLifecycleState.fromString(reader.getString())); + } else if ("scheduledOperations".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withScheduledOperations(ScheduledOperationsType.fromJson(reader)); + } else if ("privateEndpointIp".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withPrivateEndpointIp(reader.getString()); + } else if ("privateEndpointLabel".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withPrivateEndpointLabel(reader.getString()); + } else if ("ociUrl".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withOciUrl(reader.getString()); + } else if ("subnetId".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withSubnetId(reader.getString()); + } else if ("vnetId".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withVnetId(reader.getString()); + } else if ("timeCreated".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withTimeCreated(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("timeMaintenanceBegin".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withTimeMaintenanceBegin(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("timeMaintenanceEnd".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withTimeMaintenanceEnd(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("actualUsedDataStorageSizeInTbs".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withActualUsedDataStorageSizeInTbs(reader.getNullable(JsonReader::getDouble)); + } else if ("allocatedStorageSizeInTbs".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withAllocatedStorageSizeInTbs(reader.getNullable(JsonReader::getDouble)); + } else if ("apexDetails".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withApexDetails(ApexDetailsType.fromJson(reader)); + } else if ("availableUpgradeVersions".equals(fieldName)) { + List availableUpgradeVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withAvailableUpgradeVersions(availableUpgradeVersions); + } else if ("connectionStrings".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withConnectionStrings(ConnectionStringType.fromJson(reader)); + } else if ("connectionUrls".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withConnectionUrls(ConnectionUrlType.fromJson(reader)); + } else if ("dataSafeStatus".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withDataSafeStatus(DataSafeStatusType.fromString(reader.getString())); + } else if ("databaseEdition".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withDatabaseEdition(DatabaseEditionType.fromString(reader.getString())); + } else if ("autonomousDatabaseId".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withAutonomousDatabaseId(reader.getString()); + } else if ("inMemoryAreaInGbs".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withInMemoryAreaInGbs(reader.getNullable(JsonReader::getInt)); + } else if ("nextLongTermBackupTimeStamp".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withNextLongTermBackupTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("longTermBackupSchedule".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withLongTermBackupSchedule(LongTermBackUpScheduleDetails.fromJson(reader)); + } else if ("isPreview".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withIsPreview(reader.getNullable(JsonReader::getBoolean)); + } else if ("localAdgAutoFailoverMaxDataLossLimit".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withLocalAdgAutoFailoverMaxDataLossLimit(reader.getNullable(JsonReader::getInt)); + } else if ("memoryPerOracleComputeUnitInGbs".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withMemoryPerOracleComputeUnitInGbs(reader.getNullable(JsonReader::getInt)); + } else if ("openMode".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withOpenMode(OpenModeType.fromString(reader.getString())); + } else if ("operationsInsightsStatus".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withOperationsInsightsStatus(OperationsInsightsStatusType.fromString(reader.getString())); + } else if ("permissionLevel".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withPermissionLevel(PermissionLevelType.fromString(reader.getString())); + } else if ("privateEndpoint".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withPrivateEndpoint(reader.getString()); + } else if ("provisionableCpus".equals(fieldName)) { + List provisionableCpus = reader.readArray(reader1 -> reader1.getInt()); + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withProvisionableCpus(provisionableCpus); + } else if ("role".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withRole(RoleType.fromString(reader.getString())); + } else if ("serviceConsoleUrl".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withServiceConsoleUrl(reader.getString()); + } else if ("sqlWebDeveloperUrl".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withSqlWebDeveloperUrl(reader.getString()); + } else if ("supportedRegionsToCloneTo".equals(fieldName)) { + List supportedRegionsToCloneTo = reader.readArray(reader1 -> reader1.getString()); + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withSupportedRegionsToCloneTo(supportedRegionsToCloneTo); + } else if ("timeDataGuardRoleChanged".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeDataGuardRoleChanged(reader.getString()); + } else if ("timeDeletionOfFreeAutonomousDatabase".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeDeletionOfFreeAutonomousDatabase(reader.getString()); + } else if ("timeLocalDataGuardEnabled".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeLocalDataGuardEnabled(reader.getString()); + } else if ("timeOfLastFailover".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeOfLastFailover(reader.getString()); + } else if ("timeOfLastRefresh".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeOfLastRefresh(reader.getString()); + } else if ("timeOfLastRefreshPoint".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeOfLastRefreshPoint(reader.getString()); + } else if ("timeOfLastSwitchover".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeOfLastSwitchover(reader.getString()); + } else if ("timeReclamationOfFreeAutonomousDatabase".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withTimeReclamationOfFreeAutonomousDatabase(reader.getString()); + } else if ("usedDataStorageSizeInGbs".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withUsedDataStorageSizeInGbs(reader.getNullable(JsonReader::getInt)); + } else if ("usedDataStorageSizeInTbs".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withUsedDataStorageSizeInTbs(reader.getNullable(JsonReader::getInt)); + } else if ("ocid".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.withOcid(reader.getString()); + } else if ("backupRetentionPeriodInDays".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties + .withBackupRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); + } else if ("whitelistedIps".equals(fieldName)) { + List whitelistedIps = reader.readArray(reader1 -> reader1.getString()); + deserializedAutonomousDatabaseFromBackupTimestampProperties.withWhitelistedIps(whitelistedIps); + } else if ("sourceId".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.sourceId = reader.getString(); + } else if ("cloneType".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.cloneType + = CloneType.fromString(reader.getString()); + } else if ("dataBaseType".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.dataBaseType + = DataBaseType.fromString(reader.getString()); + } else if ("timestamp".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("useLatestAvailableBackupTimeStamp".equals(fieldName)) { + deserializedAutonomousDatabaseFromBackupTimestampProperties.useLatestAvailableBackupTimeStamp + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAutonomousDatabaseFromBackupTimestampProperties; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseLifecycleState.java index 676beef71911..b2be7eed038f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseLifecycleState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseLifecycleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,108 +12,108 @@ */ public final class AutonomousDatabaseLifecycleState extends ExpandableStringEnum { /** - * Static value Provisioning for AutonomousDatabaseLifecycleState. + * Indicates that resource in Provisioning state. */ public static final AutonomousDatabaseLifecycleState PROVISIONING = fromString("Provisioning"); /** - * Static value Available for AutonomousDatabaseLifecycleState. + * Indicates that resource in Available state. */ public static final AutonomousDatabaseLifecycleState AVAILABLE = fromString("Available"); /** - * Static value Stopping for AutonomousDatabaseLifecycleState. + * Indicates that resource in Stopping state. */ public static final AutonomousDatabaseLifecycleState STOPPING = fromString("Stopping"); /** - * Static value Stopped for AutonomousDatabaseLifecycleState. + * Indicates that resource in Stopped state. */ public static final AutonomousDatabaseLifecycleState STOPPED = fromString("Stopped"); /** - * Static value Starting for AutonomousDatabaseLifecycleState. + * Indicates that resource in Starting state. */ public static final AutonomousDatabaseLifecycleState STARTING = fromString("Starting"); /** - * Static value Terminating for AutonomousDatabaseLifecycleState. + * Indicates that resource in Terminating state. */ public static final AutonomousDatabaseLifecycleState TERMINATING = fromString("Terminating"); /** - * Static value Terminated for AutonomousDatabaseLifecycleState. + * Indicates that resource in Terminated state. */ public static final AutonomousDatabaseLifecycleState TERMINATED = fromString("Terminated"); /** - * Static value Unavailable for AutonomousDatabaseLifecycleState. + * Indicates that resource in Unavailable state. */ public static final AutonomousDatabaseLifecycleState UNAVAILABLE = fromString("Unavailable"); /** - * Static value RestoreInProgress for AutonomousDatabaseLifecycleState. + * Indicates that resource in RestoreInProgress state. */ public static final AutonomousDatabaseLifecycleState RESTORE_IN_PROGRESS = fromString("RestoreInProgress"); /** - * Static value RestoreFailed for AutonomousDatabaseLifecycleState. + * Indicates that resource in RestoreFailed state. */ public static final AutonomousDatabaseLifecycleState RESTORE_FAILED = fromString("RestoreFailed"); /** - * Static value BackupInProgress for AutonomousDatabaseLifecycleState. + * Indicates that resource in BackupInProgress state. */ public static final AutonomousDatabaseLifecycleState BACKUP_IN_PROGRESS = fromString("BackupInProgress"); /** - * Static value ScaleInProgress for AutonomousDatabaseLifecycleState. + * Indicates that resource in ScaleInProgress state. */ public static final AutonomousDatabaseLifecycleState SCALE_IN_PROGRESS = fromString("ScaleInProgress"); /** - * Static value AvailableNeedsAttention for AutonomousDatabaseLifecycleState. + * Indicates that resource is available but needs attention. */ public static final AutonomousDatabaseLifecycleState AVAILABLE_NEEDS_ATTENTION = fromString("AvailableNeedsAttention"); /** - * Static value Updating for AutonomousDatabaseLifecycleState. + * Indicates that resource in Updating state. */ public static final AutonomousDatabaseLifecycleState UPDATING = fromString("Updating"); /** - * Static value MaintenanceInProgress for AutonomousDatabaseLifecycleState. + * Indicates that resource maintenance in progress state. */ public static final AutonomousDatabaseLifecycleState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); /** - * Static value Restarting for AutonomousDatabaseLifecycleState. + * Indicates that resource in Restarting state. */ public static final AutonomousDatabaseLifecycleState RESTARTING = fromString("Restarting"); /** - * Static value Recreating for AutonomousDatabaseLifecycleState. + * Indicates that resource in Recreating state. */ public static final AutonomousDatabaseLifecycleState RECREATING = fromString("Recreating"); /** - * Static value RoleChangeInProgress for AutonomousDatabaseLifecycleState. + * Indicates that resource role change in progress state. */ public static final AutonomousDatabaseLifecycleState ROLE_CHANGE_IN_PROGRESS = fromString("RoleChangeInProgress"); /** - * Static value Upgrading for AutonomousDatabaseLifecycleState. + * Indicates that resource in Upgrading state. */ public static final AutonomousDatabaseLifecycleState UPGRADING = fromString("Upgrading"); /** - * Static value Inaccessible for AutonomousDatabaseLifecycleState. + * IIndicates that resource in Inaccessible state. */ public static final AutonomousDatabaseLifecycleState INACCESSIBLE = fromString("Inaccessible"); /** - * Static value Standby for AutonomousDatabaseLifecycleState. + * Indicates that resource in Standby state. */ public static final AutonomousDatabaseLifecycleState STANDBY = fromString("Standby"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSet.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSet.java index b8da9d61e135..28e8b4c2e6c7 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSet.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSet.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSetProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSetProperties.java index 8099383735a2..d9d26a6f7576 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSetProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSetProperties.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -25,7 +26,7 @@ public final class AutonomousDatabaseNationalCharacterSetProperties /** * Creates an instance of AutonomousDatabaseNationalCharacterSetProperties class. */ - public AutonomousDatabaseNationalCharacterSetProperties() { + private AutonomousDatabaseNationalCharacterSetProperties() { } /** @@ -43,14 +44,22 @@ public String characterSet() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (characterSet() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property characterSet in model AutonomousDatabaseNationalCharacterSetProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseNationalCharacterSetProperties.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("characterSet", this.characterSet); return jsonWriter.writeEndObject(); } @@ -60,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AutonomousDatabaseNationalCharacterSetProperties if the JsonReader was pointing to an * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AutonomousDatabaseNationalCharacterSetProperties. */ public static AutonomousDatabaseNationalCharacterSetProperties fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSets.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSets.java index 9d5ed491e4c3..3aa24ed7eb6f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSets.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,53 +13,53 @@ */ public interface AutonomousDatabaseNationalCharacterSets { /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * Get a AutonomousDatabaseNationalCharacterSet. * * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. */ - PagedIterable listByLocation(String location); + Response getWithResponse(String location, String adbsncharsetname, + Context context); /** - * List AutonomousDatabaseNationalCharacterSet resources by Location. + * Get a AutonomousDatabaseNationalCharacterSet. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with - * {@link PagedIterable}. + * @return a AutonomousDatabaseNationalCharacterSet. */ - PagedIterable listByLocation(String location, Context context); + AutonomousDatabaseNationalCharacterSet get(String location, String adbsncharsetname); /** - * Get a AutonomousDatabaseNationalCharacterSet. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - Response getWithResponse(String location, String adbsncharsetname, - Context context); + PagedIterable listByLocation(String location); /** - * Get a AutonomousDatabaseNationalCharacterSet. + * List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabaseNationalCharacterSet. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. */ - AutonomousDatabaseNationalCharacterSet get(String location, String adbsncharsetname); + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseProperties.java index 0dbb4ecb4760..eb42673d47fc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -23,215 +22,6 @@ public final class AutonomousDatabaseProperties extends AutonomousDatabaseBasePr */ private DataBaseType dataBaseType = DataBaseType.REGULAR; - /* - * The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases - * located in Autonomous Data Guard remote regions that are associated with the source database. Note that for - * Autonomous Database Serverless instances, standby databases located in the same region as the source primary - * database do not have OCIDs. - */ - private List peerDbIds; - - /* - * Indicates whether the Autonomous Database has Cross Region Data Guard enabled. - */ - private Boolean isRemoteDataGuardEnabled; - - /* - * Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data - * Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or - * switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. - */ - private DisasterRecoveryType localDisasterRecoveryType; - - /* - * Local Autonomous Disaster Recovery standby database details. - */ - private AutonomousDatabaseStandbySummary localStandbyDb; - - /* - * Indicates the number of seconds of data loss for a Data Guard failover. - */ - private Integer failedDataRecoveryInSeconds; - - /* - * Additional information about the current lifecycle state. - */ - private String lifecycleDetails; - - /* - * Azure resource provisioning state. - */ - private AzureResourceProvisioningState provisioningState; - - /* - * Views lifecycleState - */ - private AutonomousDatabaseLifecycleState lifecycleState; - - /* - * HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. - */ - private String ociUrl; - - /* - * The date and time that the database was created. - */ - private OffsetDateTime timeCreated; - - /* - * The date and time when maintenance will begin. - */ - private OffsetDateTime timeMaintenanceBegin; - - /* - * The date and time when maintenance will end. - */ - private OffsetDateTime timeMaintenanceEnd; - - /* - * The current amount of storage in use for user and system data, in terabytes (TB). - */ - private Double actualUsedDataStorageSizeInTbs; - - /* - * The amount of storage currently allocated for the database tables and billed for, rounded up. - */ - private Double allocatedStorageSizeInTbs; - - /* - * Information about Oracle APEX Application Development. - */ - private ApexDetailsType apexDetails; - - /* - * List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, - * this list is empty. - */ - private List availableUpgradeVersions; - - /* - * The connection string used to connect to the Autonomous Database. - */ - private ConnectionStringType connectionStrings; - - /* - * The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute - * instance within your VCN or that has a direct connection to your VCN. - */ - private ConnectionUrlType connectionUrls; - - /* - * Status of the Data Safe registration for this Autonomous Database. - */ - private DataSafeStatusType dataSafeStatus; - - /* - * The area assigned to In-Memory tables in Autonomous Database. - */ - private Integer inMemoryAreaInGbs; - - /* - * The date and time when the next long-term backup would be created. - */ - private OffsetDateTime nextLongTermBackupTimestamp; - - /* - * Indicates if the Autonomous Database version is a preview version. - */ - private Boolean isPreview; - - /* - * The amount of memory (in GBs) enabled per ECPU or OCPU. - */ - private Integer memoryPerOracleComputeUnitInGbs; - - /* - * Status of Operations Insights for this Autonomous Database. - */ - private OperationsInsightsStatusType operationsInsightsStatus; - - /* - * The private endpoint for the resource. - */ - private String privateEndpoint; - - /* - * An array of CPU values that an Autonomous Database can be scaled to. - */ - private List provisionableCpus; - - /* - * The URL of the Service Console for the Autonomous Database. - */ - private String serviceConsoleUrl; - - /* - * The SQL Web Developer URL for the Oracle Autonomous Database. - */ - private String sqlWebDeveloperUrl; - - /* - * The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby - * database. - */ - private List supportedRegionsToCloneTo; - - /* - * The date and time the Autonomous Data Guard role was switched for the Autonomous Database. - */ - private String timeDataGuardRoleChanged; - - /* - * The date and time the Always Free database will be automatically deleted because of inactivity. - */ - private String timeDeletionOfFreeAutonomousDatabase; - - /* - * The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was - * provisioned in the same region as the primary database. - */ - private String timeLocalDataGuardEnabled; - - /* - * The timestamp of the last failover operation. - */ - private String timeOfLastFailover; - - /* - * The date and time when last refresh happened. - */ - private String timeOfLastRefresh; - - /* - * The refresh point timestamp (UTC). - */ - private String timeOfLastRefreshPoint; - - /* - * The timestamp of the last switchover operation for the Autonomous Database. - */ - private String timeOfLastSwitchover; - - /* - * The date and time the Always Free database will be stopped because of inactivity. - */ - private String timeReclamationOfFreeAutonomousDatabase; - - /* - * The storage space consumed by Autonomous Database in GBs. - */ - private Integer usedDataStorageSizeInGbs; - - /* - * The amount of storage that has been used, in terabytes. - */ - private Integer usedDataStorageSizeInTbs; - - /* - * Database ocid - */ - private String ocid; - /** * Creates an instance of AutonomousDatabaseProperties class. */ @@ -248,425 +38,6 @@ public DataBaseType dataBaseType() { return this.dataBaseType; } - /** - * Get the peerDbIds property: The list of - * [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in - * Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous - * Database Serverless instances, standby databases located in the same region as the source primary database do not - * have OCIDs. - * - * @return the peerDbIds value. - */ - @Override - public List peerDbIds() { - return this.peerDbIds; - } - - /** - * Get the isRemoteDataGuardEnabled property: Indicates whether the Autonomous Database has Cross Region Data Guard - * enabled. - * - * @return the isRemoteDataGuardEnabled value. - */ - @Override - public Boolean isRemoteDataGuardEnabled() { - return this.isRemoteDataGuardEnabled; - } - - /** - * Get the localDisasterRecoveryType property: Indicates the local disaster recovery (DR) type of the Autonomous - * Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster - * recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a - * slower RTO during failover or switchover. - * - * @return the localDisasterRecoveryType value. - */ - @Override - public DisasterRecoveryType localDisasterRecoveryType() { - return this.localDisasterRecoveryType; - } - - /** - * Get the localStandbyDb property: Local Autonomous Disaster Recovery standby database details. - * - * @return the localStandbyDb value. - */ - @Override - public AutonomousDatabaseStandbySummary localStandbyDb() { - return this.localStandbyDb; - } - - /** - * Get the failedDataRecoveryInSeconds property: Indicates the number of seconds of data loss for a Data Guard - * failover. - * - * @return the failedDataRecoveryInSeconds value. - */ - @Override - public Integer failedDataRecoveryInSeconds() { - return this.failedDataRecoveryInSeconds; - } - - /** - * Get the lifecycleDetails property: Additional information about the current lifecycle state. - * - * @return the lifecycleDetails value. - */ - @Override - public String lifecycleDetails() { - return this.lifecycleDetails; - } - - /** - * Get the provisioningState property: Azure resource provisioning state. - * - * @return the provisioningState value. - */ - @Override - public AzureResourceProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the lifecycleState property: Views lifecycleState. - * - * @return the lifecycleState value. - */ - @Override - public AutonomousDatabaseLifecycleState lifecycleState() { - return this.lifecycleState; - } - - /** - * Get the ociUrl property: HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. - * - * @return the ociUrl value. - */ - @Override - public String ociUrl() { - return this.ociUrl; - } - - /** - * Get the timeCreated property: The date and time that the database was created. - * - * @return the timeCreated value. - */ - @Override - public OffsetDateTime timeCreated() { - return this.timeCreated; - } - - /** - * Get the timeMaintenanceBegin property: The date and time when maintenance will begin. - * - * @return the timeMaintenanceBegin value. - */ - @Override - public OffsetDateTime timeMaintenanceBegin() { - return this.timeMaintenanceBegin; - } - - /** - * Get the timeMaintenanceEnd property: The date and time when maintenance will end. - * - * @return the timeMaintenanceEnd value. - */ - @Override - public OffsetDateTime timeMaintenanceEnd() { - return this.timeMaintenanceEnd; - } - - /** - * Get the actualUsedDataStorageSizeInTbs property: The current amount of storage in use for user and system data, - * in terabytes (TB). - * - * @return the actualUsedDataStorageSizeInTbs value. - */ - @Override - public Double actualUsedDataStorageSizeInTbs() { - return this.actualUsedDataStorageSizeInTbs; - } - - /** - * Get the allocatedStorageSizeInTbs property: The amount of storage currently allocated for the database tables and - * billed for, rounded up. - * - * @return the allocatedStorageSizeInTbs value. - */ - @Override - public Double allocatedStorageSizeInTbs() { - return this.allocatedStorageSizeInTbs; - } - - /** - * Get the apexDetails property: Information about Oracle APEX Application Development. - * - * @return the apexDetails value. - */ - @Override - public ApexDetailsType apexDetails() { - return this.apexDetails; - } - - /** - * Get the availableUpgradeVersions property: List of Oracle Database versions available for a database upgrade. If - * there are no version upgrades available, this list is empty. - * - * @return the availableUpgradeVersions value. - */ - @Override - public List availableUpgradeVersions() { - return this.availableUpgradeVersions; - } - - /** - * Get the connectionStrings property: The connection string used to connect to the Autonomous Database. - * - * @return the connectionStrings value. - */ - @Override - public ConnectionStringType connectionStrings() { - return this.connectionStrings; - } - - /** - * Get the connectionUrls property: The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web - * with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. - * - * @return the connectionUrls value. - */ - @Override - public ConnectionUrlType connectionUrls() { - return this.connectionUrls; - } - - /** - * Get the dataSafeStatus property: Status of the Data Safe registration for this Autonomous Database. - * - * @return the dataSafeStatus value. - */ - @Override - public DataSafeStatusType dataSafeStatus() { - return this.dataSafeStatus; - } - - /** - * Get the inMemoryAreaInGbs property: The area assigned to In-Memory tables in Autonomous Database. - * - * @return the inMemoryAreaInGbs value. - */ - @Override - public Integer inMemoryAreaInGbs() { - return this.inMemoryAreaInGbs; - } - - /** - * Get the nextLongTermBackupTimestamp property: The date and time when the next long-term backup would be created. - * - * @return the nextLongTermBackupTimestamp value. - */ - @Override - public OffsetDateTime nextLongTermBackupTimestamp() { - return this.nextLongTermBackupTimestamp; - } - - /** - * Get the isPreview property: Indicates if the Autonomous Database version is a preview version. - * - * @return the isPreview value. - */ - @Override - public Boolean isPreview() { - return this.isPreview; - } - - /** - * Get the memoryPerOracleComputeUnitInGbs property: The amount of memory (in GBs) enabled per ECPU or OCPU. - * - * @return the memoryPerOracleComputeUnitInGbs value. - */ - @Override - public Integer memoryPerOracleComputeUnitInGbs() { - return this.memoryPerOracleComputeUnitInGbs; - } - - /** - * Get the operationsInsightsStatus property: Status of Operations Insights for this Autonomous Database. - * - * @return the operationsInsightsStatus value. - */ - @Override - public OperationsInsightsStatusType operationsInsightsStatus() { - return this.operationsInsightsStatus; - } - - /** - * Get the privateEndpoint property: The private endpoint for the resource. - * - * @return the privateEndpoint value. - */ - @Override - public String privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Get the provisionableCpus property: An array of CPU values that an Autonomous Database can be scaled to. - * - * @return the provisionableCpus value. - */ - @Override - public List provisionableCpus() { - return this.provisionableCpus; - } - - /** - * Get the serviceConsoleUrl property: The URL of the Service Console for the Autonomous Database. - * - * @return the serviceConsoleUrl value. - */ - @Override - public String serviceConsoleUrl() { - return this.serviceConsoleUrl; - } - - /** - * Get the sqlWebDeveloperUrl property: The SQL Web Developer URL for the Oracle Autonomous Database. - * - * @return the sqlWebDeveloperUrl value. - */ - @Override - public String sqlWebDeveloperUrl() { - return this.sqlWebDeveloperUrl; - } - - /** - * Get the supportedRegionsToCloneTo property: The list of regions that support the creation of an Autonomous - * Database clone or an Autonomous Data Guard standby database. - * - * @return the supportedRegionsToCloneTo value. - */ - @Override - public List supportedRegionsToCloneTo() { - return this.supportedRegionsToCloneTo; - } - - /** - * Get the timeDataGuardRoleChanged property: The date and time the Autonomous Data Guard role was switched for the - * Autonomous Database. - * - * @return the timeDataGuardRoleChanged value. - */ - @Override - public String timeDataGuardRoleChanged() { - return this.timeDataGuardRoleChanged; - } - - /** - * Get the timeDeletionOfFreeAutonomousDatabase property: The date and time the Always Free database will be - * automatically deleted because of inactivity. - * - * @return the timeDeletionOfFreeAutonomousDatabase value. - */ - @Override - public String timeDeletionOfFreeAutonomousDatabase() { - return this.timeDeletionOfFreeAutonomousDatabase; - } - - /** - * Get the timeLocalDataGuardEnabled property: The date and time that Autonomous Data Guard was enabled for an - * Autonomous Database where the standby was provisioned in the same region as the primary database. - * - * @return the timeLocalDataGuardEnabled value. - */ - @Override - public String timeLocalDataGuardEnabled() { - return this.timeLocalDataGuardEnabled; - } - - /** - * Get the timeOfLastFailover property: The timestamp of the last failover operation. - * - * @return the timeOfLastFailover value. - */ - @Override - public String timeOfLastFailover() { - return this.timeOfLastFailover; - } - - /** - * Get the timeOfLastRefresh property: The date and time when last refresh happened. - * - * @return the timeOfLastRefresh value. - */ - @Override - public String timeOfLastRefresh() { - return this.timeOfLastRefresh; - } - - /** - * Get the timeOfLastRefreshPoint property: The refresh point timestamp (UTC). - * - * @return the timeOfLastRefreshPoint value. - */ - @Override - public String timeOfLastRefreshPoint() { - return this.timeOfLastRefreshPoint; - } - - /** - * Get the timeOfLastSwitchover property: The timestamp of the last switchover operation for the Autonomous - * Database. - * - * @return the timeOfLastSwitchover value. - */ - @Override - public String timeOfLastSwitchover() { - return this.timeOfLastSwitchover; - } - - /** - * Get the timeReclamationOfFreeAutonomousDatabase property: The date and time the Always Free database will be - * stopped because of inactivity. - * - * @return the timeReclamationOfFreeAutonomousDatabase value. - */ - @Override - public String timeReclamationOfFreeAutonomousDatabase() { - return this.timeReclamationOfFreeAutonomousDatabase; - } - - /** - * Get the usedDataStorageSizeInGbs property: The storage space consumed by Autonomous Database in GBs. - * - * @return the usedDataStorageSizeInGbs value. - */ - @Override - public Integer usedDataStorageSizeInGbs() { - return this.usedDataStorageSizeInGbs; - } - - /** - * Get the usedDataStorageSizeInTbs property: The amount of storage that has been used, in terabytes. - * - * @return the usedDataStorageSizeInTbs value. - */ - @Override - public Integer usedDataStorageSizeInTbs() { - return this.usedDataStorageSizeInTbs; - } - - /** - * Get the ocid property: Database ocid. - * - * @return the ocid value. - */ - @Override - public String ocid() { - return this.ocid; - } - /** * {@inheritDoc} */ @@ -699,7 +70,7 @@ public AutonomousDatabaseProperties withCharacterSet(String characterSet) { * {@inheritDoc} */ @Override - public AutonomousDatabaseProperties withComputeCount(Float computeCount) { + public AutonomousDatabaseProperties withComputeCount(Double computeCount) { super.withComputeCount(computeCount); return this; } @@ -984,7 +355,30 @@ public AutonomousDatabaseProperties withWhitelistedIps(List whitelistedI */ @Override public void validate() { - super.validate(); + if (customerContacts() != null) { + customerContacts().forEach(e -> e.validate()); + } + if (remoteDisasterRecoveryConfiguration() != null) { + remoteDisasterRecoveryConfiguration().validate(); + } + if (localStandbyDb() != null) { + localStandbyDb().validate(); + } + if (scheduledOperations() != null) { + scheduledOperations().validate(); + } + if (apexDetails() != null) { + apexDetails().validate(); + } + if (connectionStrings() != null) { + connectionStrings().validate(); + } + if (connectionUrls() != null) { + connectionUrls().validate(); + } + if (longTermBackupSchedule() != null) { + longTermBackupSchedule().validate(); + } } /** @@ -1058,7 +452,8 @@ public static AutonomousDatabaseProperties fromJson(JsonReader jsonReader) throw } else if ("characterSet".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withCharacterSet(reader.getString()); } else if ("computeCount".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.withComputeCount(reader.getNullable(JsonReader::getFloat)); + deserializedAutonomousDatabaseProperties + .withComputeCount(reader.getNullable(JsonReader::getDouble)); } else if ("computeModel".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withComputeModel(ComputeModel.fromString(reader.getString())); @@ -1089,24 +484,30 @@ public static AutonomousDatabaseProperties fromJson(JsonReader jsonReader) throw .withIsAutoScalingForStorageEnabled(reader.getNullable(JsonReader::getBoolean)); } else if ("peerDbIds".equals(fieldName)) { List peerDbIds = reader.readArray(reader1 -> reader1.getString()); - deserializedAutonomousDatabaseProperties.peerDbIds = peerDbIds; + deserializedAutonomousDatabaseProperties.withPeerDbIds(peerDbIds); } else if ("peerDbId".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withPeerDbId(reader.getString()); } else if ("isLocalDataGuardEnabled".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withIsLocalDataGuardEnabled(reader.getNullable(JsonReader::getBoolean)); } else if ("isRemoteDataGuardEnabled".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.isRemoteDataGuardEnabled - = reader.getNullable(JsonReader::getBoolean); + deserializedAutonomousDatabaseProperties + .withIsRemoteDataGuardEnabled(reader.getNullable(JsonReader::getBoolean)); } else if ("localDisasterRecoveryType".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.localDisasterRecoveryType - = DisasterRecoveryType.fromString(reader.getString()); + deserializedAutonomousDatabaseProperties + .withLocalDisasterRecoveryType(DisasterRecoveryType.fromString(reader.getString())); + } else if ("timeDisasterRecoveryRoleChanged".equals(fieldName)) { + deserializedAutonomousDatabaseProperties.withTimeDisasterRecoveryRoleChanged(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("remoteDisasterRecoveryConfiguration".equals(fieldName)) { + deserializedAutonomousDatabaseProperties + .withRemoteDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails.fromJson(reader)); } else if ("localStandbyDb".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.localStandbyDb - = AutonomousDatabaseStandbySummary.fromJson(reader); + deserializedAutonomousDatabaseProperties + .withLocalStandbyDb(AutonomousDatabaseStandbySummary.fromJson(reader)); } else if ("failedDataRecoveryInSeconds".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.failedDataRecoveryInSeconds - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseProperties + .withFailedDataRecoveryInSeconds(reader.getNullable(JsonReader::getInt)); } else if ("isMtlsConnectionRequired".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withIsMtlsConnectionRequired(reader.getNullable(JsonReader::getBoolean)); @@ -1119,13 +520,13 @@ public static AutonomousDatabaseProperties fromJson(JsonReader jsonReader) throw } else if ("ncharacterSet".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withNcharacterSet(reader.getString()); } else if ("lifecycleDetails".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.lifecycleDetails = reader.getString(); + deserializedAutonomousDatabaseProperties.withLifecycleDetails(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.provisioningState - = AzureResourceProvisioningState.fromString(reader.getString()); + deserializedAutonomousDatabaseProperties + .withProvisioningState(AzureResourceProvisioningState.fromString(reader.getString())); } else if ("lifecycleState".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.lifecycleState - = AutonomousDatabaseLifecycleState.fromString(reader.getString()); + deserializedAutonomousDatabaseProperties + .withLifecycleState(AutonomousDatabaseLifecycleState.fromString(reader.getString())); } else if ("scheduledOperations".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withScheduledOperations(ScheduledOperationsType.fromJson(reader)); @@ -1134,106 +535,109 @@ public static AutonomousDatabaseProperties fromJson(JsonReader jsonReader) throw } else if ("privateEndpointLabel".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withPrivateEndpointLabel(reader.getString()); } else if ("ociUrl".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.ociUrl = reader.getString(); + deserializedAutonomousDatabaseProperties.withOciUrl(reader.getString()); } else if ("subnetId".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withSubnetId(reader.getString()); } else if ("vnetId".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withVnetId(reader.getString()); } else if ("timeCreated".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeCreated = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAutonomousDatabaseProperties.withTimeCreated(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("timeMaintenanceBegin".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeMaintenanceBegin = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAutonomousDatabaseProperties.withTimeMaintenanceBegin(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("timeMaintenanceEnd".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeMaintenanceEnd = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAutonomousDatabaseProperties.withTimeMaintenanceEnd(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("actualUsedDataStorageSizeInTbs".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.actualUsedDataStorageSizeInTbs - = reader.getNullable(JsonReader::getDouble); + deserializedAutonomousDatabaseProperties + .withActualUsedDataStorageSizeInTbs(reader.getNullable(JsonReader::getDouble)); } else if ("allocatedStorageSizeInTbs".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.allocatedStorageSizeInTbs - = reader.getNullable(JsonReader::getDouble); + deserializedAutonomousDatabaseProperties + .withAllocatedStorageSizeInTbs(reader.getNullable(JsonReader::getDouble)); } else if ("apexDetails".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.apexDetails = ApexDetailsType.fromJson(reader); + deserializedAutonomousDatabaseProperties.withApexDetails(ApexDetailsType.fromJson(reader)); } else if ("availableUpgradeVersions".equals(fieldName)) { List availableUpgradeVersions = reader.readArray(reader1 -> reader1.getString()); - deserializedAutonomousDatabaseProperties.availableUpgradeVersions = availableUpgradeVersions; + deserializedAutonomousDatabaseProperties.withAvailableUpgradeVersions(availableUpgradeVersions); } else if ("connectionStrings".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.connectionStrings = ConnectionStringType.fromJson(reader); + deserializedAutonomousDatabaseProperties + .withConnectionStrings(ConnectionStringType.fromJson(reader)); } else if ("connectionUrls".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.connectionUrls = ConnectionUrlType.fromJson(reader); + deserializedAutonomousDatabaseProperties.withConnectionUrls(ConnectionUrlType.fromJson(reader)); } else if ("dataSafeStatus".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.dataSafeStatus - = DataSafeStatusType.fromString(reader.getString()); + deserializedAutonomousDatabaseProperties + .withDataSafeStatus(DataSafeStatusType.fromString(reader.getString())); } else if ("databaseEdition".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withDatabaseEdition(DatabaseEditionType.fromString(reader.getString())); } else if ("autonomousDatabaseId".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withAutonomousDatabaseId(reader.getString()); } else if ("inMemoryAreaInGbs".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.inMemoryAreaInGbs = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseProperties + .withInMemoryAreaInGbs(reader.getNullable(JsonReader::getInt)); } else if ("nextLongTermBackupTimeStamp".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.nextLongTermBackupTimestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAutonomousDatabaseProperties.withNextLongTermBackupTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("longTermBackupSchedule".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withLongTermBackupSchedule(LongTermBackUpScheduleDetails.fromJson(reader)); } else if ("isPreview".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.isPreview = reader.getNullable(JsonReader::getBoolean); + deserializedAutonomousDatabaseProperties.withIsPreview(reader.getNullable(JsonReader::getBoolean)); } else if ("localAdgAutoFailoverMaxDataLossLimit".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withLocalAdgAutoFailoverMaxDataLossLimit(reader.getNullable(JsonReader::getInt)); } else if ("memoryPerOracleComputeUnitInGbs".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.memoryPerOracleComputeUnitInGbs - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseProperties + .withMemoryPerOracleComputeUnitInGbs(reader.getNullable(JsonReader::getInt)); } else if ("openMode".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withOpenMode(OpenModeType.fromString(reader.getString())); } else if ("operationsInsightsStatus".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.operationsInsightsStatus - = OperationsInsightsStatusType.fromString(reader.getString()); + deserializedAutonomousDatabaseProperties + .withOperationsInsightsStatus(OperationsInsightsStatusType.fromString(reader.getString())); } else if ("permissionLevel".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withPermissionLevel(PermissionLevelType.fromString(reader.getString())); } else if ("privateEndpoint".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.privateEndpoint = reader.getString(); + deserializedAutonomousDatabaseProperties.withPrivateEndpoint(reader.getString()); } else if ("provisionableCpus".equals(fieldName)) { List provisionableCpus = reader.readArray(reader1 -> reader1.getInt()); - deserializedAutonomousDatabaseProperties.provisionableCpus = provisionableCpus; + deserializedAutonomousDatabaseProperties.withProvisionableCpus(provisionableCpus); } else if ("role".equals(fieldName)) { deserializedAutonomousDatabaseProperties.withRole(RoleType.fromString(reader.getString())); } else if ("serviceConsoleUrl".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.serviceConsoleUrl = reader.getString(); + deserializedAutonomousDatabaseProperties.withServiceConsoleUrl(reader.getString()); } else if ("sqlWebDeveloperUrl".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.sqlWebDeveloperUrl = reader.getString(); + deserializedAutonomousDatabaseProperties.withSqlWebDeveloperUrl(reader.getString()); } else if ("supportedRegionsToCloneTo".equals(fieldName)) { List supportedRegionsToCloneTo = reader.readArray(reader1 -> reader1.getString()); - deserializedAutonomousDatabaseProperties.supportedRegionsToCloneTo = supportedRegionsToCloneTo; + deserializedAutonomousDatabaseProperties.withSupportedRegionsToCloneTo(supportedRegionsToCloneTo); } else if ("timeDataGuardRoleChanged".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeDataGuardRoleChanged = reader.getString(); + deserializedAutonomousDatabaseProperties.withTimeDataGuardRoleChanged(reader.getString()); } else if ("timeDeletionOfFreeAutonomousDatabase".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeDeletionOfFreeAutonomousDatabase = reader.getString(); + deserializedAutonomousDatabaseProperties + .withTimeDeletionOfFreeAutonomousDatabase(reader.getString()); } else if ("timeLocalDataGuardEnabled".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeLocalDataGuardEnabled = reader.getString(); + deserializedAutonomousDatabaseProperties.withTimeLocalDataGuardEnabled(reader.getString()); } else if ("timeOfLastFailover".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeOfLastFailover = reader.getString(); + deserializedAutonomousDatabaseProperties.withTimeOfLastFailover(reader.getString()); } else if ("timeOfLastRefresh".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeOfLastRefresh = reader.getString(); + deserializedAutonomousDatabaseProperties.withTimeOfLastRefresh(reader.getString()); } else if ("timeOfLastRefreshPoint".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeOfLastRefreshPoint = reader.getString(); + deserializedAutonomousDatabaseProperties.withTimeOfLastRefreshPoint(reader.getString()); } else if ("timeOfLastSwitchover".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeOfLastSwitchover = reader.getString(); + deserializedAutonomousDatabaseProperties.withTimeOfLastSwitchover(reader.getString()); } else if ("timeReclamationOfFreeAutonomousDatabase".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.timeReclamationOfFreeAutonomousDatabase - = reader.getString(); + deserializedAutonomousDatabaseProperties + .withTimeReclamationOfFreeAutonomousDatabase(reader.getString()); } else if ("usedDataStorageSizeInGbs".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.usedDataStorageSizeInGbs - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseProperties + .withUsedDataStorageSizeInGbs(reader.getNullable(JsonReader::getInt)); } else if ("usedDataStorageSizeInTbs".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.usedDataStorageSizeInTbs - = reader.getNullable(JsonReader::getInt); + deserializedAutonomousDatabaseProperties + .withUsedDataStorageSizeInTbs(reader.getNullable(JsonReader::getInt)); } else if ("ocid".equals(fieldName)) { - deserializedAutonomousDatabaseProperties.ocid = reader.getString(); + deserializedAutonomousDatabaseProperties.withOcid(reader.getString()); } else if ("backupRetentionPeriodInDays".equals(fieldName)) { deserializedAutonomousDatabaseProperties .withBackupRetentionPeriodInDays(reader.getNullable(JsonReader::getInt)); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseStandbySummary.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseStandbySummary.java index 1f853accb419..a6a9fa13c164 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseStandbySummary.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseStandbySummary.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Autonomous Disaster Recovery standby database details. */ -@Fluent +@Immutable public final class AutonomousDatabaseStandbySummary implements JsonSerializable { /* * The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can @@ -45,7 +45,7 @@ public final class AutonomousDatabaseStandbySummary implements JsonSerializable< /** * Creates an instance of AutonomousDatabaseStandbySummary class. */ - public AutonomousDatabaseStandbySummary() { + private AutonomousDatabaseStandbySummary() { } /** @@ -58,18 +58,6 @@ public Integer lagTimeInSeconds() { return this.lagTimeInSeconds; } - /** - * Set the lagTimeInSeconds property: The amount of time, in seconds, that the data of the standby database lags the - * data of the primary database. Can be used to determine the potential data loss in the event of a failover. - * - * @param lagTimeInSeconds the lagTimeInSeconds value to set. - * @return the AutonomousDatabaseStandbySummary object itself. - */ - public AutonomousDatabaseStandbySummary withLagTimeInSeconds(Integer lagTimeInSeconds) { - this.lagTimeInSeconds = lagTimeInSeconds; - return this; - } - /** * Get the lifecycleState property: The current state of the Autonomous Database. * @@ -79,17 +67,6 @@ public AutonomousDatabaseLifecycleState lifecycleState() { return this.lifecycleState; } - /** - * Set the lifecycleState property: The current state of the Autonomous Database. - * - * @param lifecycleState the lifecycleState value to set. - * @return the AutonomousDatabaseStandbySummary object itself. - */ - public AutonomousDatabaseStandbySummary withLifecycleState(AutonomousDatabaseLifecycleState lifecycleState) { - this.lifecycleState = lifecycleState; - return this; - } - /** * Get the lifecycleDetails property: Additional information about the current lifecycle state. * @@ -99,17 +76,6 @@ public String lifecycleDetails() { return this.lifecycleDetails; } - /** - * Set the lifecycleDetails property: Additional information about the current lifecycle state. - * - * @param lifecycleDetails the lifecycleDetails value to set. - * @return the AutonomousDatabaseStandbySummary object itself. - */ - public AutonomousDatabaseStandbySummary withLifecycleDetails(String lifecycleDetails) { - this.lifecycleDetails = lifecycleDetails; - return this; - } - /** * Get the timeDataGuardRoleChanged property: The date and time the Autonomous Data Guard role was switched for the * standby Autonomous Database. @@ -120,18 +86,6 @@ public String timeDataGuardRoleChanged() { return this.timeDataGuardRoleChanged; } - /** - * Set the timeDataGuardRoleChanged property: The date and time the Autonomous Data Guard role was switched for the - * standby Autonomous Database. - * - * @param timeDataGuardRoleChanged the timeDataGuardRoleChanged value to set. - * @return the AutonomousDatabaseStandbySummary object itself. - */ - public AutonomousDatabaseStandbySummary withTimeDataGuardRoleChanged(String timeDataGuardRoleChanged) { - this.timeDataGuardRoleChanged = timeDataGuardRoleChanged; - return this; - } - /** * Get the timeDisasterRecoveryRoleChanged property: The date and time the Disaster Recovery role was switched for * the standby Autonomous Database. @@ -142,19 +96,6 @@ public String timeDisasterRecoveryRoleChanged() { return this.timeDisasterRecoveryRoleChanged; } - /** - * Set the timeDisasterRecoveryRoleChanged property: The date and time the Disaster Recovery role was switched for - * the standby Autonomous Database. - * - * @param timeDisasterRecoveryRoleChanged the timeDisasterRecoveryRoleChanged value to set. - * @return the AutonomousDatabaseStandbySummary object itself. - */ - public AutonomousDatabaseStandbySummary - withTimeDisasterRecoveryRoleChanged(String timeDisasterRecoveryRoleChanged) { - this.timeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; - return this; - } - /** * Validates the instance. * diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdate.java index 9fed493d7322..20aace0862f8 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdate.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -23,7 +23,7 @@ public final class AutonomousDatabaseUpdate implements JsonSerializable tags; /* - * The updatable properties of the AutonomousDatabase. + * The resource-specific properties for this resource. */ private AutonomousDatabaseUpdateProperties properties; @@ -54,7 +54,7 @@ public AutonomousDatabaseUpdate withTags(Map tags) { } /** - * Get the properties property: The updatable properties of the AutonomousDatabase. + * Get the properties property: The resource-specific properties for this resource. * * @return the properties value. */ @@ -63,7 +63,7 @@ public AutonomousDatabaseUpdateProperties properties() { } /** - * Set the properties property: The updatable properties of the AutonomousDatabase. + * Set the properties property: The resource-specific properties for this resource. * * @param properties the properties value to set. * @return the AutonomousDatabaseUpdate object itself. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdateProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdateProperties.java index 722b06db9730..23d130a1b9f2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdateProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -30,7 +30,7 @@ public final class AutonomousDatabaseUpdateProperties implements JsonSerializabl /* * The compute amount (CPUs) available to the database. */ - private Float computeCount; + private Double computeCount; /* * The number of CPU cores to be made available to the database. @@ -68,8 +68,8 @@ public final class AutonomousDatabaseUpdateProperties implements JsonSerializabl private Boolean isAutoScalingForStorageEnabled; /* - * The database OCID of the Disaster Recovery peer database, which is located in a different region from the current - * peer database. + * The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the + * current peer database. */ private String peerDbId; @@ -91,7 +91,7 @@ public final class AutonomousDatabaseUpdateProperties implements JsonSerializabl /* * The list of scheduled operations. */ - private ScheduledOperationsTypeUpdate scheduledOperations; + private ScheduledOperationsType scheduledOperations; /* * The Oracle Database Edition that applies to the Autonomous databases. @@ -190,7 +190,7 @@ public AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType() { * * @return the computeCount value. */ - public Float computeCount() { + public Double computeCount() { return this.computeCount; } @@ -200,7 +200,7 @@ public Float computeCount() { * @param computeCount the computeCount value to set. * @return the AutonomousDatabaseUpdateProperties object itself. */ - public AutonomousDatabaseUpdateProperties withComputeCount(Float computeCount) { + public AutonomousDatabaseUpdateProperties withComputeCount(Double computeCount) { this.computeCount = computeCount; return this; } @@ -353,7 +353,7 @@ public Boolean isAutoScalingForStorageEnabled() { } /** - * Get the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * Get the peerDbId property: The Azure resource ID of the Disaster Recovery peer database, which is located in a * different region from the current peer database. * * @return the peerDbId value. @@ -363,7 +363,7 @@ public String peerDbId() { } /** - * Set the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * Set the peerDbId property: The Azure resource ID of the Disaster Recovery peer database, which is located in a * different region from the current peer database. * * @param peerDbId the peerDbId value to set. @@ -443,7 +443,7 @@ public AutonomousDatabaseUpdateProperties withLicenseModel(LicenseModel licenseM * * @return the scheduledOperations value. */ - public ScheduledOperationsTypeUpdate scheduledOperations() { + public ScheduledOperationsType scheduledOperations() { return this.scheduledOperations; } @@ -453,8 +453,7 @@ public ScheduledOperationsTypeUpdate scheduledOperations() { * @param scheduledOperations the scheduledOperations value to set. * @return the AutonomousDatabaseUpdateProperties object itself. */ - public AutonomousDatabaseUpdateProperties - withScheduledOperations(ScheduledOperationsTypeUpdate scheduledOperations) { + public AutonomousDatabaseUpdateProperties withScheduledOperations(ScheduledOperationsType scheduledOperations) { this.scheduledOperations = scheduledOperations; return this; } @@ -708,7 +707,7 @@ public static AutonomousDatabaseUpdateProperties fromJson(JsonReader jsonReader) = AutonomousMaintenanceScheduleType.fromString(reader.getString()); } else if ("computeCount".equals(fieldName)) { deserializedAutonomousDatabaseUpdateProperties.computeCount - = reader.getNullable(JsonReader::getFloat); + = reader.getNullable(JsonReader::getDouble); } else if ("cpuCoreCount".equals(fieldName)) { deserializedAutonomousDatabaseUpdateProperties.cpuCoreCount = reader.getNullable(JsonReader::getInt); @@ -743,7 +742,7 @@ public static AutonomousDatabaseUpdateProperties fromJson(JsonReader jsonReader) = LicenseModel.fromString(reader.getString()); } else if ("scheduledOperations".equals(fieldName)) { deserializedAutonomousDatabaseUpdateProperties.scheduledOperations - = ScheduledOperationsTypeUpdate.fromJson(reader); + = ScheduledOperationsType.fromJson(reader); } else if ("databaseEdition".equals(fieldName)) { deserializedAutonomousDatabaseUpdateProperties.databaseEdition = DatabaseEditionType.fromString(reader.getString()); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseVersions.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseVersions.java index 181e8837cf6e..9be6f82308ae 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseVersions.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,50 +13,50 @@ */ public interface AutonomousDatabaseVersions { /** - * List AutonomousDbVersion resources by Location. + * Get a AutonomousDbVersion. * * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + * @return a AutonomousDbVersion along with {@link Response}. */ - PagedIterable listByLocation(String location); + Response getWithResponse(String location, String autonomousdbversionsname, Context context); /** - * List AutonomousDbVersion resources by Location. + * Get a AutonomousDbVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param autonomousdbversionsname AutonomousDbVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + * @return a AutonomousDbVersion. */ - PagedIterable listByLocation(String location, Context context); + AutonomousDbVersion get(String location, String autonomousdbversionsname); /** - * Get a AutonomousDbVersion. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion along with {@link Response}. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String location, String autonomousdbversionsname, Context context); + PagedIterable listByLocation(String location); /** - * Get a AutonomousDbVersion. + * List AutonomousDbVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDbVersion. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. */ - AutonomousDbVersion get(String location, String autonomousdbversionsname); + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseWalletFile.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseWalletFile.java index 5f1ea32a5209..0f496d29397d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseWalletFile.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseWalletFile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabases.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabases.java index 84df0aff64a0..9bb0f49b7de1 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabases.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabases.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -33,76 +33,104 @@ public interface AutonomousDatabases { PagedIterable list(Context context); /** - * List AutonomousDatabase resources by resource group. + * Get a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + * @return a AutonomousDatabase along with {@link Response}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, String autonomousdatabasename, + Context context); /** - * List AutonomousDatabase resources by resource group. + * Get a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param autonomousdatabasename The database name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + * @return a AutonomousDatabase. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + AutonomousDatabase getByResourceGroup(String resourceGroupName, String autonomousdatabasename); /** - * Get a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabase along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String autonomousdatabasename, - Context context); + void deleteByResourceGroup(String resourceGroupName, String autonomousdatabasename); /** - * Get a AutonomousDatabase. + * Delete a AutonomousDatabase. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AutonomousDatabase. */ - AutonomousDatabase getByResourceGroup(String resourceGroupName, String autonomousdatabasename); + void delete(String resourceGroupName, String autonomousdatabasename, Context context); /** - * Delete a AutonomousDatabase. + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param body The content of the action request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void deleteByResourceGroup(String resourceGroupName, String autonomousdatabasename); + AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); /** - * Delete a AutonomousDatabase. + * Perform switchover action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. + * @param body The content of the action request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ - void delete(String resourceGroupName, String autonomousdatabasename, Context context); + AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context); /** * Perform failover action on Autonomous Database. @@ -113,7 +141,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); @@ -127,7 +155,7 @@ Response getByResourceGroupWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context); @@ -170,7 +198,7 @@ AutonomousDatabaseWalletFile generateWallet(String resourceGroupName, String aut * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase restore(String resourceGroupName, String autonomousdatabasename, RestoreAutonomousDatabaseDetails body); @@ -185,7 +213,7 @@ AutonomousDatabase restore(String resourceGroupName, String autonomousdatabasena * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase restore(String resourceGroupName, String autonomousdatabasename, RestoreAutonomousDatabaseDetails body, Context context); @@ -198,7 +226,7 @@ AutonomousDatabase restore(String resourceGroupName, String autonomousdatabasena * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase shrink(String resourceGroupName, String autonomousdatabasename); @@ -211,12 +239,12 @@ AutonomousDatabase restore(String resourceGroupName, String autonomousdatabasena * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ AutonomousDatabase shrink(String resourceGroupName, String autonomousdatabasename, Context context); /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -224,12 +252,13 @@ AutonomousDatabase restore(String resourceGroupName, String autonomousdatabasena * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ - AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); + AutonomousDatabase changeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body); /** - * Perform switchover action on Autonomous Database. + * Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param autonomousdatabasename The database name. @@ -238,10 +267,10 @@ AutonomousDatabase restore(String resourceGroupName, String autonomousdatabasena * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return autonomous Database resource model. + * @return the response. */ - AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, - Context context); + AutonomousDatabase changeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body, Context context); /** * Get a AutonomousDatabase. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersion.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersion.java index 6becca28303d..55c384bba017 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersion.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersionProperties.java index eb40981c580e..96f4babd383e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersionProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDbVersionProperties.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -49,7 +50,7 @@ public final class AutonomousDbVersionProperties implements JsonSerializable { /** - * Static value Early for AutonomousMaintenanceScheduleType. + * Early maintenance schedule. */ public static final AutonomousMaintenanceScheduleType EARLY = fromString("Early"); /** - * Static value Regular for AutonomousMaintenanceScheduleType. + * Regular maintenance schedule. */ public static final AutonomousMaintenanceScheduleType REGULAR = fromString("Regular"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AzureResourceProvisioningState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AzureResourceProvisioningState.java index d9ba3a18b0b8..eb9ee554b43c 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AzureResourceProvisioningState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AzureResourceProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,22 +12,22 @@ */ public final class AzureResourceProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for AzureResourceProvisioningState. + * Resource has been created. */ public static final AzureResourceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for AzureResourceProvisioningState. + * Resource creation failed. */ public static final AzureResourceProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for AzureResourceProvisioningState. + * Resource creation was canceled. */ public static final AzureResourceProvisioningState CANCELED = fromString("Canceled"); /** - * Static value Provisioning for AzureResourceProvisioningState. + * Indicates that resource in Provisioning state. */ public static final AzureResourceProvisioningState PROVISIONING = fromString("Provisioning"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AzureSubscriptions.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AzureSubscriptions.java new file mode 100644 index 000000000000..6bb3f7c53b25 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AzureSubscriptions.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Azure Subscriptions model. + */ +@Fluent +public final class AzureSubscriptions implements JsonSerializable { + /* + * Azure Subscription Ids to be updated + */ + private List azureSubscriptionIds; + + /** + * Creates an instance of AzureSubscriptions class. + */ + public AzureSubscriptions() { + } + + /** + * Get the azureSubscriptionIds property: Azure Subscription Ids to be updated. + * + * @return the azureSubscriptionIds value. + */ + public List azureSubscriptionIds() { + return this.azureSubscriptionIds; + } + + /** + * Set the azureSubscriptionIds property: Azure Subscription Ids to be updated. + * + * @param azureSubscriptionIds the azureSubscriptionIds value to set. + * @return the AzureSubscriptions object itself. + */ + public AzureSubscriptions withAzureSubscriptionIds(List azureSubscriptionIds) { + this.azureSubscriptionIds = azureSubscriptionIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureSubscriptionIds() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property azureSubscriptionIds in model AzureSubscriptions")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AzureSubscriptions.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("azureSubscriptionIds", this.azureSubscriptionIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureSubscriptions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureSubscriptions if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AzureSubscriptions. + */ + public static AzureSubscriptions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureSubscriptions deserializedAzureSubscriptions = new AzureSubscriptions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureSubscriptionIds".equals(fieldName)) { + List azureSubscriptionIds = reader.readArray(reader1 -> reader1.getString()); + deserializedAzureSubscriptions.azureSubscriptionIds = azureSubscriptionIds; + } else { + reader.skipChildren(); + } + } + + return deserializedAzureSubscriptions; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloneType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloneType.java index b3e70236ec2d..74512ac6c437 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloneType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloneType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class CloneType extends ExpandableStringEnum { /** - * Static value Full for CloneType. + * Full clone. */ public static final CloneType FULL = fromString("Full"); /** - * Static value Metadata for CloneType. + * Metadata only. */ public static final CloneType METADATA = fromString("Metadata"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudAccountDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudAccountDetails.java index b739f2b1fbeb..e0430aa415d1 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudAccountDetails.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudAccountDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudAccountProvisioningState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudAccountProvisioningState.java index 0ad13bc44963..6740f365a6dc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudAccountProvisioningState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudAccountProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,17 +12,17 @@ */ public final class CloudAccountProvisioningState extends ExpandableStringEnum { /** - * Static value Pending for CloudAccountProvisioningState. + * Pending - Initial state when Oracle cloud account is not configured. */ public static final CloudAccountProvisioningState PENDING = fromString("Pending"); /** - * Static value Provisioning for CloudAccountProvisioningState. + * Provisioning - State when Oracle cloud account is being provisioned. */ public static final CloudAccountProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Available for CloudAccountProvisioningState. + * Available - State when Oracle cloud account cloud linking is complete and it is available. */ public static final CloudAccountProvisioningState AVAILABLE = fromString("Available"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructure.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructure.java index 6680e051ff69..8bc51f514805 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructure.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructure.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -273,9 +273,9 @@ interface WithZones { */ interface WithProperties { /** - * Specifies the properties property: The updatable properties of the CloudExadataInfrastructure.. + * Specifies the properties property: The resource-specific properties for this resource.. * - * @param properties The updatable properties of the CloudExadataInfrastructure. + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ Update withProperties(CloudExadataInfrastructureUpdateProperties properties); @@ -302,7 +302,7 @@ interface WithProperties { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition. + * @return the response. */ CloudExadataInfrastructure addStorageCapacity(); @@ -313,7 +313,7 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition. + * @return the response. */ CloudExadataInfrastructure addStorageCapacity(Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureLifecycleState.java index de8aa6921d64..199b485ba723 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureLifecycleState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureLifecycleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,38 +13,38 @@ public final class CloudExadataInfrastructureLifecycleState extends ExpandableStringEnum { /** - * Static value Provisioning for CloudExadataInfrastructureLifecycleState. + * Indicates that resource in Provisioning state. */ public static final CloudExadataInfrastructureLifecycleState PROVISIONING = fromString("Provisioning"); /** - * Static value Available for CloudExadataInfrastructureLifecycleState. + * Indicates that resource in Available state. */ public static final CloudExadataInfrastructureLifecycleState AVAILABLE = fromString("Available"); /** - * Static value Updating for CloudExadataInfrastructureLifecycleState. + * Indicates that resource in Updating state. */ public static final CloudExadataInfrastructureLifecycleState UPDATING = fromString("Updating"); /** - * Static value Terminating for CloudExadataInfrastructureLifecycleState. + * Indicates that resource in Terminating state. */ public static final CloudExadataInfrastructureLifecycleState TERMINATING = fromString("Terminating"); /** - * Static value Terminated for CloudExadataInfrastructureLifecycleState. + * Indicates that resource in Terminated state. */ public static final CloudExadataInfrastructureLifecycleState TERMINATED = fromString("Terminated"); /** - * Static value MaintenanceInProgress for CloudExadataInfrastructureLifecycleState. + * Indicates that resource maintenance in progress state. */ public static final CloudExadataInfrastructureLifecycleState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); /** - * Static value Failed for CloudExadataInfrastructureLifecycleState. + * Indicates that resource in Failed state. */ public static final CloudExadataInfrastructureLifecycleState FAILED = fromString("Failed"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureProperties.java index 0c06c685ea87..490e95188d91 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -19,6 +19,11 @@ @Fluent public final class CloudExadataInfrastructureProperties implements JsonSerializable { + /* + * Defined file system configurations + */ + private List definedFileSystemConfiguration; + /* * Exadata infra ocid */ @@ -178,12 +183,36 @@ public final class CloudExadataInfrastructureProperties */ private String monthlyStorageServerVersion; + /* + * The database server model type of the cloud Exadata infrastructure resource. + */ + private String databaseServerType; + + /* + * The storage server model type of the cloud Exadata infrastructure resource. + */ + private String storageServerType; + + /* + * The compute model of the Exadata Infrastructure + */ + private ComputeModel computeModel; + /** * Creates an instance of CloudExadataInfrastructureProperties class. */ public CloudExadataInfrastructureProperties() { } + /** + * Get the definedFileSystemConfiguration property: Defined file system configurations. + * + * @return the definedFileSystemConfiguration value. + */ + public List definedFileSystemConfiguration() { + return this.definedFileSystemConfiguration; + } + /** * Get the ocid property: Exadata infra ocid. * @@ -544,12 +573,64 @@ public String monthlyStorageServerVersion() { return this.monthlyStorageServerVersion; } + /** + * Get the databaseServerType property: The database server model type of the cloud Exadata infrastructure resource. + * + * @return the databaseServerType value. + */ + public String databaseServerType() { + return this.databaseServerType; + } + + /** + * Set the databaseServerType property: The database server model type of the cloud Exadata infrastructure resource. + * + * @param databaseServerType the databaseServerType value to set. + * @return the CloudExadataInfrastructureProperties object itself. + */ + public CloudExadataInfrastructureProperties withDatabaseServerType(String databaseServerType) { + this.databaseServerType = databaseServerType; + return this; + } + + /** + * Get the storageServerType property: The storage server model type of the cloud Exadata infrastructure resource. + * + * @return the storageServerType value. + */ + public String storageServerType() { + return this.storageServerType; + } + + /** + * Set the storageServerType property: The storage server model type of the cloud Exadata infrastructure resource. + * + * @param storageServerType the storageServerType value to set. + * @return the CloudExadataInfrastructureProperties object itself. + */ + public CloudExadataInfrastructureProperties withStorageServerType(String storageServerType) { + this.storageServerType = storageServerType; + return this; + } + + /** + * Get the computeModel property: The compute model of the Exadata Infrastructure. + * + * @return the computeModel value. + */ + public ComputeModel computeModel() { + return this.computeModel; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (definedFileSystemConfiguration() != null) { + definedFileSystemConfiguration().forEach(e -> e.validate()); + } if (maintenanceWindow() != null) { maintenanceWindow().validate(); } @@ -586,6 +667,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("maintenanceWindow", this.maintenanceWindow); jsonWriter.writeArrayField("customerContacts", this.customerContacts, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("databaseServerType", this.databaseServerType); + jsonWriter.writeStringField("storageServerType", this.storageServerType); return jsonWriter.writeEndObject(); } @@ -610,6 +693,11 @@ public static CloudExadataInfrastructureProperties fromJson(JsonReader jsonReade deserializedCloudExadataInfrastructureProperties.shape = reader.getString(); } else if ("displayName".equals(fieldName)) { deserializedCloudExadataInfrastructureProperties.displayName = reader.getString(); + } else if ("definedFileSystemConfiguration".equals(fieldName)) { + List definedFileSystemConfiguration + = reader.readArray(reader1 -> DefinedFileSystemConfiguration.fromJson(reader1)); + deserializedCloudExadataInfrastructureProperties.definedFileSystemConfiguration + = definedFileSystemConfiguration; } else if ("ocid".equals(fieldName)) { deserializedCloudExadataInfrastructureProperties.ocid = reader.getString(); } else if ("computeCount".equals(fieldName)) { @@ -687,6 +775,13 @@ public static CloudExadataInfrastructureProperties fromJson(JsonReader jsonReade deserializedCloudExadataInfrastructureProperties.monthlyDbServerVersion = reader.getString(); } else if ("monthlyStorageServerVersion".equals(fieldName)) { deserializedCloudExadataInfrastructureProperties.monthlyStorageServerVersion = reader.getString(); + } else if ("databaseServerType".equals(fieldName)) { + deserializedCloudExadataInfrastructureProperties.databaseServerType = reader.getString(); + } else if ("storageServerType".equals(fieldName)) { + deserializedCloudExadataInfrastructureProperties.storageServerType = reader.getString(); + } else if ("computeModel".equals(fieldName)) { + deserializedCloudExadataInfrastructureProperties.computeModel + = ComputeModel.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureUpdate.java index 8eb22d8a043c..14737b585904 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureUpdate.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -29,7 +29,7 @@ public final class CloudExadataInfrastructureUpdate implements JsonSerializable< private Map tags; /* - * The updatable properties of the CloudExadataInfrastructure. + * The resource-specific properties for this resource. */ private CloudExadataInfrastructureUpdateProperties properties; @@ -80,7 +80,7 @@ public CloudExadataInfrastructureUpdate withTags(Map tags) { } /** - * Get the properties property: The updatable properties of the CloudExadataInfrastructure. + * Get the properties property: The resource-specific properties for this resource. * * @return the properties value. */ @@ -89,7 +89,7 @@ public CloudExadataInfrastructureUpdateProperties properties() { } /** - * Set the properties property: The updatable properties of the CloudExadataInfrastructure. + * Set the properties property: The resource-specific properties for this resource. * * @param properties the properties value to set. * @return the CloudExadataInfrastructureUpdate object itself. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureUpdateProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureUpdateProperties.java index 1cffacfe592a..cc13192a0857 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureUpdateProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructureUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructures.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructures.java index 159a2890de1f..716b2dc36d29 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructures.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructures.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -35,78 +35,78 @@ public interface CloudExadataInfrastructures { PagedIterable list(Context context); /** - * List CloudExadataInfrastructure resources by resource group. + * Get a CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with - * {@link PagedIterable}. + * @return a CloudExadataInfrastructure along with {@link Response}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, Context context); /** - * List CloudExadataInfrastructure resources by resource group. + * Get a CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudExadataInfrastructure list operation as paginated response with - * {@link PagedIterable}. + * @return a CloudExadataInfrastructure. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + CloudExadataInfrastructure getByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); /** - * Get a CloudExadataInfrastructure. + * Delete a CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String cloudexadatainfrastructurename, Context context); + void deleteByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); /** - * Get a CloudExadataInfrastructure. + * Delete a CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudExadataInfrastructure. */ - CloudExadataInfrastructure getByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); + void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context); /** - * Delete a CloudExadataInfrastructure. + * List CloudExadataInfrastructure resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Delete a CloudExadataInfrastructure. + * List CloudExadataInfrastructure resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. */ - void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Perform add storage capacity on exadata infra. @@ -116,7 +116,7 @@ Response getByResourceGroupWithResponse(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition. + * @return the response. */ CloudExadataInfrastructure addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename); @@ -129,7 +129,7 @@ Response getByResourceGroupWithResponse(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudExadataInfrastructure resource definition. + * @return the response. */ CloudExadataInfrastructure addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename, Context context); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmCluster.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmCluster.java index 3b616fbd494e..f1af7edcad79 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmCluster.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmCluster.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -241,9 +241,9 @@ interface WithTags { */ interface WithProperties { /** - * Specifies the properties property: The updatable properties of the CloudVmCluster.. + * Specifies the properties property: The resource-specific properties for this resource.. * - * @param properties The updatable properties of the CloudVmCluster. + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ Update withProperties(CloudVmClusterUpdateProperties properties); @@ -272,7 +272,7 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ CloudVmCluster addVms(AddRemoveDbNode body); @@ -284,54 +284,54 @@ interface WithProperties { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ CloudVmCluster addVms(AddRemoveDbNode body, Context context); /** - * List Private IP Addresses by the provided filter. + * Remove VMs from the VM Cluster. * * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties along with {@link Response}. + * @return the response. */ - Response> listPrivateIpAddressesWithResponse(PrivateIpAddressesFilter body, - Context context); + CloudVmCluster removeVms(AddRemoveDbNode body); /** - * List Private IP Addresses by the provided filter. + * Remove VMs from the VM Cluster. * * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties. + * @return the response. */ - List listPrivateIpAddresses(PrivateIpAddressesFilter body); + CloudVmCluster removeVms(AddRemoveDbNode body, Context context); /** - * Remove VMs from the VM Cluster. + * List Private IP Addresses by the provided filter. * * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response body along with {@link Response}. */ - CloudVmCluster removeVms(AddRemoveDbNode body); + Response> listPrivateIpAddressesWithResponse(PrivateIpAddressesFilter body, + Context context); /** - * Remove VMs from the VM Cluster. + * List Private IP Addresses by the provided filter. * * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ - CloudVmCluster removeVms(AddRemoveDbNode body, Context context); + List listPrivateIpAddresses(PrivateIpAddressesFilter body); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterLifecycleState.java index 2e9b89da0c4e..203bffcee735 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterLifecycleState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterLifecycleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,37 +12,37 @@ */ public final class CloudVmClusterLifecycleState extends ExpandableStringEnum { /** - * Static value Provisioning for CloudVmClusterLifecycleState. + * Indicates that resource in Provisioning state. */ public static final CloudVmClusterLifecycleState PROVISIONING = fromString("Provisioning"); /** - * Static value Available for CloudVmClusterLifecycleState. + * Indicates that resource in Available state. */ public static final CloudVmClusterLifecycleState AVAILABLE = fromString("Available"); /** - * Static value Updating for CloudVmClusterLifecycleState. + * Indicates that resource in Updating state. */ public static final CloudVmClusterLifecycleState UPDATING = fromString("Updating"); /** - * Static value Terminating for CloudVmClusterLifecycleState. + * Indicates that resource in Terminating state. */ public static final CloudVmClusterLifecycleState TERMINATING = fromString("Terminating"); /** - * Static value Terminated for CloudVmClusterLifecycleState. + * Indicates that resource in Terminated state. */ public static final CloudVmClusterLifecycleState TERMINATED = fromString("Terminated"); /** - * Static value MaintenanceInProgress for CloudVmClusterLifecycleState. + * Indicates that resource Maintenance in progress state. */ public static final CloudVmClusterLifecycleState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); /** - * Static value Failed for CloudVmClusterLifecycleState. + * Indicates that resource in Failed state. */ public static final CloudVmClusterLifecycleState FAILED = fromString("Failed"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterProperties.java index 829cc613705e..3dcddc291f8e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -40,6 +40,11 @@ public final class CloudVmClusterProperties implements JsonSerializable fileSystemConfigurationDetails; + /* * The data disk group size to be allocated in TBs. */ @@ -95,7 +100,7 @@ public final class CloudVmClusterProperties implements JsonSerializable fileSystemConfigurationDetails() { + return this.fileSystemConfigurationDetails; + } + + /** + * Set the fileSystemConfigurationDetails property: Array of mount path and size. + * + * @param fileSystemConfigurationDetails the fileSystemConfigurationDetails value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties + withFileSystemConfigurationDetails(List fileSystemConfigurationDetails) { + this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + return this; + } + /** * Get the dataStorageSizeInTbs property: The data disk group size to be allocated in TBs. * @@ -515,7 +546,7 @@ public CloudVmClusterProperties withCpuCoreCount(int cpuCoreCount) { * * @return the ocpuCount value. */ - public Float ocpuCount() { + public Double ocpuCount() { return this.ocpuCount; } @@ -526,7 +557,7 @@ public Float ocpuCount() { * @param ocpuCount the ocpuCount value to set. * @return the CloudVmClusterProperties object itself. */ - public CloudVmClusterProperties withOcpuCount(Float ocpuCount) { + public CloudVmClusterProperties withOcpuCount(Double ocpuCount) { this.ocpuCount = ocpuCount; return this; } @@ -1073,12 +1104,24 @@ public String subnetOcid() { return this.subnetOcid; } + /** + * Get the computeModel property: The compute model of the VM Cluster. + * + * @return the computeModel value. + */ + public ComputeModel computeModel() { + return this.computeModel; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (fileSystemConfigurationDetails() != null) { + fileSystemConfigurationDetails().forEach(e -> e.validate()); + } if (hostname() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -1143,6 +1186,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("subnetId", this.subnetId); jsonWriter.writeStringField("displayName", this.displayName); jsonWriter.writeNumberField("storageSizeInGbs", this.storageSizeInGbs); + jsonWriter.writeArrayField("fileSystemConfigurationDetails", this.fileSystemConfigurationDetails, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeNumberField("dataStorageSizeInTbs", this.dataStorageSizeInTbs); jsonWriter.writeNumberField("dbNodeStorageSizeInGbs", this.dbNodeStorageSizeInGbs); jsonWriter.writeNumberField("memorySizeInGbs", this.memorySizeInGbs); @@ -1207,6 +1252,11 @@ public static CloudVmClusterProperties fromJson(JsonReader jsonReader) throws IO deserializedCloudVmClusterProperties.nodeCount = reader.getNullable(JsonReader::getInt); } else if ("storageSizeInGbs".equals(fieldName)) { deserializedCloudVmClusterProperties.storageSizeInGbs = reader.getNullable(JsonReader::getInt); + } else if ("fileSystemConfigurationDetails".equals(fieldName)) { + List fileSystemConfigurationDetails + = reader.readArray(reader1 -> FileSystemConfigurationDetails.fromJson(reader1)); + deserializedCloudVmClusterProperties.fileSystemConfigurationDetails + = fileSystemConfigurationDetails; } else if ("dataStorageSizeInTbs".equals(fieldName)) { deserializedCloudVmClusterProperties.dataStorageSizeInTbs = reader.getNullable(JsonReader::getDouble); @@ -1227,7 +1277,7 @@ public static CloudVmClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("domain".equals(fieldName)) { deserializedCloudVmClusterProperties.domain = reader.getString(); } else if ("ocpuCount".equals(fieldName)) { - deserializedCloudVmClusterProperties.ocpuCount = reader.getNullable(JsonReader::getFloat); + deserializedCloudVmClusterProperties.ocpuCount = reader.getNullable(JsonReader::getDouble); } else if ("clusterName".equals(fieldName)) { deserializedCloudVmClusterProperties.clusterName = reader.getString(); } else if ("dataStoragePercentage".equals(fieldName)) { @@ -1292,6 +1342,8 @@ public static CloudVmClusterProperties fromJson(JsonReader jsonReader) throws IO deserializedCloudVmClusterProperties.compartmentId = reader.getString(); } else if ("subnetOcid".equals(fieldName)) { deserializedCloudVmClusterProperties.subnetOcid = reader.getString(); + } else if ("computeModel".equals(fieldName)) { + deserializedCloudVmClusterProperties.computeModel = ComputeModel.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterUpdate.java index 88ffc4f7073d..23c4fcfb8f7e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterUpdate.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -23,7 +23,7 @@ public final class CloudVmClusterUpdate implements JsonSerializable tags; /* - * The updatable properties of the CloudVmCluster. + * The resource-specific properties for this resource. */ private CloudVmClusterUpdateProperties properties; @@ -54,7 +54,7 @@ public CloudVmClusterUpdate withTags(Map tags) { } /** - * Get the properties property: The updatable properties of the CloudVmCluster. + * Get the properties property: The resource-specific properties for this resource. * * @return the properties value. */ @@ -63,7 +63,7 @@ public CloudVmClusterUpdateProperties properties() { } /** - * Set the properties property: The updatable properties of the CloudVmCluster. + * Set the properties property: The resource-specific properties for this resource. * * @param properties the properties value to set. * @return the CloudVmClusterUpdate object itself. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterUpdateProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterUpdateProperties.java index a3de0a926c2f..896cec7336a8 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterUpdateProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusterUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -22,6 +22,11 @@ public final class CloudVmClusterUpdateProperties implements JsonSerializable fileSystemConfigurationDetails; + /* * The data disk group size to be allocated in TBs. */ @@ -46,7 +51,7 @@ public final class CloudVmClusterUpdateProperties implements JsonSerializable fileSystemConfigurationDetails() { + return this.fileSystemConfigurationDetails; + } + + /** + * Set the fileSystemConfigurationDetails property: Array of mount path and size. + * + * @param fileSystemConfigurationDetails the fileSystemConfigurationDetails value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties + withFileSystemConfigurationDetails(List fileSystemConfigurationDetails) { + this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; + return this; + } + /** * Get the dataStorageSizeInTbs property: The data disk group size to be allocated in TBs. * @@ -186,7 +212,7 @@ public CloudVmClusterUpdateProperties withCpuCoreCount(Integer cpuCoreCount) { * * @return the ocpuCount value. */ - public Float ocpuCount() { + public Double ocpuCount() { return this.ocpuCount; } @@ -197,7 +223,7 @@ public Float ocpuCount() { * @param ocpuCount the ocpuCount value to set. * @return the CloudVmClusterUpdateProperties object itself. */ - public CloudVmClusterUpdateProperties withOcpuCount(Float ocpuCount) { + public CloudVmClusterUpdateProperties withOcpuCount(Double ocpuCount) { this.ocpuCount = ocpuCount; return this; } @@ -314,6 +340,9 @@ public CloudVmClusterUpdateProperties withComputeNodes(List computeNodes * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (fileSystemConfigurationDetails() != null) { + fileSystemConfigurationDetails().forEach(e -> e.validate()); + } if (dataCollectionOptions() != null) { dataCollectionOptions().validate(); } @@ -326,6 +355,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("storageSizeInGbs", this.storageSizeInGbs); + jsonWriter.writeArrayField("fileSystemConfigurationDetails", this.fileSystemConfigurationDetails, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeNumberField("dataStorageSizeInTbs", this.dataStorageSizeInTbs); jsonWriter.writeNumberField("dbNodeStorageSizeInGbs", this.dbNodeStorageSizeInGbs); jsonWriter.writeNumberField("memorySizeInGbs", this.memorySizeInGbs); @@ -359,6 +390,11 @@ public static CloudVmClusterUpdateProperties fromJson(JsonReader jsonReader) thr if ("storageSizeInGbs".equals(fieldName)) { deserializedCloudVmClusterUpdateProperties.storageSizeInGbs = reader.getNullable(JsonReader::getInt); + } else if ("fileSystemConfigurationDetails".equals(fieldName)) { + List fileSystemConfigurationDetails + = reader.readArray(reader1 -> FileSystemConfigurationDetails.fromJson(reader1)); + deserializedCloudVmClusterUpdateProperties.fileSystemConfigurationDetails + = fileSystemConfigurationDetails; } else if ("dataStorageSizeInTbs".equals(fieldName)) { deserializedCloudVmClusterUpdateProperties.dataStorageSizeInTbs = reader.getNullable(JsonReader::getDouble); @@ -370,7 +406,7 @@ public static CloudVmClusterUpdateProperties fromJson(JsonReader jsonReader) thr } else if ("cpuCoreCount".equals(fieldName)) { deserializedCloudVmClusterUpdateProperties.cpuCoreCount = reader.getNullable(JsonReader::getInt); } else if ("ocpuCount".equals(fieldName)) { - deserializedCloudVmClusterUpdateProperties.ocpuCount = reader.getNullable(JsonReader::getFloat); + deserializedCloudVmClusterUpdateProperties.ocpuCount = reader.getNullable(JsonReader::getDouble); } else if ("sshPublicKeys".equals(fieldName)) { List sshPublicKeys = reader.readArray(reader1 -> reader1.getString()); deserializedCloudVmClusterUpdateProperties.sshPublicKeys = sshPublicKeys; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusters.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusters.java index 782d565c869c..13d22d419e54 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusters.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmClusters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -34,76 +34,76 @@ public interface CloudVmClusters { PagedIterable list(Context context); /** - * List CloudVmCluster resources by resource group. + * Get a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + * @return a CloudVmCluster along with {@link Response}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, + Context context); /** - * List CloudVmCluster resources by resource group. + * Get a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param cloudvmclustername CloudVmCluster name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + * @return a CloudVmCluster. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + CloudVmCluster getByResourceGroup(String resourceGroupName, String cloudvmclustername); /** - * Get a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudVmCluster along with {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, - Context context); + void deleteByResourceGroup(String resourceGroupName, String cloudvmclustername); /** - * Get a CloudVmCluster. + * Delete a CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a CloudVmCluster. */ - CloudVmCluster getByResourceGroup(String resourceGroupName, String cloudvmclustername); + void delete(String resourceGroupName, String cloudvmclustername, Context context); /** - * Delete a CloudVmCluster. + * List CloudVmCluster resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String cloudvmclustername); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Delete a CloudVmCluster. + * List CloudVmCluster resources by resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param cloudvmclustername CloudVmCluster name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String cloudvmclustername, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Add VMs to the VM Cluster. @@ -114,7 +114,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ CloudVmCluster addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); @@ -128,66 +128,66 @@ Response getByResourceGroupWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ CloudVmCluster addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, Context context); /** - * List Private IP Addresses by the provided filter. + * Remove VMs from the VM Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties along with {@link Response}. + * @return the response. */ - Response> listPrivateIpAddressesWithResponse(String resourceGroupName, - String cloudvmclustername, PrivateIpAddressesFilter body, Context context); + CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); /** - * List Private IP Addresses by the provided filter. + * Remove VMs from the VM Cluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of PrivateIpAddressProperties. + * @return the response. */ - List listPrivateIpAddresses(String resourceGroupName, String cloudvmclustername, - PrivateIpAddressesFilter body); + CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context); /** - * Remove VMs from the VM Cluster. + * List Private IP Addresses by the provided filter. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response body along with {@link Response}. */ - CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); + Response> listPrivateIpAddressesWithResponse(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body, Context context); /** - * Remove VMs from the VM Cluster. + * List Private IP Addresses by the provided filter. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param body The content of the action request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloudVmCluster resource definition. + * @return the response. */ - CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, - Context context); + List listPrivateIpAddresses(String resourceGroupName, String cloudvmclustername, + PrivateIpAddressesFilter body); /** * Get a CloudVmCluster. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ComputeModel.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ComputeModel.java index e3bee95bc37d..81df44cc04b0 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ComputeModel.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ComputeModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class ComputeModel extends ExpandableStringEnum { /** - * Static value ECPU for ComputeModel. + * ECPU model type. */ public static final ComputeModel ECPU = fromString("ECPU"); /** - * Static value OCPU for ComputeModel. + * OCPU model type. */ public static final ComputeModel OCPU = fromString("OCPU"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ConnectionStringType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ConnectionStringType.java index 83299a720880..749d61515ae5 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ConnectionStringType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ConnectionStringType.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Connection strings to connect to an Oracle Autonomous Database. */ -@Fluent +@Immutable public final class ConnectionStringType implements JsonSerializable { /* * Returns all connection strings that can be used to connect to the Autonomous Database. @@ -55,7 +55,7 @@ public final class ConnectionStringType implements JsonSerializable profiles() { return this.profiles; } - /** - * Set the profiles property: A list of connection string profiles to allow clients to group, filter and select - * connection string values based on structured metadata. - * - * @param profiles the profiles value to set. - * @return the ConnectionStringType object itself. - */ - public ConnectionStringType withProfiles(List profiles) { - this.profiles = profiles; - return this; - } - /** * Validates the instance. * diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ConnectionUrlType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ConnectionUrlType.java index c93578667a84..80203a09e036 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ConnectionUrlType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ConnectionUrlType.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ * The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance * within your VCN or that has a direct connection to your VCN. */ -@Fluent +@Immutable public final class ConnectionUrlType implements JsonSerializable { /* * Oracle Application Express (APEX) URL. @@ -55,7 +55,7 @@ public final class ConnectionUrlType implements JsonSerializable { /** - * Static value High for ConsumerGroup. + * High group. */ public static final ConsumerGroup HIGH = fromString("High"); /** - * Static value Medium for ConsumerGroup. + * Medium group. */ public static final ConsumerGroup MEDIUM = fromString("Medium"); /** - * Static value Low for ConsumerGroup. + * Low group. */ public static final ConsumerGroup LOW = fromString("Low"); /** - * Static value Tp for ConsumerGroup. + * TP group. */ public static final ConsumerGroup TP = fromString("Tp"); /** - * Static value Tpurgent for ConsumerGroup. + * TPurgent group. */ public static final ConsumerGroup TPURGENT = fromString("Tpurgent"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CustomerContact.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CustomerContact.java index b729b2fa5048..6e06c00f9d75 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CustomerContact.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CustomerContact.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataBaseType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataBaseType.java index 7730b9054e31..69f613c3755a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataBaseType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataBaseType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,15 +12,25 @@ */ public final class DataBaseType extends ExpandableStringEnum { /** - * Static value Regular for DataBaseType. + * Regular DB. */ public static final DataBaseType REGULAR = fromString("Regular"); /** - * Static value Clone for DataBaseType. + * Clone DB. */ public static final DataBaseType CLONE = fromString("Clone"); + /** + * Clone DB from backup timestamp. + */ + public static final DataBaseType CLONE_FROM_BACKUP_TIMESTAMP = fromString("CloneFromBackupTimestamp"); + + /** + * Cross Region Disaster Recovery. + */ + public static final DataBaseType CROSS_REGION_DISASTER_RECOVERY = fromString("CrossRegionDisasterRecovery"); + /** * Creates a new instance of DataBaseType value. * diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataCollectionOptions.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataCollectionOptions.java index ff412f06c157..5101ca2e01e9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataCollectionOptions.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataCollectionOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataSafeStatusType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataSafeStatusType.java index fb0b72ca51cd..5d7758cc9e39 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataSafeStatusType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DataSafeStatusType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,27 +12,27 @@ */ public final class DataSafeStatusType extends ExpandableStringEnum { /** - * Static value Registering for DataSafeStatusType. + * Registering status. */ public static final DataSafeStatusType REGISTERING = fromString("Registering"); /** - * Static value Registered for DataSafeStatusType. + * Registered status. */ public static final DataSafeStatusType REGISTERED = fromString("Registered"); /** - * Static value Deregistering for DataSafeStatusType. + * Deregistering status. */ public static final DataSafeStatusType DEREGISTERING = fromString("Deregistering"); /** - * Static value NotRegistered for DataSafeStatusType. + * NotRegistered status. */ public static final DataSafeStatusType NOT_REGISTERED = fromString("NotRegistered"); /** - * Static value Failed for DataSafeStatusType. + * Failed status. */ public static final DataSafeStatusType FAILED = fromString("Failed"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DatabaseEditionType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DatabaseEditionType.java index 68195ff3a24c..6bf7fa5f3abb 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DatabaseEditionType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DatabaseEditionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class DatabaseEditionType extends ExpandableStringEnum { /** - * Static value StandardEdition for DatabaseEditionType. + * Standard edition. */ public static final DatabaseEditionType STANDARD_EDITION = fromString("StandardEdition"); /** - * Static value EnterpriseEdition for DatabaseEditionType. + * Enterprise edition. */ public static final DatabaseEditionType ENTERPRISE_EDITION = fromString("EnterpriseEdition"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeek.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeek.java index b2fe48158fb1..e4a93a4f5cbd 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeek.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeek.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeekName.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeekName.java index 4bbe4886cf4e..375406509f0b 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeekName.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeekName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,37 +12,37 @@ */ public final class DayOfWeekName extends ExpandableStringEnum { /** - * Static value Monday for DayOfWeekName. + * Monday value. */ public static final DayOfWeekName MONDAY = fromString("Monday"); /** - * Static value Tuesday for DayOfWeekName. + * Tuesday value. */ public static final DayOfWeekName TUESDAY = fromString("Tuesday"); /** - * Static value Wednesday for DayOfWeekName. + * Wednesday value. */ public static final DayOfWeekName WEDNESDAY = fromString("Wednesday"); /** - * Static value Thursday for DayOfWeekName. + * Thursday value. */ public static final DayOfWeekName THURSDAY = fromString("Thursday"); /** - * Static value Friday for DayOfWeekName. + * Friday value. */ public static final DayOfWeekName FRIDAY = fromString("Friday"); /** - * Static value Saturday for DayOfWeekName. + * Saturday value. */ public static final DayOfWeekName SATURDAY = fromString("Saturday"); /** - * Static value Sunday for DayOfWeekName. + * Sunday value. */ public static final DayOfWeekName SUNDAY = fromString("Sunday"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeekUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeekUpdate.java deleted file mode 100644 index 4bba4f58962d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DayOfWeekUpdate.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * DayOfWeek resource properties. - */ -@Fluent -public final class DayOfWeekUpdate implements JsonSerializable { - /* - * Name of the day of the week. - */ - private DayOfWeekName name; - - /** - * Creates an instance of DayOfWeekUpdate class. - */ - public DayOfWeekUpdate() { - } - - /** - * Get the name property: Name of the day of the week. - * - * @return the name value. - */ - public DayOfWeekName name() { - return this.name; - } - - /** - * Set the name property: Name of the day of the week. - * - * @param name the name value to set. - * @return the DayOfWeekUpdate object itself. - */ - public DayOfWeekUpdate withName(DayOfWeekName name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name == null ? null : this.name.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DayOfWeekUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DayOfWeekUpdate if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DayOfWeekUpdate. - */ - public static DayOfWeekUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DayOfWeekUpdate deserializedDayOfWeekUpdate = new DayOfWeekUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDayOfWeekUpdate.name = DayOfWeekName.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDayOfWeekUpdate; - }); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbActionResponse.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbActionResponse.java new file mode 100644 index 000000000000..dc5bfaaab55c --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbActionResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.resourcemanager.oracledatabase.fluent.models.DbActionResponseInner; + +/** + * An immutable client-side representation of DbActionResponse. + */ +public interface DbActionResponse { + /** + * Gets the provisioningState property: ExascaleDbNode provisioning state. + * + * @return the provisioningState value. + */ + AzureResourceProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.oracledatabase.fluent.models.DbActionResponseInner object. + * + * @return the inner object. + */ + DbActionResponseInner innerModel(); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbIormConfig.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbIormConfig.java index eb85746034bb..99092dfe0d64 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbIormConfig.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbIormConfig.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * DbIormConfig for cloud vm cluster. */ -@Fluent +@Immutable public final class DbIormConfig implements JsonSerializable { /* * The database name. For the default DbPlan, the dbName is default. @@ -35,7 +35,7 @@ public final class DbIormConfig implements JsonSerializable { /** * Creates an instance of DbIormConfig class. */ - public DbIormConfig() { + private DbIormConfig() { } /** @@ -47,17 +47,6 @@ public String dbName() { return this.dbName; } - /** - * Set the dbName property: The database name. For the default DbPlan, the dbName is default. - * - * @param dbName the dbName value to set. - * @return the DbIormConfig object itself. - */ - public DbIormConfig withDbName(String dbName) { - this.dbName = dbName; - return this; - } - /** * Get the flashCacheLimit property: The flash cache limit for this database. This value is internally configured * based on the share value assigned to the database. @@ -68,18 +57,6 @@ public String flashCacheLimit() { return this.flashCacheLimit; } - /** - * Set the flashCacheLimit property: The flash cache limit for this database. This value is internally configured - * based on the share value assigned to the database. - * - * @param flashCacheLimit the flashCacheLimit value to set. - * @return the DbIormConfig object itself. - */ - public DbIormConfig withFlashCacheLimit(String flashCacheLimit) { - this.flashCacheLimit = flashCacheLimit; - return this; - } - /** * Get the share property: The relative priority of this database. * @@ -89,17 +66,6 @@ public Integer share() { return this.share; } - /** - * Set the share property: The relative priority of this database. - * - * @param share the share value to set. - * @return the DbIormConfig object itself. - */ - public DbIormConfig withShare(Integer share) { - this.share = share; - return this; - } - /** * Validates the instance. * diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNode.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNode.java index 8d56ed4a7bad..99dca5fed5c9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNode.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeAction.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeAction.java index 0299ccd388e0..90a2ed79a72a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeAction.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeActionEnum.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeActionEnum.java index a4be3c1de9f1..f8e9b5930278 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeActionEnum.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeActionEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,22 +12,22 @@ */ public final class DbNodeActionEnum extends ExpandableStringEnum { /** - * Static value Start for DbNodeActionEnum. + * Start DbNode. */ public static final DbNodeActionEnum START = fromString("Start"); /** - * Static value Stop for DbNodeActionEnum. + * Stop DbNode. */ public static final DbNodeActionEnum STOP = fromString("Stop"); /** - * Static value SoftReset for DbNodeActionEnum. + * Soft reset DbNode. */ public static final DbNodeActionEnum SOFT_RESET = fromString("SoftReset"); /** - * Static value Reset for DbNodeActionEnum. + * Reset DbNode. */ public static final DbNodeActionEnum RESET = fromString("Reset"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeDetails.java new file mode 100644 index 000000000000..d40b2f5629a0 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeDetails.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + */ +@Fluent +public final class DbNodeDetails implements JsonSerializable { + /* + * Exascale DbNode Azure Resource ID + */ + private String dbNodeId; + + /** + * Creates an instance of DbNodeDetails class. + */ + public DbNodeDetails() { + } + + /** + * Get the dbNodeId property: Exascale DbNode Azure Resource ID. + * + * @return the dbNodeId value. + */ + public String dbNodeId() { + return this.dbNodeId; + } + + /** + * Set the dbNodeId property: Exascale DbNode Azure Resource ID. + * + * @param dbNodeId the dbNodeId value to set. + * @return the DbNodeDetails object itself. + */ + public DbNodeDetails withDbNodeId(String dbNodeId) { + this.dbNodeId = dbNodeId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dbNodeId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property dbNodeId in model DbNodeDetails")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DbNodeDetails.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dbNodeId", this.dbNodeId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DbNodeDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DbNodeDetails if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DbNodeDetails. + */ + public static DbNodeDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DbNodeDetails deserializedDbNodeDetails = new DbNodeDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dbNodeId".equals(fieldName)) { + deserializedDbNodeDetails.dbNodeId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDbNodeDetails; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeMaintenanceType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeMaintenanceType.java index 31e32be2b538..32603600a51c 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeMaintenanceType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeMaintenanceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,7 +12,7 @@ */ public final class DbNodeMaintenanceType extends ExpandableStringEnum { /** - * Static value VmdbRebootMigration for DbNodeMaintenanceType. + * VMDB reboot migration maintenance type. */ public static final DbNodeMaintenanceType VMDB_REBOOT_MIGRATION = fromString("VmdbRebootMigration"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProperties.java index 5b27a0bc0f24..a06417d143f4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProperties.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * The properties of DbNodeResource. @@ -137,7 +139,7 @@ public final class DbNodeProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("vnicId".equals(fieldName)) { + deserializedDbNodeProperties.vnicId = reader.getString(); } else if ("additionalDetails".equals(fieldName)) { deserializedDbNodeProperties.additionalDetails = reader.getString(); } else if ("backupIpId".equals(fieldName)) { @@ -396,17 +463,12 @@ public static DbNodeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedDbNodeProperties.dbNodeStorageSizeInGbs = reader.getNullable(JsonReader::getInt); } else if ("dbServerId".equals(fieldName)) { deserializedDbNodeProperties.dbServerId = reader.getString(); - } else if ("dbSystemId".equals(fieldName)) { - deserializedDbNodeProperties.dbSystemId = reader.getString(); } else if ("faultDomain".equals(fieldName)) { deserializedDbNodeProperties.faultDomain = reader.getString(); } else if ("hostIpId".equals(fieldName)) { deserializedDbNodeProperties.hostIpId = reader.getString(); } else if ("hostname".equals(fieldName)) { deserializedDbNodeProperties.hostname = reader.getString(); - } else if ("lifecycleState".equals(fieldName)) { - deserializedDbNodeProperties.lifecycleState - = DbNodeProvisioningState.fromString(reader.getString()); } else if ("lifecycleDetails".equals(fieldName)) { deserializedDbNodeProperties.lifecycleDetails = reader.getString(); } else if ("maintenanceType".equals(fieldName)) { @@ -415,9 +477,6 @@ public static DbNodeProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedDbNodeProperties.memorySizeInGbs = reader.getNullable(JsonReader::getInt); } else if ("softwareStorageSizeInGb".equals(fieldName)) { deserializedDbNodeProperties.softwareStorageSizeInGb = reader.getNullable(JsonReader::getInt); - } else if ("timeCreated".equals(fieldName)) { - deserializedDbNodeProperties.timeCreated = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("timeMaintenanceWindowEnd".equals(fieldName)) { deserializedDbNodeProperties.timeMaintenanceWindowEnd = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); @@ -426,8 +485,6 @@ public static DbNodeProperties fromJson(JsonReader jsonReader) throws IOExceptio .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("vnic2Id".equals(fieldName)) { deserializedDbNodeProperties.vnic2Id = reader.getString(); - } else if ("vnicId".equals(fieldName)) { - deserializedDbNodeProperties.vnicId = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedDbNodeProperties.provisioningState = ResourceProvisioningState.fromString(reader.getString()); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProvisioningState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProvisioningState.java index 78c9199c6af1..5fbc35c522da 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProvisioningState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,47 +12,47 @@ */ public final class DbNodeProvisioningState extends ExpandableStringEnum { /** - * Static value Provisioning for DbNodeProvisioningState. + * Indicates that resource in Provisioning state. */ public static final DbNodeProvisioningState PROVISIONING = fromString("Provisioning"); /** - * Static value Available for DbNodeProvisioningState. + * Indicates that resource in Available state. */ public static final DbNodeProvisioningState AVAILABLE = fromString("Available"); /** - * Static value Updating for DbNodeProvisioningState. + * Indicates that resource in Updating state. */ public static final DbNodeProvisioningState UPDATING = fromString("Updating"); /** - * Static value Stopping for DbNodeProvisioningState. + * Indicates that resource in Stopping state. */ public static final DbNodeProvisioningState STOPPING = fromString("Stopping"); /** - * Static value Stopped for DbNodeProvisioningState. + * Indicates that resource in Stopped state. */ public static final DbNodeProvisioningState STOPPED = fromString("Stopped"); /** - * Static value Starting for DbNodeProvisioningState. + * Indicates that resource in Starting state. */ public static final DbNodeProvisioningState STARTING = fromString("Starting"); /** - * Static value Terminating for DbNodeProvisioningState. + * Indicates that resource in Terminating state. */ public static final DbNodeProvisioningState TERMINATING = fromString("Terminating"); /** - * Static value Terminated for DbNodeProvisioningState. + * Indicates that resource in Terminated state. */ public static final DbNodeProvisioningState TERMINATED = fromString("Terminated"); /** - * Static value Failed for DbNodeProvisioningState. + * Indicates that resource in Failed state. */ public static final DbNodeProvisioningState FAILED = fromString("Failed"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodes.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodes.java index 89bb028c00ae..44bd4b217e13 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodes.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,57 +13,57 @@ */ public interface DbNodes { /** - * List DbNode resources by CloudVmCluster. + * Get a DbNode. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + * @return a DbNode along with {@link Response}. */ - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + Context context); /** - * List DbNode resources by CloudVmCluster. + * Get a DbNode. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. + * @param dbnodeocid DbNode OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + * @return a DbNode. */ - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, Context context); + DbNode get(String resourceGroupName, String cloudvmclustername, String dbnodeocid); /** - * Get a DbNode. + * List DbNode resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode along with {@link Response}. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, - Context context); + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); /** - * Get a DbNode. + * List DbNode resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param dbnodeocid DbNode OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbNode. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. */ - DbNode get(String resourceGroupName, String cloudvmclustername, String dbnodeocid); + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, Context context); /** * VM actions on DbNode of VM Cluster by the provided filter. @@ -75,7 +75,7 @@ Response getWithResponse(String resourceGroupName, String cloudvmcluster * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DbNode resource belonging to vmCluster. + * @return the response. */ DbNode action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body); @@ -90,7 +90,7 @@ Response getWithResponse(String resourceGroupName, String cloudvmcluster * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the DbNode resource belonging to vmCluster. + * @return the response. */ DbNode action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body, Context context); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServer.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServer.java index 99e0757aa0e5..8ef1eadadc0b 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServer.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerPatchingDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerPatchingDetails.java index c55e07d4a2fa..5ea899ec324a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerPatchingDetails.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerPatchingDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -41,7 +41,7 @@ public final class DbServerPatchingDetails implements JsonSerializable { /** - * Static value Scheduled for DbServerPatchingStatus. + * Patching scheduled. */ public static final DbServerPatchingStatus SCHEDULED = fromString("Scheduled"); /** - * Static value MaintenanceInProgress for DbServerPatchingStatus. + * Patching in progress. */ public static final DbServerPatchingStatus MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); /** - * Static value Failed for DbServerPatchingStatus. + * Patching failed. */ public static final DbServerPatchingStatus FAILED = fromString("Failed"); /** - * Static value Complete for DbServerPatchingStatus. + * Patching completed. */ public static final DbServerPatchingStatus COMPLETE = fromString("Complete"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerProperties.java index 22ee5844f861..c257ce88b7a9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -119,10 +119,15 @@ public final class DbServerProperties implements JsonSerializable { /** - * Static value Creating for DbServerProvisioningState. + * Indicates that resource in Creating state. */ public static final DbServerProvisioningState CREATING = fromString("Creating"); /** - * Static value Available for DbServerProvisioningState. + * Indicates that resource in Available state. */ public static final DbServerProvisioningState AVAILABLE = fromString("Available"); /** - * Static value Unavailable for DbServerProvisioningState. + * Indicates that resource in Unavailable state. */ public static final DbServerProvisioningState UNAVAILABLE = fromString("Unavailable"); /** - * Static value Deleting for DbServerProvisioningState. + * Indicates that resource in Deleting state. */ public static final DbServerProvisioningState DELETING = fromString("Deleting"); /** - * Static value Deleted for DbServerProvisioningState. + * Indicates that resource in Deleted state. */ public static final DbServerProvisioningState DELETED = fromString("Deleted"); /** - * Static value MaintenanceInProgress for DbServerProvisioningState. + * Indicates that resource maintenance in progress state. */ public static final DbServerProvisioningState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServers.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServers.java index 38f8f5f499b0..b909298a3bf7 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServers.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbServers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,57 +13,57 @@ */ public interface DbServers { /** - * List DbServer resources by CloudExadataInfrastructure. + * Get a DbServer. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + * @return a DbServer along with {@link Response}. */ - PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename); + Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid, Context context); /** - * List DbServer resources by CloudExadataInfrastructure. + * Get a DbServer. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param context The context to associate with this operation. + * @param dbserverocid DbServer OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + * @return a DbServer. */ - PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename, Context context); + DbServer get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid); /** - * Get a DbServer. + * List DbServer resources by CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer along with {@link Response}. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, - String dbserverocid, Context context); + PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename); /** - * Get a DbServer. + * List DbServer resources by CloudExadataInfrastructure. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. - * @param dbserverocid DbServer OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbServer. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. */ - DbServer get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid); + PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShape.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShape.java index 1dab72716671..8c6196b3990d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShape.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShape.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShapeProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShapeProperties.java index 69aede1659c6..cc706621314f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShapeProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbSystemShapeProperties.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -21,10 +22,15 @@ public final class DbSystemShapeProperties implements JsonSerializable listByLocation(String location); + Response getWithResponse(String location, String dbsystemshapename, Context context); /** - * List DbSystemShape resources by Location. + * Get a DbSystemShape. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dbsystemshapename DbSystemShape name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. + * @return a DbSystemShape. */ - PagedIterable listByLocation(String location, Context context); + DbSystemShape get(String location, String dbsystemshapename); /** - * Get a DbSystemShape. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape along with {@link Response}. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String location, String dbsystemshapename, Context context); + PagedIterable listByLocation(String location); /** - * Get a DbSystemShape. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dbsystemshapename DbSystemShape name. + * @param zone Filters the result for the given Azure Availability Zone. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DbSystemShape. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. */ - DbSystemShape get(String location, String dbsystemshapename); + PagedIterable listByLocation(String location, String zone, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DefinedFileSystemConfiguration.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DefinedFileSystemConfiguration.java new file mode 100644 index 000000000000..a63613f73c5d --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DefinedFileSystemConfiguration.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Predefined configurations for the file system. + */ +@Immutable +public final class DefinedFileSystemConfiguration implements JsonSerializable { + /* + * Checks if the data can be backed up + */ + private Boolean isBackupPartition; + + /* + * Checks if the mount path is resizable + */ + private Boolean isResizable; + + /* + * Minimum size of mount path in Gb + */ + private Integer minSizeGb; + + /* + * Mount path for the file system + */ + private String mountPoint; + + /** + * Creates an instance of DefinedFileSystemConfiguration class. + */ + private DefinedFileSystemConfiguration() { + } + + /** + * Get the isBackupPartition property: Checks if the data can be backed up. + * + * @return the isBackupPartition value. + */ + public Boolean isBackupPartition() { + return this.isBackupPartition; + } + + /** + * Get the isResizable property: Checks if the mount path is resizable. + * + * @return the isResizable value. + */ + public Boolean isResizable() { + return this.isResizable; + } + + /** + * Get the minSizeGb property: Minimum size of mount path in Gb. + * + * @return the minSizeGb value. + */ + public Integer minSizeGb() { + return this.minSizeGb; + } + + /** + * Get the mountPoint property: Mount path for the file system. + * + * @return the mountPoint value. + */ + public String mountPoint() { + return this.mountPoint; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isBackupPartition", this.isBackupPartition); + jsonWriter.writeBooleanField("isResizable", this.isResizable); + jsonWriter.writeNumberField("minSizeGb", this.minSizeGb); + jsonWriter.writeStringField("mountPoint", this.mountPoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DefinedFileSystemConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DefinedFileSystemConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DefinedFileSystemConfiguration. + */ + public static DefinedFileSystemConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DefinedFileSystemConfiguration deserializedDefinedFileSystemConfiguration + = new DefinedFileSystemConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isBackupPartition".equals(fieldName)) { + deserializedDefinedFileSystemConfiguration.isBackupPartition + = reader.getNullable(JsonReader::getBoolean); + } else if ("isResizable".equals(fieldName)) { + deserializedDefinedFileSystemConfiguration.isResizable = reader.getNullable(JsonReader::getBoolean); + } else if ("minSizeGb".equals(fieldName)) { + deserializedDefinedFileSystemConfiguration.minSizeGb = reader.getNullable(JsonReader::getInt); + } else if ("mountPoint".equals(fieldName)) { + deserializedDefinedFileSystemConfiguration.mountPoint = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDefinedFileSystemConfiguration; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DisasterRecoveryConfigurationDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DisasterRecoveryConfigurationDetails.java new file mode 100644 index 000000000000..ef3dfb3c4267 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DisasterRecoveryConfigurationDetails.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Configurations of a Disaster Recovery Details. + */ +@Fluent +public final class DisasterRecoveryConfigurationDetails + implements JsonSerializable { + /* + * Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard + * (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or + * switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + */ + private DisasterRecoveryType disasterRecoveryType; + + /* + * Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a + * limit for the snapshot standby to be converted back to a cross-region standby database. + */ + private OffsetDateTime timeSnapshotStandbyEnabledTill; + + /* + * Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to + * snapshot standby database. False would set a snapshot standby database back to regular standby database. + */ + private Boolean isSnapshotStandby; + + /* + * If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between + * Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + */ + private Boolean isReplicateAutomaticBackups; + + /** + * Creates an instance of DisasterRecoveryConfigurationDetails class. + */ + public DisasterRecoveryConfigurationDetails() { + } + + /** + * Get the disasterRecoveryType property: Indicates the disaster recovery (DR) type of the Autonomous Database + * Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery + * time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO + * during failover or switchover. + * + * @return the disasterRecoveryType value. + */ + public DisasterRecoveryType disasterRecoveryType() { + return this.disasterRecoveryType; + } + + /** + * Set the disasterRecoveryType property: Indicates the disaster recovery (DR) type of the Autonomous Database + * Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery + * time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO + * during failover or switchover. + * + * @param disasterRecoveryType the disasterRecoveryType value to set. + * @return the DisasterRecoveryConfigurationDetails object itself. + */ + public DisasterRecoveryConfigurationDetails withDisasterRecoveryType(DisasterRecoveryType disasterRecoveryType) { + this.disasterRecoveryType = disasterRecoveryType; + return this; + } + + /** + * Get the timeSnapshotStandbyEnabledTill property: Time and date stored as an RFC 3339 formatted timestamp string. + * For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a + * cross-region standby database. + * + * @return the timeSnapshotStandbyEnabledTill value. + */ + public OffsetDateTime timeSnapshotStandbyEnabledTill() { + return this.timeSnapshotStandbyEnabledTill; + } + + /** + * Set the timeSnapshotStandbyEnabledTill property: Time and date stored as an RFC 3339 formatted timestamp string. + * For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a + * cross-region standby database. + * + * @param timeSnapshotStandbyEnabledTill the timeSnapshotStandbyEnabledTill value to set. + * @return the DisasterRecoveryConfigurationDetails object itself. + */ + public DisasterRecoveryConfigurationDetails + withTimeSnapshotStandbyEnabledTill(OffsetDateTime timeSnapshotStandbyEnabledTill) { + this.timeSnapshotStandbyEnabledTill = timeSnapshotStandbyEnabledTill; + return this; + } + + /** + * Get the isSnapshotStandby property: Indicates if user wants to convert to a snapshot standby. For example, true + * would set a standby database to snapshot standby database. False would set a snapshot standby database back to + * regular standby database. + * + * @return the isSnapshotStandby value. + */ + public Boolean isSnapshotStandby() { + return this.isSnapshotStandby; + } + + /** + * Set the isSnapshotStandby property: Indicates if user wants to convert to a snapshot standby. For example, true + * would set a standby database to snapshot standby database. False would set a snapshot standby database back to + * regular standby database. + * + * @param isSnapshotStandby the isSnapshotStandby value to set. + * @return the DisasterRecoveryConfigurationDetails object itself. + */ + public DisasterRecoveryConfigurationDetails withIsSnapshotStandby(Boolean isSnapshotStandby) { + this.isSnapshotStandby = isSnapshotStandby; + return this; + } + + /** + * Get the isReplicateAutomaticBackups property: If true, 7 days worth of backups are replicated across regions for + * Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are + * not replicated to the Standby database. + * + * @return the isReplicateAutomaticBackups value. + */ + public Boolean isReplicateAutomaticBackups() { + return this.isReplicateAutomaticBackups; + } + + /** + * Set the isReplicateAutomaticBackups property: If true, 7 days worth of backups are replicated across regions for + * Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are + * not replicated to the Standby database. + * + * @param isReplicateAutomaticBackups the isReplicateAutomaticBackups value to set. + * @return the DisasterRecoveryConfigurationDetails object itself. + */ + public DisasterRecoveryConfigurationDetails withIsReplicateAutomaticBackups(Boolean isReplicateAutomaticBackups) { + this.isReplicateAutomaticBackups = isReplicateAutomaticBackups; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("disasterRecoveryType", + this.disasterRecoveryType == null ? null : this.disasterRecoveryType.toString()); + jsonWriter.writeStringField("timeSnapshotStandbyEnabledTill", + this.timeSnapshotStandbyEnabledTill == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timeSnapshotStandbyEnabledTill)); + jsonWriter.writeBooleanField("isSnapshotStandby", this.isSnapshotStandby); + jsonWriter.writeBooleanField("isReplicateAutomaticBackups", this.isReplicateAutomaticBackups); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DisasterRecoveryConfigurationDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DisasterRecoveryConfigurationDetails if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DisasterRecoveryConfigurationDetails. + */ + public static DisasterRecoveryConfigurationDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DisasterRecoveryConfigurationDetails deserializedDisasterRecoveryConfigurationDetails + = new DisasterRecoveryConfigurationDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disasterRecoveryType".equals(fieldName)) { + deserializedDisasterRecoveryConfigurationDetails.disasterRecoveryType + = DisasterRecoveryType.fromString(reader.getString()); + } else if ("timeSnapshotStandbyEnabledTill".equals(fieldName)) { + deserializedDisasterRecoveryConfigurationDetails.timeSnapshotStandbyEnabledTill = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("isSnapshotStandby".equals(fieldName)) { + deserializedDisasterRecoveryConfigurationDetails.isSnapshotStandby + = reader.getNullable(JsonReader::getBoolean); + } else if ("isReplicateAutomaticBackups".equals(fieldName)) { + deserializedDisasterRecoveryConfigurationDetails.isReplicateAutomaticBackups + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedDisasterRecoveryConfigurationDetails; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DisasterRecoveryType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DisasterRecoveryType.java index c74dd21ddb89..2946ac237069 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DisasterRecoveryType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DisasterRecoveryType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class DisasterRecoveryType extends ExpandableStringEnum { /** - * Static value Adg for DisasterRecoveryType. + * ADG type. */ public static final DisasterRecoveryType ADG = fromString("Adg"); /** - * Static value BackupBased for DisasterRecoveryType. + * Backup based type. */ public static final DisasterRecoveryType BACKUP_BASED = fromString("BackupBased"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DiskRedundancy.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DiskRedundancy.java index 31dbfd875f72..3026531f97c6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DiskRedundancy.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DiskRedundancy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class DiskRedundancy extends ExpandableStringEnum { /** - * Static value High for DiskRedundancy. + * High redundancy. */ public static final DiskRedundancy HIGH = fromString("High"); /** - * Static value Normal for DiskRedundancy. + * Normal redundancy. */ public static final DiskRedundancy NORMAL = fromString("Normal"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateView.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateView.java index 5815dff88e3b..d7b532c70d7d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateView.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateView.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewProperties.java index cc839d518303..25438a522dc5 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewProperties.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * Views resource model. @@ -31,7 +33,7 @@ public final class DnsPrivateViewProperties implements JsonSerializable listByLocation(String location); + Response getWithResponse(String location, String dnsprivateviewocid, Context context); /** - * List DnsPrivateView resources by Location. + * Get a DnsPrivateView. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dnsprivateviewocid DnsPrivateView OCID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + * @return a DnsPrivateView. */ - PagedIterable listByLocation(String location, Context context); + DnsPrivateView get(String location, String dnsprivateviewocid); /** - * Get a DnsPrivateView. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView along with {@link Response}. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String location, String dnsprivateviewocid, Context context); + PagedIterable listByLocation(String location); /** - * Get a DnsPrivateView. + * List DnsPrivateView resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivateviewocid DnsPrivateView OCID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateView. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. */ - DnsPrivateView get(String location, String dnsprivateviewocid); + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewsLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewsLifecycleState.java index 970eee98a1f4..e40bd4b15df9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewsLifecycleState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewsLifecycleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,22 +12,22 @@ */ public final class DnsPrivateViewsLifecycleState extends ExpandableStringEnum { /** - * Static value Active for DnsPrivateViewsLifecycleState. + * DNS Private View is active. */ public static final DnsPrivateViewsLifecycleState ACTIVE = fromString("Active"); /** - * Static value Deleted for DnsPrivateViewsLifecycleState. + * DNS Private View is deleted. */ public static final DnsPrivateViewsLifecycleState DELETED = fromString("Deleted"); /** - * Static value Deleting for DnsPrivateViewsLifecycleState. + * DNS Private View is deleting. */ public static final DnsPrivateViewsLifecycleState DELETING = fromString("Deleting"); /** - * Static value Updating for DnsPrivateViewsLifecycleState. + * DNS Private View is updating. */ public static final DnsPrivateViewsLifecycleState UPDATING = fromString("Updating"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZone.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZone.java index dfcf08bbdee1..3cb2a5bbd23e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZone.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZone.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZoneProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZoneProperties.java index 22296218e909..6d9ee3757fc5 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZoneProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZoneProperties.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * Zones resource model. @@ -26,7 +28,7 @@ public final class DnsPrivateZoneProperties implements JsonSerializable CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("viewId".equals(fieldName)) { + deserializedDnsPrivateZoneProperties.viewId = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedDnsPrivateZoneProperties.provisioningState = ResourceProvisioningState.fromString(reader.getString()); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZones.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZones.java index 6c82f04666d6..612fb6371cfc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZones.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZones.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,50 +13,50 @@ */ public interface DnsPrivateZones { /** - * List DnsPrivateZone resources by Location. + * Get a DnsPrivateZone. * * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + * @return a DnsPrivateZone along with {@link Response}. */ - PagedIterable listByLocation(String location); + Response getWithResponse(String location, String dnsprivatezonename, Context context); /** - * List DnsPrivateZone resources by Location. + * Get a DnsPrivateZone. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param dnsprivatezonename DnsPrivateZone name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + * @return a DnsPrivateZone. */ - PagedIterable listByLocation(String location, Context context); + DnsPrivateZone get(String location, String dnsprivatezonename); /** - * Get a DnsPrivateZone. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone along with {@link Response}. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String location, String dnsprivatezonename, Context context); + PagedIterable listByLocation(String location); /** - * Get a DnsPrivateZone. + * List DnsPrivateZone resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a DnsPrivateZone. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. */ - DnsPrivateZone get(String location, String dnsprivatezonename); + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZonesLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZonesLifecycleState.java index a570753e8853..d5d34782f671 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZonesLifecycleState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateZonesLifecycleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,27 +12,27 @@ */ public final class DnsPrivateZonesLifecycleState extends ExpandableStringEnum { /** - * Static value Active for DnsPrivateZonesLifecycleState. + * DNS Private Zones is active. */ public static final DnsPrivateZonesLifecycleState ACTIVE = fromString("Active"); /** - * Static value Creating for DnsPrivateZonesLifecycleState. + * DNS Private Zones is creating. */ public static final DnsPrivateZonesLifecycleState CREATING = fromString("Creating"); /** - * Static value Deleted for DnsPrivateZonesLifecycleState. + * DNS Private Zones is deleted. */ public static final DnsPrivateZonesLifecycleState DELETED = fromString("Deleted"); /** - * Static value Deleting for DnsPrivateZonesLifecycleState. + * DNS Private Zones is deleting. */ public static final DnsPrivateZonesLifecycleState DELETING = fromString("Deleting"); /** - * Static value Updating for DnsPrivateZonesLifecycleState. + * DNS Private Zones is updating. */ public static final DnsPrivateZonesLifecycleState UPDATING = fromString("Updating"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/EstimatedPatchingTime.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/EstimatedPatchingTime.java index 4837155109e7..88630157585a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/EstimatedPatchingTime.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/EstimatedPatchingTime.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -40,7 +40,7 @@ public final class EstimatedPatchingTime implements JsonSerializable { /* * An array of IORM settings for all the database in the Exadata DB system. @@ -40,7 +40,7 @@ public final class ExadataIormConfig implements JsonSerializable dbPlans() { return this.dbPlans; } - /** - * Set the dbPlans property: An array of IORM settings for all the database in the Exadata DB system. - * - * @param dbPlans the dbPlans value to set. - * @return the ExadataIormConfig object itself. - */ - public ExadataIormConfig withDbPlans(List dbPlans) { - this.dbPlans = dbPlans; - return this; - } - /** * Get the lifecycleDetails property: Additional information about the current lifecycleState. * @@ -72,17 +61,6 @@ public String lifecycleDetails() { return this.lifecycleDetails; } - /** - * Set the lifecycleDetails property: Additional information about the current lifecycleState. - * - * @param lifecycleDetails the lifecycleDetails value to set. - * @return the ExadataIormConfig object itself. - */ - public ExadataIormConfig withLifecycleDetails(String lifecycleDetails) { - this.lifecycleDetails = lifecycleDetails; - return this; - } - /** * Get the lifecycleState property: The current state of IORM configuration for the Exadata DB system. * @@ -92,17 +70,6 @@ public IormLifecycleState lifecycleState() { return this.lifecycleState; } - /** - * Set the lifecycleState property: The current state of IORM configuration for the Exadata DB system. - * - * @param lifecycleState the lifecycleState value to set. - * @return the ExadataIormConfig object itself. - */ - public ExadataIormConfig withLifecycleState(IormLifecycleState lifecycleState) { - this.lifecycleState = lifecycleState; - return this; - } - /** * Get the objective property: The current value for the IORM objective. The default is AUTO. * @@ -112,17 +79,6 @@ public Objective objective() { return this.objective; } - /** - * Set the objective property: The current value for the IORM objective. The default is AUTO. - * - * @param objective the objective value to set. - * @return the ExadataIormConfig object itself. - */ - public ExadataIormConfig withObjective(Objective objective) { - this.objective = objective; - return this; - } - /** * Validates the instance. * diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmCluster.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmCluster.java new file mode 100644 index 000000000000..e684a9fa84f5 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmCluster.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ExadbVmCluster. + */ +public interface ExadbVmCluster { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ExadbVmClusterProperties properties(); + + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List zones(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner object. + * + * @return the inner object. + */ + ExadbVmClusterInner innerModel(); + + /** + * The entirety of the ExadbVmCluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ExadbVmCluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ExadbVmCluster definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ExadbVmCluster definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ExadbVmCluster definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ExadbVmCluster definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithZones { + /** + * Executes the create request. + * + * @return the created resource. + */ + ExadbVmCluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ExadbVmCluster create(Context context); + } + + /** + * The stage of the ExadbVmCluster definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the ExadbVmCluster definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ExadbVmClusterProperties properties); + } + + /** + * The stage of the ExadbVmCluster definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + WithCreate withZones(List zones); + } + } + + /** + * Begins update for the ExadbVmCluster resource. + * + * @return the stage of resource update. + */ + ExadbVmCluster.Update update(); + + /** + * The template for ExadbVmCluster update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithZones, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ExadbVmCluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ExadbVmCluster apply(Context context); + } + + /** + * The ExadbVmCluster update stages. + */ + interface UpdateStages { + /** + * The stage of the ExadbVmCluster update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the ExadbVmCluster update allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + Update withZones(List zones); + } + + /** + * The stage of the ExadbVmCluster update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + Update withProperties(ExadbVmClusterUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ExadbVmCluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ExadbVmCluster refresh(Context context); + + /** + * Remove VMs from the VM Cluster. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExadbVmCluster removeVms(RemoveVirtualMachineFromExadbVmClusterDetails body); + + /** + * Remove VMs from the VM Cluster. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExadbVmCluster removeVms(RemoveVirtualMachineFromExadbVmClusterDetails body, Context context); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterLifecycleState.java new file mode 100644 index 000000000000..ba716b02dd48 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterLifecycleState.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Exadata VM cluster on Exascale Infrastructure lifecycle state enum. + */ +public final class ExadbVmClusterLifecycleState extends ExpandableStringEnum { + /** + * Indicates that resource in Provisioning state. + */ + public static final ExadbVmClusterLifecycleState PROVISIONING = fromString("Provisioning"); + + /** + * Indicates that resource in Available state. + */ + public static final ExadbVmClusterLifecycleState AVAILABLE = fromString("Available"); + + /** + * Indicates that resource in Updating state. + */ + public static final ExadbVmClusterLifecycleState UPDATING = fromString("Updating"); + + /** + * Indicates that resource in Terminating state. + */ + public static final ExadbVmClusterLifecycleState TERMINATING = fromString("Terminating"); + + /** + * Indicates that resource in Terminated state. + */ + public static final ExadbVmClusterLifecycleState TERMINATED = fromString("Terminated"); + + /** + * Indicates that resource Maintenance in progress state. + */ + public static final ExadbVmClusterLifecycleState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); + + /** + * Indicates that resource in Failed state. + */ + public static final ExadbVmClusterLifecycleState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ExadbVmClusterLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExadbVmClusterLifecycleState() { + } + + /** + * Creates or finds a ExadbVmClusterLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExadbVmClusterLifecycleState. + */ + public static ExadbVmClusterLifecycleState fromString(String name) { + return fromString(name, ExadbVmClusterLifecycleState.class); + } + + /** + * Gets known ExadbVmClusterLifecycleState values. + * + * @return known ExadbVmClusterLifecycleState values. + */ + public static Collection values() { + return values(ExadbVmClusterLifecycleState.class); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterProperties.java new file mode 100644 index 000000000000..4f9823979e53 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterProperties.java @@ -0,0 +1,1150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * ExadbVmCluster resource model. + */ +@Fluent +public final class ExadbVmClusterProperties implements JsonSerializable { + /* + * ExadbVmCluster ocid + */ + private String ocid; + + /* + * The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an + * alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no + * longer than 11 characters and is not case sensitive. + */ + private String clusterName; + + /* + * Client OCI backup subnet CIDR, default is 192.168.252.0/22 + */ + private String backupSubnetCidr; + + /* + * HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + */ + private String nsgUrl; + + /* + * Exadata VM cluster on Exascale Infrastructure provisioning state + */ + private AzureResourceProvisioningState provisioningState; + + /* + * CloudVmCluster lifecycle state + */ + private ExadbVmClusterLifecycleState lifecycleState; + + /* + * VNET for network connectivity + */ + private String vnetId; + + /* + * Client subnet + */ + private String subnetId; + + /* + * Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM + * DBCS. + */ + private DataCollectionOptions dataCollectionOptions; + + /* + * Display Name + */ + private String displayName; + + /* + * A domain name used for the Exadata VM cluster on Exascale Infrastructure + */ + private String domain; + + /* + * The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + */ + private int enabledEcpuCount; + + /* + * The Azure Resource ID of the Exadata Database Storage Vault. + */ + private String exascaleDbStorageVaultId; + + /* + * Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API + */ + private String gridImageOcid; + + /* + * The type of Grid Image + */ + private GridImageType gridImageType; + + /* + * Oracle Grid Infrastructure (GI) software version + */ + private String giVersion; + + /* + * The hostname for the Exadata VM cluster on Exascale Infrastructure. + */ + private String hostname; + + /* + * The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is + * LICENSE_INCLUDED. + */ + private LicenseModel licenseModel; + + /* + * The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + */ + private Integer memorySizeInGbs; + + /* + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + */ + private int nodeCount; + + /* + * CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by + * default. + */ + private List nsgCidrs; + + /* + * The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + */ + private String zoneOcid; + + /* + * The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + */ + private String privateZoneOcid; + + /* + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + */ + private Integer scanListenerPortTcp; + + /* + * The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + */ + private Integer scanListenerPortTcpSsl; + + /* + * The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + */ + private Integer listenerPort; + + /* + * The shape of the Exadata VM cluster on Exascale Infrastructure resource + */ + private String shape; + + /* + * The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale + * Infrastructure. + */ + private List sshPublicKeys; + + /* + * Operating system version of the image. + */ + private String systemVersion; + + /* + * The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time + * Zones](/Content/Database/References/timezones.htm). + */ + private String timeZone; + + /* + * The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + */ + private int totalEcpuCount; + + /* + * Filesystem storage details. + */ + private ExadbVmClusterStorageDetails vmFileSystemStorage; + + /* + * Additional information about the current lifecycle state. + */ + private String lifecycleDetails; + + /* + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale + * Infrastructure. + */ + private String scanDnsName; + + /* + * The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale + * Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. + * Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB + * system, this list is empty. + */ + private List scanIpIds; + + /* + * The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale + * Infrastructure. + */ + private String scanDnsRecordId; + + /* + * Snapshot filesystem storage details. + */ + private ExadbVmClusterStorageDetails snapshotFileSystemStorage; + + /* + * Total file system storage details. + */ + private ExadbVmClusterStorageDetails totalFileSystemStorage; + + /* + * The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster + * Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to + * enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a + * single-node DB system, this list is empty. + */ + private List vipIds; + + /* + * HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + */ + private String ociUrl; + + /* + * iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + */ + private ExadataIormConfig iormConfigCache; + + /* + * Cluster backup subnet ocid + */ + private String backupSubnetOcid; + + /* + * Cluster subnet ocid + */ + private String subnetOcid; + + /** + * Creates an instance of ExadbVmClusterProperties class. + */ + public ExadbVmClusterProperties() { + } + + /** + * Get the ocid property: ExadbVmCluster ocid. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the clusterName property: The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster + * name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The + * cluster name can be no longer than 11 characters and is not case sensitive. + * + * @return the clusterName value. + */ + public String clusterName() { + return this.clusterName; + } + + /** + * Set the clusterName property: The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster + * name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The + * cluster name can be no longer than 11 characters and is not case sensitive. + * + * @param clusterName the clusterName value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withClusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * Get the backupSubnetCidr property: Client OCI backup subnet CIDR, default is 192.168.252.0/22. + * + * @return the backupSubnetCidr value. + */ + public String backupSubnetCidr() { + return this.backupSubnetCidr; + } + + /** + * Set the backupSubnetCidr property: Client OCI backup subnet CIDR, default is 192.168.252.0/22. + * + * @param backupSubnetCidr the backupSubnetCidr value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withBackupSubnetCidr(String backupSubnetCidr) { + this.backupSubnetCidr = backupSubnetCidr; + return this; + } + + /** + * Get the nsgUrl property: HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure + * Interface. + * + * @return the nsgUrl value. + */ + public String nsgUrl() { + return this.nsgUrl; + } + + /** + * Get the provisioningState property: Exadata VM cluster on Exascale Infrastructure provisioning state. + * + * @return the provisioningState value. + */ + public AzureResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the lifecycleState property: CloudVmCluster lifecycle state. + * + * @return the lifecycleState value. + */ + public ExadbVmClusterLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the vnetId property: VNET for network connectivity. + * + * @return the vnetId value. + */ + public String vnetId() { + return this.vnetId; + } + + /** + * Set the vnetId property: VNET for network connectivity. + * + * @param vnetId the vnetId value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withVnetId(String vnetId) { + this.vnetId = vnetId; + return this; + } + + /** + * Get the subnetId property: Client subnet. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: Client subnet. + * + * @param subnetId the subnetId value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Get the dataCollectionOptions property: Indicates user preferences for the various diagnostic collection options + * for the VM cluster/Cloud VM cluster/VMBM DBCS. + * + * @return the dataCollectionOptions value. + */ + public DataCollectionOptions dataCollectionOptions() { + return this.dataCollectionOptions; + } + + /** + * Set the dataCollectionOptions property: Indicates user preferences for the various diagnostic collection options + * for the VM cluster/Cloud VM cluster/VMBM DBCS. + * + * @param dataCollectionOptions the dataCollectionOptions value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withDataCollectionOptions(DataCollectionOptions dataCollectionOptions) { + this.dataCollectionOptions = dataCollectionOptions; + return this; + } + + /** + * Get the displayName property: Display Name. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display Name. + * + * @param displayName the displayName value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the domain property: A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: A domain name used for the Exadata VM cluster on Exascale Infrastructure. + * + * @param domain the domain value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the enabledEcpuCount property: The number of ECPUs to enable for an Exadata VM cluster on Exascale + * Infrastructure. + * + * @return the enabledEcpuCount value. + */ + public int enabledEcpuCount() { + return this.enabledEcpuCount; + } + + /** + * Set the enabledEcpuCount property: The number of ECPUs to enable for an Exadata VM cluster on Exascale + * Infrastructure. + * + * @param enabledEcpuCount the enabledEcpuCount value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withEnabledEcpuCount(int enabledEcpuCount) { + this.enabledEcpuCount = enabledEcpuCount; + return this; + } + + /** + * Get the exascaleDbStorageVaultId property: The Azure Resource ID of the Exadata Database Storage Vault. + * + * @return the exascaleDbStorageVaultId value. + */ + public String exascaleDbStorageVaultId() { + return this.exascaleDbStorageVaultId; + } + + /** + * Set the exascaleDbStorageVaultId property: The Azure Resource ID of the Exadata Database Storage Vault. + * + * @param exascaleDbStorageVaultId the exascaleDbStorageVaultId value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withExascaleDbStorageVaultId(String exascaleDbStorageVaultId) { + this.exascaleDbStorageVaultId = exascaleDbStorageVaultId; + return this; + } + + /** + * Get the gridImageOcid property: Grid Setup will be done using this Grid Image OCID. Can be obtained using + * giMinorVersions API. + * + * @return the gridImageOcid value. + */ + public String gridImageOcid() { + return this.gridImageOcid; + } + + /** + * Set the gridImageOcid property: Grid Setup will be done using this Grid Image OCID. Can be obtained using + * giMinorVersions API. + * + * @param gridImageOcid the gridImageOcid value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withGridImageOcid(String gridImageOcid) { + this.gridImageOcid = gridImageOcid; + return this; + } + + /** + * Get the gridImageType property: The type of Grid Image. + * + * @return the gridImageType value. + */ + public GridImageType gridImageType() { + return this.gridImageType; + } + + /** + * Get the giVersion property: Oracle Grid Infrastructure (GI) software version. + * + * @return the giVersion value. + */ + public String giVersion() { + return this.giVersion; + } + + /** + * Get the hostname property: The hostname for the Exadata VM cluster on Exascale Infrastructure. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: The hostname for the Exadata VM cluster on Exascale Infrastructure. + * + * @param hostname the hostname value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the licenseModel property: The Oracle license model that applies to the Exadata VM cluster on Exascale + * Infrastructure. The default is LICENSE_INCLUDED. + * + * @return the licenseModel value. + */ + public LicenseModel licenseModel() { + return this.licenseModel; + } + + /** + * Set the licenseModel property: The Oracle license model that applies to the Exadata VM cluster on Exascale + * Infrastructure. The default is LICENSE_INCLUDED. + * + * @param licenseModel the licenseModel value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withLicenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + return this; + } + + /** + * Get the memorySizeInGbs property: The memory that you want to be allocated in GBs. Memory is calculated based on + * 11 GB per VM core reserved. + * + * @return the memorySizeInGbs value. + */ + public Integer memorySizeInGbs() { + return this.memorySizeInGbs; + } + + /** + * Get the nodeCount property: The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @return the nodeCount value. + */ + public int nodeCount() { + return this.nodeCount; + } + + /** + * Set the nodeCount property: The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @param nodeCount the nodeCount value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withNodeCount(int nodeCount) { + this.nodeCount = nodeCount; + return this; + } + + /** + * Get the nsgCidrs property: CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM + * Cluster will be added by default. + * + * @return the nsgCidrs value. + */ + public List nsgCidrs() { + return this.nsgCidrs; + } + + /** + * Set the nsgCidrs property: CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM + * Cluster will be added by default. + * + * @param nsgCidrs the nsgCidrs value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withNsgCidrs(List nsgCidrs) { + this.nsgCidrs = nsgCidrs; + return this; + } + + /** + * Get the zoneOcid property: The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated + * with. + * + * @return the zoneOcid value. + */ + public String zoneOcid() { + return this.zoneOcid; + } + + /** + * Get the privateZoneOcid property: The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is + * associated with. + * + * @return the privateZoneOcid value. + */ + public String privateZoneOcid() { + return this.privateZoneOcid; + } + + /** + * Set the privateZoneOcid property: The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is + * associated with. + * + * @param privateZoneOcid the privateZoneOcid value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withPrivateZoneOcid(String privateZoneOcid) { + this.privateZoneOcid = privateZoneOcid; + return this; + } + + /** + * Get the scanListenerPortTcp property: The TCP Single Client Access Name (SCAN) port. The default port is 1521. + * + * @return the scanListenerPortTcp value. + */ + public Integer scanListenerPortTcp() { + return this.scanListenerPortTcp; + } + + /** + * Set the scanListenerPortTcp property: The TCP Single Client Access Name (SCAN) port. The default port is 1521. + * + * @param scanListenerPortTcp the scanListenerPortTcp value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withScanListenerPortTcp(Integer scanListenerPortTcp) { + this.scanListenerPortTcp = scanListenerPortTcp; + return this; + } + + /** + * Get the scanListenerPortTcpSsl property: The TCPS Single Client Access Name (SCAN) port. The default port is + * 2484. + * + * @return the scanListenerPortTcpSsl value. + */ + public Integer scanListenerPortTcpSsl() { + return this.scanListenerPortTcpSsl; + } + + /** + * Set the scanListenerPortTcpSsl property: The TCPS Single Client Access Name (SCAN) port. The default port is + * 2484. + * + * @param scanListenerPortTcpSsl the scanListenerPortTcpSsl value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withScanListenerPortTcpSsl(Integer scanListenerPortTcpSsl) { + this.scanListenerPortTcpSsl = scanListenerPortTcpSsl; + return this; + } + + /** + * Get the listenerPort property: The port number configured for the listener on the Exadata VM cluster on Exascale + * Infrastructure. + * + * @return the listenerPort value. + */ + public Integer listenerPort() { + return this.listenerPort; + } + + /** + * Get the shape property: The shape of the Exadata VM cluster on Exascale Infrastructure resource. + * + * @return the shape value. + */ + public String shape() { + return this.shape; + } + + /** + * Set the shape property: The shape of the Exadata VM cluster on Exascale Infrastructure resource. + * + * @param shape the shape value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withShape(String shape) { + this.shape = shape; + return this; + } + + /** + * Get the sshPublicKeys property: The public key portion of one or more key pairs used for SSH access to the + * Exadata VM cluster on Exascale Infrastructure. + * + * @return the sshPublicKeys value. + */ + public List sshPublicKeys() { + return this.sshPublicKeys; + } + + /** + * Set the sshPublicKeys property: The public key portion of one or more key pairs used for SSH access to the + * Exadata VM cluster on Exascale Infrastructure. + * + * @param sshPublicKeys the sshPublicKeys value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withSshPublicKeys(List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + return this; + } + + /** + * Get the systemVersion property: Operating system version of the image. + * + * @return the systemVersion value. + */ + public String systemVersion() { + return this.systemVersion; + } + + /** + * Set the systemVersion property: Operating system version of the image. + * + * @param systemVersion the systemVersion value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withSystemVersion(String systemVersion) { + this.systemVersion = systemVersion; + return this; + } + + /** + * Get the timeZone property: The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see + * [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see + * [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + * + * @param timeZone the timeZone value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the totalEcpuCount property: The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @return the totalEcpuCount value. + */ + public int totalEcpuCount() { + return this.totalEcpuCount; + } + + /** + * Set the totalEcpuCount property: The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + * + * @param totalEcpuCount the totalEcpuCount value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withTotalEcpuCount(int totalEcpuCount) { + this.totalEcpuCount = totalEcpuCount; + return this; + } + + /** + * Get the vmFileSystemStorage property: Filesystem storage details. + * + * @return the vmFileSystemStorage value. + */ + public ExadbVmClusterStorageDetails vmFileSystemStorage() { + return this.vmFileSystemStorage; + } + + /** + * Set the vmFileSystemStorage property: Filesystem storage details. + * + * @param vmFileSystemStorage the vmFileSystemStorage value to set. + * @return the ExadbVmClusterProperties object itself. + */ + public ExadbVmClusterProperties withVmFileSystemStorage(ExadbVmClusterStorageDetails vmFileSystemStorage) { + this.vmFileSystemStorage = vmFileSystemStorage; + return this; + } + + /** + * Get the lifecycleDetails property: Additional information about the current lifecycle state. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Get the scanDnsName property: The FQDN of the DNS record for the SCAN IP addresses that are associated with the + * Exadata VM cluster on Exascale Infrastructure. + * + * @return the scanDnsName value. + */ + public String scanDnsName() { + return this.scanDnsName; + } + + /** + * Get the scanIpIds property: The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM + * cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned + * to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For + * a single-node DB system, this list is empty. + * + * @return the scanIpIds value. + */ + public List scanIpIds() { + return this.scanIpIds; + } + + /** + * Get the scanDnsRecordId property: The OCID of the DNS record for the SCAN IP addresses that are associated with + * the Exadata VM cluster on Exascale Infrastructure. + * + * @return the scanDnsRecordId value. + */ + public String scanDnsRecordId() { + return this.scanDnsRecordId; + } + + /** + * Get the snapshotFileSystemStorage property: Snapshot filesystem storage details. + * + * @return the snapshotFileSystemStorage value. + */ + public ExadbVmClusterStorageDetails snapshotFileSystemStorage() { + return this.snapshotFileSystemStorage; + } + + /** + * Get the totalFileSystemStorage property: Total file system storage details. + * + * @return the totalFileSystemStorage value. + */ + public ExadbVmClusterStorageDetails totalFileSystemStorage() { + return this.totalFileSystemStorage; + } + + /** + * Get the vipIds property: The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale + * Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the + * Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active + * node in the cluster. **Note:** For a single-node DB system, this list is empty. + * + * @return the vipIds value. + */ + public List vipIds() { + return this.vipIds; + } + + /** + * Get the ociUrl property: HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + * + * @return the ociUrl value. + */ + public String ociUrl() { + return this.ociUrl; + } + + /** + * Get the iormConfigCache property: iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + * + * @return the iormConfigCache value. + */ + public ExadataIormConfig iormConfigCache() { + return this.iormConfigCache; + } + + /** + * Get the backupSubnetOcid property: Cluster backup subnet ocid. + * + * @return the backupSubnetOcid value. + */ + public String backupSubnetOcid() { + return this.backupSubnetOcid; + } + + /** + * Get the subnetOcid property: Cluster subnet ocid. + * + * @return the subnetOcid value. + */ + public String subnetOcid() { + return this.subnetOcid; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vnetId() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property vnetId in model ExadbVmClusterProperties")); + } + if (subnetId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetId in model ExadbVmClusterProperties")); + } + if (dataCollectionOptions() != null) { + dataCollectionOptions().validate(); + } + if (displayName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property displayName in model ExadbVmClusterProperties")); + } + if (exascaleDbStorageVaultId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property exascaleDbStorageVaultId in model ExadbVmClusterProperties")); + } + if (hostname() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property hostname in model ExadbVmClusterProperties")); + } + if (nsgCidrs() != null) { + nsgCidrs().forEach(e -> e.validate()); + } + if (shape() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property shape in model ExadbVmClusterProperties")); + } + if (sshPublicKeys() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sshPublicKeys in model ExadbVmClusterProperties")); + } + if (vmFileSystemStorage() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property vmFileSystemStorage in model ExadbVmClusterProperties")); + } else { + vmFileSystemStorage().validate(); + } + if (snapshotFileSystemStorage() != null) { + snapshotFileSystemStorage().validate(); + } + if (totalFileSystemStorage() != null) { + totalFileSystemStorage().validate(); + } + if (iormConfigCache() != null) { + iormConfigCache().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExadbVmClusterProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vnetId", this.vnetId); + jsonWriter.writeStringField("subnetId", this.subnetId); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeIntField("enabledEcpuCount", this.enabledEcpuCount); + jsonWriter.writeStringField("exascaleDbStorageVaultId", this.exascaleDbStorageVaultId); + jsonWriter.writeStringField("hostname", this.hostname); + jsonWriter.writeIntField("nodeCount", this.nodeCount); + jsonWriter.writeStringField("shape", this.shape); + jsonWriter.writeArrayField("sshPublicKeys", this.sshPublicKeys, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeIntField("totalEcpuCount", this.totalEcpuCount); + jsonWriter.writeJsonField("vmFileSystemStorage", this.vmFileSystemStorage); + jsonWriter.writeStringField("clusterName", this.clusterName); + jsonWriter.writeStringField("backupSubnetCidr", this.backupSubnetCidr); + jsonWriter.writeJsonField("dataCollectionOptions", this.dataCollectionOptions); + jsonWriter.writeStringField("domain", this.domain); + jsonWriter.writeStringField("gridImageOcid", this.gridImageOcid); + jsonWriter.writeStringField("licenseModel", this.licenseModel == null ? null : this.licenseModel.toString()); + jsonWriter.writeArrayField("nsgCidrs", this.nsgCidrs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("privateZoneOcid", this.privateZoneOcid); + jsonWriter.writeNumberField("scanListenerPortTcp", this.scanListenerPortTcp); + jsonWriter.writeNumberField("scanListenerPortTcpSsl", this.scanListenerPortTcpSsl); + jsonWriter.writeStringField("systemVersion", this.systemVersion); + jsonWriter.writeStringField("timeZone", this.timeZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExadbVmClusterProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExadbVmClusterProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExadbVmClusterProperties. + */ + public static ExadbVmClusterProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExadbVmClusterProperties deserializedExadbVmClusterProperties = new ExadbVmClusterProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vnetId".equals(fieldName)) { + deserializedExadbVmClusterProperties.vnetId = reader.getString(); + } else if ("subnetId".equals(fieldName)) { + deserializedExadbVmClusterProperties.subnetId = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedExadbVmClusterProperties.displayName = reader.getString(); + } else if ("enabledEcpuCount".equals(fieldName)) { + deserializedExadbVmClusterProperties.enabledEcpuCount = reader.getInt(); + } else if ("exascaleDbStorageVaultId".equals(fieldName)) { + deserializedExadbVmClusterProperties.exascaleDbStorageVaultId = reader.getString(); + } else if ("hostname".equals(fieldName)) { + deserializedExadbVmClusterProperties.hostname = reader.getString(); + } else if ("nodeCount".equals(fieldName)) { + deserializedExadbVmClusterProperties.nodeCount = reader.getInt(); + } else if ("shape".equals(fieldName)) { + deserializedExadbVmClusterProperties.shape = reader.getString(); + } else if ("sshPublicKeys".equals(fieldName)) { + List sshPublicKeys = reader.readArray(reader1 -> reader1.getString()); + deserializedExadbVmClusterProperties.sshPublicKeys = sshPublicKeys; + } else if ("totalEcpuCount".equals(fieldName)) { + deserializedExadbVmClusterProperties.totalEcpuCount = reader.getInt(); + } else if ("vmFileSystemStorage".equals(fieldName)) { + deserializedExadbVmClusterProperties.vmFileSystemStorage + = ExadbVmClusterStorageDetails.fromJson(reader); + } else if ("ocid".equals(fieldName)) { + deserializedExadbVmClusterProperties.ocid = reader.getString(); + } else if ("clusterName".equals(fieldName)) { + deserializedExadbVmClusterProperties.clusterName = reader.getString(); + } else if ("backupSubnetCidr".equals(fieldName)) { + deserializedExadbVmClusterProperties.backupSubnetCidr = reader.getString(); + } else if ("nsgUrl".equals(fieldName)) { + deserializedExadbVmClusterProperties.nsgUrl = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedExadbVmClusterProperties.provisioningState + = AzureResourceProvisioningState.fromString(reader.getString()); + } else if ("lifecycleState".equals(fieldName)) { + deserializedExadbVmClusterProperties.lifecycleState + = ExadbVmClusterLifecycleState.fromString(reader.getString()); + } else if ("dataCollectionOptions".equals(fieldName)) { + deserializedExadbVmClusterProperties.dataCollectionOptions = DataCollectionOptions.fromJson(reader); + } else if ("domain".equals(fieldName)) { + deserializedExadbVmClusterProperties.domain = reader.getString(); + } else if ("gridImageOcid".equals(fieldName)) { + deserializedExadbVmClusterProperties.gridImageOcid = reader.getString(); + } else if ("gridImageType".equals(fieldName)) { + deserializedExadbVmClusterProperties.gridImageType = GridImageType.fromString(reader.getString()); + } else if ("giVersion".equals(fieldName)) { + deserializedExadbVmClusterProperties.giVersion = reader.getString(); + } else if ("licenseModel".equals(fieldName)) { + deserializedExadbVmClusterProperties.licenseModel = LicenseModel.fromString(reader.getString()); + } else if ("memorySizeInGbs".equals(fieldName)) { + deserializedExadbVmClusterProperties.memorySizeInGbs = reader.getNullable(JsonReader::getInt); + } else if ("nsgCidrs".equals(fieldName)) { + List nsgCidrs = reader.readArray(reader1 -> NsgCidr.fromJson(reader1)); + deserializedExadbVmClusterProperties.nsgCidrs = nsgCidrs; + } else if ("zoneOcid".equals(fieldName)) { + deserializedExadbVmClusterProperties.zoneOcid = reader.getString(); + } else if ("privateZoneOcid".equals(fieldName)) { + deserializedExadbVmClusterProperties.privateZoneOcid = reader.getString(); + } else if ("scanListenerPortTcp".equals(fieldName)) { + deserializedExadbVmClusterProperties.scanListenerPortTcp = reader.getNullable(JsonReader::getInt); + } else if ("scanListenerPortTcpSsl".equals(fieldName)) { + deserializedExadbVmClusterProperties.scanListenerPortTcpSsl + = reader.getNullable(JsonReader::getInt); + } else if ("listenerPort".equals(fieldName)) { + deserializedExadbVmClusterProperties.listenerPort = reader.getNullable(JsonReader::getInt); + } else if ("systemVersion".equals(fieldName)) { + deserializedExadbVmClusterProperties.systemVersion = reader.getString(); + } else if ("timeZone".equals(fieldName)) { + deserializedExadbVmClusterProperties.timeZone = reader.getString(); + } else if ("lifecycleDetails".equals(fieldName)) { + deserializedExadbVmClusterProperties.lifecycleDetails = reader.getString(); + } else if ("scanDnsName".equals(fieldName)) { + deserializedExadbVmClusterProperties.scanDnsName = reader.getString(); + } else if ("scanIpIds".equals(fieldName)) { + List scanIpIds = reader.readArray(reader1 -> reader1.getString()); + deserializedExadbVmClusterProperties.scanIpIds = scanIpIds; + } else if ("scanDnsRecordId".equals(fieldName)) { + deserializedExadbVmClusterProperties.scanDnsRecordId = reader.getString(); + } else if ("snapshotFileSystemStorage".equals(fieldName)) { + deserializedExadbVmClusterProperties.snapshotFileSystemStorage + = ExadbVmClusterStorageDetails.fromJson(reader); + } else if ("totalFileSystemStorage".equals(fieldName)) { + deserializedExadbVmClusterProperties.totalFileSystemStorage + = ExadbVmClusterStorageDetails.fromJson(reader); + } else if ("vipIds".equals(fieldName)) { + List vipIds = reader.readArray(reader1 -> reader1.getString()); + deserializedExadbVmClusterProperties.vipIds = vipIds; + } else if ("ociUrl".equals(fieldName)) { + deserializedExadbVmClusterProperties.ociUrl = reader.getString(); + } else if ("iormConfigCache".equals(fieldName)) { + deserializedExadbVmClusterProperties.iormConfigCache = ExadataIormConfig.fromJson(reader); + } else if ("backupSubnetOcid".equals(fieldName)) { + deserializedExadbVmClusterProperties.backupSubnetOcid = reader.getString(); + } else if ("subnetOcid".equals(fieldName)) { + deserializedExadbVmClusterProperties.subnetOcid = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExadbVmClusterProperties; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterStorageDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterStorageDetails.java new file mode 100644 index 000000000000..0b362958fb0b --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterStorageDetails.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Storage Details on the Exadata VM cluster. + */ +@Fluent +public final class ExadbVmClusterStorageDetails implements JsonSerializable { + /* + * Total Capacity + */ + private int totalSizeInGbs; + + /** + * Creates an instance of ExadbVmClusterStorageDetails class. + */ + public ExadbVmClusterStorageDetails() { + } + + /** + * Get the totalSizeInGbs property: Total Capacity. + * + * @return the totalSizeInGbs value. + */ + public int totalSizeInGbs() { + return this.totalSizeInGbs; + } + + /** + * Set the totalSizeInGbs property: Total Capacity. + * + * @param totalSizeInGbs the totalSizeInGbs value to set. + * @return the ExadbVmClusterStorageDetails object itself. + */ + public ExadbVmClusterStorageDetails withTotalSizeInGbs(int totalSizeInGbs) { + this.totalSizeInGbs = totalSizeInGbs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("totalSizeInGbs", this.totalSizeInGbs); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExadbVmClusterStorageDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExadbVmClusterStorageDetails if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExadbVmClusterStorageDetails. + */ + public static ExadbVmClusterStorageDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExadbVmClusterStorageDetails deserializedExadbVmClusterStorageDetails = new ExadbVmClusterStorageDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("totalSizeInGbs".equals(fieldName)) { + deserializedExadbVmClusterStorageDetails.totalSizeInGbs = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedExadbVmClusterStorageDetails; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterUpdate.java new file mode 100644 index 000000000000..a2c68d66aab5 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterUpdate.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The type used for update operations of the ExadbVmCluster. + */ +@Fluent +public final class ExadbVmClusterUpdate implements JsonSerializable { + /* + * The availability zones. + */ + private List zones; + + /* + * Resource tags. + */ + private Map tags; + + /* + * The resource-specific properties for this resource. + */ + private ExadbVmClusterUpdateProperties properties; + + /** + * Creates an instance of ExadbVmClusterUpdate class. + */ + public ExadbVmClusterUpdate() { + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the ExadbVmClusterUpdate object itself. + */ + public ExadbVmClusterUpdate withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ExadbVmClusterUpdate object itself. + */ + public ExadbVmClusterUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExadbVmClusterUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ExadbVmClusterUpdate object itself. + */ + public ExadbVmClusterUpdate withProperties(ExadbVmClusterUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExadbVmClusterUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExadbVmClusterUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExadbVmClusterUpdate. + */ + public static ExadbVmClusterUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExadbVmClusterUpdate deserializedExadbVmClusterUpdate = new ExadbVmClusterUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedExadbVmClusterUpdate.zones = zones; + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExadbVmClusterUpdate.tags = tags; + } else if ("properties".equals(fieldName)) { + deserializedExadbVmClusterUpdate.properties = ExadbVmClusterUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedExadbVmClusterUpdate; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterUpdateProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterUpdateProperties.java new file mode 100644 index 000000000000..9d03b2cc839f --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterUpdateProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The updatable properties of the ExadbVmCluster. + */ +@Fluent +public final class ExadbVmClusterUpdateProperties implements JsonSerializable { + /* + * The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + */ + private Integer nodeCount; + + /** + * Creates an instance of ExadbVmClusterUpdateProperties class. + */ + public ExadbVmClusterUpdateProperties() { + } + + /** + * Get the nodeCount property: The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @return the nodeCount value. + */ + public Integer nodeCount() { + return this.nodeCount; + } + + /** + * Set the nodeCount property: The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + * + * @param nodeCount the nodeCount value to set. + * @return the ExadbVmClusterUpdateProperties object itself. + */ + public ExadbVmClusterUpdateProperties withNodeCount(Integer nodeCount) { + this.nodeCount = nodeCount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("nodeCount", this.nodeCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExadbVmClusterUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExadbVmClusterUpdateProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExadbVmClusterUpdateProperties. + */ + public static ExadbVmClusterUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExadbVmClusterUpdateProperties deserializedExadbVmClusterUpdateProperties + = new ExadbVmClusterUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeCount".equals(fieldName)) { + deserializedExadbVmClusterUpdateProperties.nodeCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedExadbVmClusterUpdateProperties; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusters.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusters.java new file mode 100644 index 000000000000..e658c4550b1f --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusters.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ExadbVmClusters. + */ +public interface ExadbVmClusters { + /** + * List ExadbVmCluster resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List ExadbVmCluster resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String exadbVmClusterName, + Context context); + + /** + * Get a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster. + */ + ExadbVmCluster getByResourceGroup(String resourceGroupName, String exadbVmClusterName); + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteByResourceGroup(String resourceGroupName, String exadbVmClusterName); + + /** + * Delete a ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @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 delete(String resourceGroupName, String exadbVmClusterName, Context context); + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List ExadbVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExadbVmCluster list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExadbVmCluster removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + ExadbVmCluster removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body, Context context); + + /** + * Get a ExadbVmCluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster along with {@link Response}. + */ + ExadbVmCluster getById(String id); + + /** + * Get a ExadbVmCluster. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExadbVmCluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ExadbVmCluster. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ExadbVmCluster. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ExadbVmCluster resource. + * + * @param name resource name. + * @return the first stage of the new ExadbVmCluster definition. + */ + ExadbVmCluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNode.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNode.java new file mode 100644 index 000000000000..d94a8d544300 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNode.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner; + +/** + * An immutable client-side representation of ExascaleDbNode. + */ +public interface ExascaleDbNode { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ExascaleDbNodeProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner object. + * + * @return the inner object. + */ + ExascaleDbNodeInner innerModel(); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodeProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodeProperties.java new file mode 100644 index 000000000000..2d9b503bea67 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodeProperties.java @@ -0,0 +1,311 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The properties of DbNodeResource. + */ +@Immutable +public final class ExascaleDbNodeProperties implements JsonSerializable { + /* + * DbNode OCID + */ + private String ocid; + + /* + * Additional information about the planned maintenance. + */ + private String additionalDetails; + + /* + * The number of CPU cores enabled on the Db node. + */ + private Integer cpuCoreCount; + + /* + * The allocated local node storage in GBs on the Db node. + */ + private Integer dbNodeStorageSizeInGbs; + + /* + * The name of the Fault Domain the instance is contained in. + */ + private String faultDomain; + + /* + * The host name for the database node. + */ + private String hostname; + + /* + * The current state of the database node. + */ + private DbNodeProvisioningState lifecycleState; + + /* + * The type of database node maintenance. + */ + private String maintenanceType; + + /* + * The allocated memory in GBs on the Db node. + */ + private Integer memorySizeInGbs; + + /* + * The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for + * virtual machine DB systems. + */ + private Integer softwareStorageSizeInGb; + + /* + * End date and time of maintenance window. + */ + private OffsetDateTime timeMaintenanceWindowEnd; + + /* + * Start date and time of maintenance window. + */ + private OffsetDateTime timeMaintenanceWindowStart; + + /* + * The total number of CPU cores reserved on the Db node. + */ + private Integer totalCpuCoreCount; + + /** + * Creates an instance of ExascaleDbNodeProperties class. + */ + private ExascaleDbNodeProperties() { + } + + /** + * Get the ocid property: DbNode OCID. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the additionalDetails property: Additional information about the planned maintenance. + * + * @return the additionalDetails value. + */ + public String additionalDetails() { + return this.additionalDetails; + } + + /** + * Get the cpuCoreCount property: The number of CPU cores enabled on the Db node. + * + * @return the cpuCoreCount value. + */ + public Integer cpuCoreCount() { + return this.cpuCoreCount; + } + + /** + * Get the dbNodeStorageSizeInGbs property: The allocated local node storage in GBs on the Db node. + * + * @return the dbNodeStorageSizeInGbs value. + */ + public Integer dbNodeStorageSizeInGbs() { + return this.dbNodeStorageSizeInGbs; + } + + /** + * Get the faultDomain property: The name of the Fault Domain the instance is contained in. + * + * @return the faultDomain value. + */ + public String faultDomain() { + return this.faultDomain; + } + + /** + * Get the hostname property: The host name for the database node. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Get the lifecycleState property: The current state of the database node. + * + * @return the lifecycleState value. + */ + public DbNodeProvisioningState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the maintenanceType property: The type of database node maintenance. + * + * @return the maintenanceType value. + */ + public String maintenanceType() { + return this.maintenanceType; + } + + /** + * Get the memorySizeInGbs property: The allocated memory in GBs on the Db node. + * + * @return the memorySizeInGbs value. + */ + public Integer memorySizeInGbs() { + return this.memorySizeInGbs; + } + + /** + * Get the softwareStorageSizeInGb property: The size (in GB) of the block storage volume allocation for the DB + * system. This attribute applies only for virtual machine DB systems. + * + * @return the softwareStorageSizeInGb value. + */ + public Integer softwareStorageSizeInGb() { + return this.softwareStorageSizeInGb; + } + + /** + * Get the timeMaintenanceWindowEnd property: End date and time of maintenance window. + * + * @return the timeMaintenanceWindowEnd value. + */ + public OffsetDateTime timeMaintenanceWindowEnd() { + return this.timeMaintenanceWindowEnd; + } + + /** + * Get the timeMaintenanceWindowStart property: Start date and time of maintenance window. + * + * @return the timeMaintenanceWindowStart value. + */ + public OffsetDateTime timeMaintenanceWindowStart() { + return this.timeMaintenanceWindowStart; + } + + /** + * Get the totalCpuCoreCount property: The total number of CPU cores reserved on the Db node. + * + * @return the totalCpuCoreCount value. + */ + public Integer totalCpuCoreCount() { + return this.totalCpuCoreCount; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ocid() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property ocid in model ExascaleDbNodeProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExascaleDbNodeProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ocid", this.ocid); + jsonWriter.writeStringField("additionalDetails", this.additionalDetails); + jsonWriter.writeNumberField("cpuCoreCount", this.cpuCoreCount); + jsonWriter.writeNumberField("dbNodeStorageSizeInGbs", this.dbNodeStorageSizeInGbs); + jsonWriter.writeStringField("faultDomain", this.faultDomain); + jsonWriter.writeStringField("hostname", this.hostname); + jsonWriter.writeStringField("lifecycleState", + this.lifecycleState == null ? null : this.lifecycleState.toString()); + jsonWriter.writeStringField("maintenanceType", this.maintenanceType); + jsonWriter.writeNumberField("memorySizeInGbs", this.memorySizeInGbs); + jsonWriter.writeNumberField("softwareStorageSizeInGb", this.softwareStorageSizeInGb); + jsonWriter.writeStringField("timeMaintenanceWindowEnd", + this.timeMaintenanceWindowEnd == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timeMaintenanceWindowEnd)); + jsonWriter.writeStringField("timeMaintenanceWindowStart", + this.timeMaintenanceWindowStart == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timeMaintenanceWindowStart)); + jsonWriter.writeNumberField("totalCpuCoreCount", this.totalCpuCoreCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbNodeProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbNodeProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExascaleDbNodeProperties. + */ + public static ExascaleDbNodeProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbNodeProperties deserializedExascaleDbNodeProperties = new ExascaleDbNodeProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ocid".equals(fieldName)) { + deserializedExascaleDbNodeProperties.ocid = reader.getString(); + } else if ("additionalDetails".equals(fieldName)) { + deserializedExascaleDbNodeProperties.additionalDetails = reader.getString(); + } else if ("cpuCoreCount".equals(fieldName)) { + deserializedExascaleDbNodeProperties.cpuCoreCount = reader.getNullable(JsonReader::getInt); + } else if ("dbNodeStorageSizeInGbs".equals(fieldName)) { + deserializedExascaleDbNodeProperties.dbNodeStorageSizeInGbs + = reader.getNullable(JsonReader::getInt); + } else if ("faultDomain".equals(fieldName)) { + deserializedExascaleDbNodeProperties.faultDomain = reader.getString(); + } else if ("hostname".equals(fieldName)) { + deserializedExascaleDbNodeProperties.hostname = reader.getString(); + } else if ("lifecycleState".equals(fieldName)) { + deserializedExascaleDbNodeProperties.lifecycleState + = DbNodeProvisioningState.fromString(reader.getString()); + } else if ("maintenanceType".equals(fieldName)) { + deserializedExascaleDbNodeProperties.maintenanceType = reader.getString(); + } else if ("memorySizeInGbs".equals(fieldName)) { + deserializedExascaleDbNodeProperties.memorySizeInGbs = reader.getNullable(JsonReader::getInt); + } else if ("softwareStorageSizeInGb".equals(fieldName)) { + deserializedExascaleDbNodeProperties.softwareStorageSizeInGb + = reader.getNullable(JsonReader::getInt); + } else if ("timeMaintenanceWindowEnd".equals(fieldName)) { + deserializedExascaleDbNodeProperties.timeMaintenanceWindowEnd = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("timeMaintenanceWindowStart".equals(fieldName)) { + deserializedExascaleDbNodeProperties.timeMaintenanceWindowStart = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("totalCpuCoreCount".equals(fieldName)) { + deserializedExascaleDbNodeProperties.totalCpuCoreCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbNodeProperties; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodes.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodes.java new file mode 100644 index 000000000000..09370238579f --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodes.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ExascaleDbNodes. + */ +public interface ExascaleDbNodes { + /** + * Get a ExascaleDbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbNode along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName, Context context); + + /** + * Get a ExascaleDbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbNode. + */ + ExascaleDbNode get(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName); + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String exadbVmClusterName); + + /** + * List ExascaleDbNode resources by ExadbVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbNode list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String resourceGroupName, String exadbVmClusterName, Context context); + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DbActionResponse action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body); + + /** + * VM actions on DbNode of ExadbVmCluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exadbVmClusterName The name of the ExadbVmCluster. + * @param exascaleDbNodeName The name of the ExascaleDbNode. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + DbActionResponse action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body, Context context); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageDetails.java new file mode 100644 index 000000000000..524f44bb91a6 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageDetails.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Exadata Database Storage Details. + */ +@Immutable +public final class ExascaleDbStorageDetails implements JsonSerializable { + /* + * Available Capacity + */ + private Integer availableSizeInGbs; + + /* + * Total Capacity + */ + private Integer totalSizeInGbs; + + /** + * Creates an instance of ExascaleDbStorageDetails class. + */ + private ExascaleDbStorageDetails() { + } + + /** + * Get the availableSizeInGbs property: Available Capacity. + * + * @return the availableSizeInGbs value. + */ + public Integer availableSizeInGbs() { + return this.availableSizeInGbs; + } + + /** + * Get the totalSizeInGbs property: Total Capacity. + * + * @return the totalSizeInGbs value. + */ + public Integer totalSizeInGbs() { + return this.totalSizeInGbs; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("availableSizeInGbs", this.availableSizeInGbs); + jsonWriter.writeNumberField("totalSizeInGbs", this.totalSizeInGbs); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbStorageDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbStorageDetails if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExascaleDbStorageDetails. + */ + public static ExascaleDbStorageDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbStorageDetails deserializedExascaleDbStorageDetails = new ExascaleDbStorageDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("availableSizeInGbs".equals(fieldName)) { + deserializedExascaleDbStorageDetails.availableSizeInGbs = reader.getNullable(JsonReader::getInt); + } else if ("totalSizeInGbs".equals(fieldName)) { + deserializedExascaleDbStorageDetails.totalSizeInGbs = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbStorageDetails; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageInputDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageInputDetails.java new file mode 100644 index 000000000000..4518d971eb85 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageInputDetails.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Create exadata Database Storage Details model. + */ +@Fluent +public final class ExascaleDbStorageInputDetails implements JsonSerializable { + /* + * Total Capacity + */ + private int totalSizeInGbs; + + /** + * Creates an instance of ExascaleDbStorageInputDetails class. + */ + public ExascaleDbStorageInputDetails() { + } + + /** + * Get the totalSizeInGbs property: Total Capacity. + * + * @return the totalSizeInGbs value. + */ + public int totalSizeInGbs() { + return this.totalSizeInGbs; + } + + /** + * Set the totalSizeInGbs property: Total Capacity. + * + * @param totalSizeInGbs the totalSizeInGbs value to set. + * @return the ExascaleDbStorageInputDetails object itself. + */ + public ExascaleDbStorageInputDetails withTotalSizeInGbs(int totalSizeInGbs) { + this.totalSizeInGbs = totalSizeInGbs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeIntField("totalSizeInGbs", this.totalSizeInGbs); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbStorageInputDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbStorageInputDetails if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExascaleDbStorageInputDetails. + */ + public static ExascaleDbStorageInputDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbStorageInputDetails deserializedExascaleDbStorageInputDetails + = new ExascaleDbStorageInputDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("totalSizeInGbs".equals(fieldName)) { + deserializedExascaleDbStorageInputDetails.totalSizeInGbs = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbStorageInputDetails; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVault.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVault.java new file mode 100644 index 000000000000..d83927032a84 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVault.java @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of ExascaleDbStorageVault. + */ +public interface ExascaleDbStorageVault { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + ExascaleDbStorageVaultProperties properties(); + + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List zones(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner object. + * + * @return the inner object. + */ + ExascaleDbStorageVaultInner innerModel(); + + /** + * The entirety of the ExascaleDbStorageVault definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The ExascaleDbStorageVault definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ExascaleDbStorageVault definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ExascaleDbStorageVault definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the ExascaleDbStorageVault definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the ExascaleDbStorageVault definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithZones { + /** + * Executes the create request. + * + * @return the created resource. + */ + ExascaleDbStorageVault create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ExascaleDbStorageVault create(Context context); + } + + /** + * The stage of the ExascaleDbStorageVault definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the ExascaleDbStorageVault definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. + * @return the next definition stage. + */ + WithCreate withProperties(ExascaleDbStorageVaultProperties properties); + } + + /** + * The stage of the ExascaleDbStorageVault definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + WithCreate withZones(List zones); + } + } + + /** + * Begins update for the ExascaleDbStorageVault resource. + * + * @return the stage of resource update. + */ + ExascaleDbStorageVault.Update update(); + + /** + * The template for ExascaleDbStorageVault update. + */ + interface Update extends UpdateStages.WithTags { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ExascaleDbStorageVault apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ExascaleDbStorageVault apply(Context context); + } + + /** + * The ExascaleDbStorageVault update stages. + */ + interface UpdateStages { + /** + * The stage of the ExascaleDbStorageVault update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ExascaleDbStorageVault refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ExascaleDbStorageVault refresh(Context context); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultLifecycleState.java new file mode 100644 index 000000000000..ab1be93d9b44 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultLifecycleState.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Exadata Database Storage Vault lifecycle state enum. + */ +public final class ExascaleDbStorageVaultLifecycleState + extends ExpandableStringEnum { + /** + * Indicates that resource in Provisioning state. + */ + public static final ExascaleDbStorageVaultLifecycleState PROVISIONING = fromString("Provisioning"); + + /** + * Indicates that resource in Available state. + */ + public static final ExascaleDbStorageVaultLifecycleState AVAILABLE = fromString("Available"); + + /** + * Indicates that resource in Updating state. + */ + public static final ExascaleDbStorageVaultLifecycleState UPDATING = fromString("Updating"); + + /** + * Indicates that resource in Terminating state. + */ + public static final ExascaleDbStorageVaultLifecycleState TERMINATING = fromString("Terminating"); + + /** + * Indicates that resource in Terminated state. + */ + public static final ExascaleDbStorageVaultLifecycleState TERMINATED = fromString("Terminated"); + + /** + * Indicates that resource in Failed state. + */ + public static final ExascaleDbStorageVaultLifecycleState FAILED = fromString("Failed"); + + /** + * Creates a new instance of ExascaleDbStorageVaultLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExascaleDbStorageVaultLifecycleState() { + } + + /** + * Creates or finds a ExascaleDbStorageVaultLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExascaleDbStorageVaultLifecycleState. + */ + public static ExascaleDbStorageVaultLifecycleState fromString(String name) { + return fromString(name, ExascaleDbStorageVaultLifecycleState.class); + } + + /** + * Gets known ExascaleDbStorageVaultLifecycleState values. + * + * @return known ExascaleDbStorageVaultLifecycleState values. + */ + public static Collection values() { + return values(ExascaleDbStorageVaultLifecycleState.class); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultProperties.java new file mode 100644 index 000000000000..4d19847e807e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultProperties.java @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * ExascaleDbStorageVault resource model. + */ +@Fluent +public final class ExascaleDbStorageVaultProperties implements JsonSerializable { + /* + * The size of additional Flash Cache in percentage of High Capacity database storage. + */ + private Integer additionalFlashCacheInPercent; + + /* + * Exadata Database Storage Vault description. + */ + private String description; + + /* + * The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + */ + private String displayName; + + /* + * Create exadata Database Storage Details + */ + private ExascaleDbStorageInputDetails highCapacityDatabaseStorageInput; + + /* + * Response exadata Database Storage Details + */ + private ExascaleDbStorageDetails highCapacityDatabaseStorage; + + /* + * The time zone that you want to use for the Exadata Database Storage Vault + */ + private String timeZone; + + /* + * Exadata Database Storage Vault provisioning state + */ + private AzureResourceProvisioningState provisioningState; + + /* + * Exadata Database Storage Vault lifecycle state + */ + private ExascaleDbStorageVaultLifecycleState lifecycleState; + + /* + * Additional information about the current lifecycle state. + */ + private String lifecycleDetails; + + /* + * The number of Exadata VM clusters used the Exadata Database Storage Vault. + */ + private Integer vmClusterCount; + + /* + * The OCID of the Exadata Database Storage Vault. + */ + private String ocid; + + /* + * HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + */ + private String ociUrl; + + /** + * Creates an instance of ExascaleDbStorageVaultProperties class. + */ + public ExascaleDbStorageVaultProperties() { + } + + /** + * Get the additionalFlashCacheInPercent property: The size of additional Flash Cache in percentage of High Capacity + * database storage. + * + * @return the additionalFlashCacheInPercent value. + */ + public Integer additionalFlashCacheInPercent() { + return this.additionalFlashCacheInPercent; + } + + /** + * Set the additionalFlashCacheInPercent property: The size of additional Flash Cache in percentage of High Capacity + * database storage. + * + * @param additionalFlashCacheInPercent the additionalFlashCacheInPercent value to set. + * @return the ExascaleDbStorageVaultProperties object itself. + */ + public ExascaleDbStorageVaultProperties withAdditionalFlashCacheInPercent(Integer additionalFlashCacheInPercent) { + this.additionalFlashCacheInPercent = additionalFlashCacheInPercent; + return this; + } + + /** + * Get the description property: Exadata Database Storage Vault description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Exadata Database Storage Vault description. + * + * @param description the description value to set. + * @return the ExascaleDbStorageVaultProperties object itself. + */ + public ExascaleDbStorageVaultProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the displayName property: The user-friendly name for the Exadata Database Storage Vault. The name does not + * need to be unique. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The user-friendly name for the Exadata Database Storage Vault. The name does not + * need to be unique. + * + * @param displayName the displayName value to set. + * @return the ExascaleDbStorageVaultProperties object itself. + */ + public ExascaleDbStorageVaultProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the highCapacityDatabaseStorageInput property: Create exadata Database Storage Details. + * + * @return the highCapacityDatabaseStorageInput value. + */ + public ExascaleDbStorageInputDetails highCapacityDatabaseStorageInput() { + return this.highCapacityDatabaseStorageInput; + } + + /** + * Set the highCapacityDatabaseStorageInput property: Create exadata Database Storage Details. + * + * @param highCapacityDatabaseStorageInput the highCapacityDatabaseStorageInput value to set. + * @return the ExascaleDbStorageVaultProperties object itself. + */ + public ExascaleDbStorageVaultProperties + withHighCapacityDatabaseStorageInput(ExascaleDbStorageInputDetails highCapacityDatabaseStorageInput) { + this.highCapacityDatabaseStorageInput = highCapacityDatabaseStorageInput; + return this; + } + + /** + * Get the highCapacityDatabaseStorage property: Response exadata Database Storage Details. + * + * @return the highCapacityDatabaseStorage value. + */ + public ExascaleDbStorageDetails highCapacityDatabaseStorage() { + return this.highCapacityDatabaseStorage; + } + + /** + * Get the timeZone property: The time zone that you want to use for the Exadata Database Storage Vault. + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: The time zone that you want to use for the Exadata Database Storage Vault. + * + * @param timeZone the timeZone value to set. + * @return the ExascaleDbStorageVaultProperties object itself. + */ + public ExascaleDbStorageVaultProperties withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the provisioningState property: Exadata Database Storage Vault provisioning state. + * + * @return the provisioningState value. + */ + public AzureResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the lifecycleState property: Exadata Database Storage Vault lifecycle state. + * + * @return the lifecycleState value. + */ + public ExascaleDbStorageVaultLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the lifecycleDetails property: Additional information about the current lifecycle state. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Get the vmClusterCount property: The number of Exadata VM clusters used the Exadata Database Storage Vault. + * + * @return the vmClusterCount value. + */ + public Integer vmClusterCount() { + return this.vmClusterCount; + } + + /** + * Get the ocid property: The OCID of the Exadata Database Storage Vault. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the ociUrl property: HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + * + * @return the ociUrl value. + */ + public String ociUrl() { + return this.ociUrl; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (displayName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property displayName in model ExascaleDbStorageVaultProperties")); + } + if (highCapacityDatabaseStorageInput() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property highCapacityDatabaseStorageInput in model ExascaleDbStorageVaultProperties")); + } else { + highCapacityDatabaseStorageInput().validate(); + } + if (highCapacityDatabaseStorage() != null) { + highCapacityDatabaseStorage().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExascaleDbStorageVaultProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeJsonField("highCapacityDatabaseStorageInput", this.highCapacityDatabaseStorageInput); + jsonWriter.writeNumberField("additionalFlashCacheInPercent", this.additionalFlashCacheInPercent); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("timeZone", this.timeZone); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbStorageVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbStorageVaultProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ExascaleDbStorageVaultProperties. + */ + public static ExascaleDbStorageVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbStorageVaultProperties deserializedExascaleDbStorageVaultProperties + = new ExascaleDbStorageVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("displayName".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.displayName = reader.getString(); + } else if ("highCapacityDatabaseStorageInput".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.highCapacityDatabaseStorageInput + = ExascaleDbStorageInputDetails.fromJson(reader); + } else if ("additionalFlashCacheInPercent".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.additionalFlashCacheInPercent + = reader.getNullable(JsonReader::getInt); + } else if ("description".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.description = reader.getString(); + } else if ("highCapacityDatabaseStorage".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.highCapacityDatabaseStorage + = ExascaleDbStorageDetails.fromJson(reader); + } else if ("timeZone".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.timeZone = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.provisioningState + = AzureResourceProvisioningState.fromString(reader.getString()); + } else if ("lifecycleState".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.lifecycleState + = ExascaleDbStorageVaultLifecycleState.fromString(reader.getString()); + } else if ("lifecycleDetails".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.lifecycleDetails = reader.getString(); + } else if ("vmClusterCount".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.vmClusterCount + = reader.getNullable(JsonReader::getInt); + } else if ("ocid".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.ocid = reader.getString(); + } else if ("ociUrl".equals(fieldName)) { + deserializedExascaleDbStorageVaultProperties.ociUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbStorageVaultProperties; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultTagsUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultTagsUpdate.java new file mode 100644 index 000000000000..6dab1f41a7ba --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultTagsUpdate.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The type used for updating tags in ExascaleDbStorageVault resources. + */ +@Fluent +public final class ExascaleDbStorageVaultTagsUpdate implements JsonSerializable { + /* + * Resource tags. + */ + private Map tags; + + /** + * Creates an instance of ExascaleDbStorageVaultTagsUpdate class. + */ + public ExascaleDbStorageVaultTagsUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ExascaleDbStorageVaultTagsUpdate object itself. + */ + public ExascaleDbStorageVaultTagsUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExascaleDbStorageVaultTagsUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExascaleDbStorageVaultTagsUpdate if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ExascaleDbStorageVaultTagsUpdate. + */ + public static ExascaleDbStorageVaultTagsUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExascaleDbStorageVaultTagsUpdate deserializedExascaleDbStorageVaultTagsUpdate + = new ExascaleDbStorageVaultTagsUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedExascaleDbStorageVaultTagsUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedExascaleDbStorageVaultTagsUpdate; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaults.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaults.java new file mode 100644 index 000000000000..b86a940793f3 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaults.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ExascaleDbStorageVaults. + */ +public interface ExascaleDbStorageVaults { + /** + * Get a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String exascaleDbStorageVaultName, Context context); + + /** + * Get a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault. + */ + ExascaleDbStorageVault getByResourceGroup(String resourceGroupName, String exascaleDbStorageVaultName); + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteByResourceGroup(String resourceGroupName, String exascaleDbStorageVaultName); + + /** + * Delete a ExascaleDbStorageVault. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param exascaleDbStorageVaultName The name of the ExascaleDbStorageVault. + * @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 delete(String resourceGroupName, String exascaleDbStorageVaultName, Context context); + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List ExascaleDbStorageVault resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List ExascaleDbStorageVault resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ExascaleDbStorageVault list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get a ExascaleDbStorageVault. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault along with {@link Response}. + */ + ExascaleDbStorageVault getById(String id); + + /** + * Get a ExascaleDbStorageVault. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a ExascaleDbStorageVault along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a ExascaleDbStorageVault. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a ExascaleDbStorageVault. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ExascaleDbStorageVault resource. + * + * @param name resource name. + * @return the first stage of the new ExascaleDbStorageVault definition. + */ + ExascaleDbStorageVault.DefinitionStages.Blank define(String name); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FileSystemConfigurationDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FileSystemConfigurationDetails.java new file mode 100644 index 000000000000..c4c7b2d35cb9 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FileSystemConfigurationDetails.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * File configuration options. + */ +@Fluent +public final class FileSystemConfigurationDetails implements JsonSerializable { + /* + * Mount path + */ + private String mountPoint; + + /* + * Size of the VM + */ + private Integer fileSystemSizeGb; + + /** + * Creates an instance of FileSystemConfigurationDetails class. + */ + public FileSystemConfigurationDetails() { + } + + /** + * Get the mountPoint property: Mount path. + * + * @return the mountPoint value. + */ + public String mountPoint() { + return this.mountPoint; + } + + /** + * Set the mountPoint property: Mount path. + * + * @param mountPoint the mountPoint value to set. + * @return the FileSystemConfigurationDetails object itself. + */ + public FileSystemConfigurationDetails withMountPoint(String mountPoint) { + this.mountPoint = mountPoint; + return this; + } + + /** + * Get the fileSystemSizeGb property: Size of the VM. + * + * @return the fileSystemSizeGb value. + */ + public Integer fileSystemSizeGb() { + return this.fileSystemSizeGb; + } + + /** + * Set the fileSystemSizeGb property: Size of the VM. + * + * @param fileSystemSizeGb the fileSystemSizeGb value to set. + * @return the FileSystemConfigurationDetails object itself. + */ + public FileSystemConfigurationDetails withFileSystemSizeGb(Integer fileSystemSizeGb) { + this.fileSystemSizeGb = fileSystemSizeGb; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mountPoint", this.mountPoint); + jsonWriter.writeNumberField("fileSystemSizeGb", this.fileSystemSizeGb); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FileSystemConfigurationDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FileSystemConfigurationDetails if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FileSystemConfigurationDetails. + */ + public static FileSystemConfigurationDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FileSystemConfigurationDetails deserializedFileSystemConfigurationDetails + = new FileSystemConfigurationDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mountPoint".equals(fieldName)) { + deserializedFileSystemConfigurationDetails.mountPoint = reader.getString(); + } else if ("fileSystemSizeGb".equals(fieldName)) { + deserializedFileSystemConfigurationDetails.fileSystemSizeGb + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedFileSystemConfigurationDetails; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponent.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponent.java new file mode 100644 index 000000000000..06a5d5ca9a17 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponent.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner; + +/** + * An immutable client-side representation of FlexComponent. + */ +public interface FlexComponent { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + FlexComponentProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner object. + * + * @return the inner object. + */ + FlexComponentInner innerModel(); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponentProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponentProperties.java new file mode 100644 index 000000000000..5e69016bfa98 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponentProperties.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * FlexComponent resource model. + */ +@Immutable +public final class FlexComponentProperties implements JsonSerializable { + /* + * The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + */ + private Integer minimumCoreCount; + + /* + * The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + */ + private Integer availableCoreCount; + + /* + * The maximum storage that can be enabled on the Storage Server for this Flex Component. + */ + private Integer availableDbStorageInGbs; + + /* + * The runtime minimum number of CPU cores that can be enabled for this Flex Component. + */ + private Integer runtimeMinimumCoreCount; + + /* + * The name of the DB system shape for this Flex Component. + */ + private String shape; + + /* + * The maximum memory size that can be enabled on the DB Server for this Flex Component. + */ + private Integer availableMemoryInGbs; + + /* + * The maximum local storage that can be enabled on the DB Server for this Flex Component. + */ + private Integer availableLocalStorageInGbs; + + /* + * The compute model of the DB Server for this Flex Component. + */ + private String computeModel; + + /* + * The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + */ + private HardwareType hardwareType; + + /* + * The description summary for this Flex Component. + */ + private String descriptionSummary; + + /** + * Creates an instance of FlexComponentProperties class. + */ + private FlexComponentProperties() { + } + + /** + * Get the minimumCoreCount property: The minimum number of CPU cores that can be enabled on the DB Server for this + * Flex Component. + * + * @return the minimumCoreCount value. + */ + public Integer minimumCoreCount() { + return this.minimumCoreCount; + } + + /** + * Get the availableCoreCount property: The maximum number of CPU cores that can be enabled on the DB Server for + * this Flex Component. + * + * @return the availableCoreCount value. + */ + public Integer availableCoreCount() { + return this.availableCoreCount; + } + + /** + * Get the availableDbStorageInGbs property: The maximum storage that can be enabled on the Storage Server for this + * Flex Component. + * + * @return the availableDbStorageInGbs value. + */ + public Integer availableDbStorageInGbs() { + return this.availableDbStorageInGbs; + } + + /** + * Get the runtimeMinimumCoreCount property: The runtime minimum number of CPU cores that can be enabled for this + * Flex Component. + * + * @return the runtimeMinimumCoreCount value. + */ + public Integer runtimeMinimumCoreCount() { + return this.runtimeMinimumCoreCount; + } + + /** + * Get the shape property: The name of the DB system shape for this Flex Component. + * + * @return the shape value. + */ + public String shape() { + return this.shape; + } + + /** + * Get the availableMemoryInGbs property: The maximum memory size that can be enabled on the DB Server for this Flex + * Component. + * + * @return the availableMemoryInGbs value. + */ + public Integer availableMemoryInGbs() { + return this.availableMemoryInGbs; + } + + /** + * Get the availableLocalStorageInGbs property: The maximum local storage that can be enabled on the DB Server for + * this Flex Component. + * + * @return the availableLocalStorageInGbs value. + */ + public Integer availableLocalStorageInGbs() { + return this.availableLocalStorageInGbs; + } + + /** + * Get the computeModel property: The compute model of the DB Server for this Flex Component. + * + * @return the computeModel value. + */ + public String computeModel() { + return this.computeModel; + } + + /** + * Get the hardwareType property: The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex + * Component. + * + * @return the hardwareType value. + */ + public HardwareType hardwareType() { + return this.hardwareType; + } + + /** + * Get the descriptionSummary property: The description summary for this Flex Component. + * + * @return the descriptionSummary value. + */ + public String descriptionSummary() { + return this.descriptionSummary; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FlexComponentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FlexComponentProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FlexComponentProperties. + */ + public static FlexComponentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FlexComponentProperties deserializedFlexComponentProperties = new FlexComponentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minimumCoreCount".equals(fieldName)) { + deserializedFlexComponentProperties.minimumCoreCount = reader.getNullable(JsonReader::getInt); + } else if ("availableCoreCount".equals(fieldName)) { + deserializedFlexComponentProperties.availableCoreCount = reader.getNullable(JsonReader::getInt); + } else if ("availableDbStorageInGbs".equals(fieldName)) { + deserializedFlexComponentProperties.availableDbStorageInGbs + = reader.getNullable(JsonReader::getInt); + } else if ("runtimeMinimumCoreCount".equals(fieldName)) { + deserializedFlexComponentProperties.runtimeMinimumCoreCount + = reader.getNullable(JsonReader::getInt); + } else if ("shape".equals(fieldName)) { + deserializedFlexComponentProperties.shape = reader.getString(); + } else if ("availableMemoryInGbs".equals(fieldName)) { + deserializedFlexComponentProperties.availableMemoryInGbs = reader.getNullable(JsonReader::getInt); + } else if ("availableLocalStorageInGbs".equals(fieldName)) { + deserializedFlexComponentProperties.availableLocalStorageInGbs + = reader.getNullable(JsonReader::getInt); + } else if ("computeModel".equals(fieldName)) { + deserializedFlexComponentProperties.computeModel = reader.getString(); + } else if ("hardwareType".equals(fieldName)) { + deserializedFlexComponentProperties.hardwareType = HardwareType.fromString(reader.getString()); + } else if ("descriptionSummary".equals(fieldName)) { + deserializedFlexComponentProperties.descriptionSummary = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFlexComponentProperties; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponents.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponents.java new file mode 100644 index 000000000000..88b860de92d9 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponents.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of FlexComponents. + */ +public interface FlexComponents { + /** + * Get a FlexComponent. + * + * @param location The name of the Azure region. + * @param flexComponentName The name of the FlexComponent. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FlexComponent along with {@link Response}. + */ + Response getWithResponse(String location, String flexComponentName, Context context); + + /** + * Get a FlexComponent. + * + * @param location The name of the Azure region. + * @param flexComponentName The name of the FlexComponent. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a FlexComponent. + */ + FlexComponent get(String location, String flexComponentName); + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String location); + + /** + * List FlexComponent resources by SubscriptionLocationResource. + * + * @param location The name of the Azure region. + * @param shape If provided, filters the results for the given shape. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a FlexComponent list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String location, SystemShapes shape, Context context); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GenerateAutonomousDatabaseWalletDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GenerateAutonomousDatabaseWalletDetails.java index aafb2d895e95..7708c7fab668 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GenerateAutonomousDatabaseWalletDetails.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GenerateAutonomousDatabaseWalletDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GenerateType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GenerateType.java index ac16531378e9..b0b22f84f79a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GenerateType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GenerateType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class GenerateType extends ExpandableStringEnum { /** - * Static value Single for GenerateType. + * Generate single. */ public static final GenerateType SINGLE = fromString("Single"); /** - * Static value All for GenerateType. + * Generate all. */ public static final GenerateType ALL = fromString("All"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersion.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersion.java new file mode 100644 index 000000000000..b687bc0c76b3 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersion.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner; + +/** + * An immutable client-side representation of GiMinorVersion. + */ +public interface GiMinorVersion { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + GiMinorVersionProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner object. + * + * @return the inner object. + */ + GiMinorVersionInner innerModel(); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersionProperties.java new file mode 100644 index 000000000000..bc1e05b55006 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersionProperties.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Oracle Grid Infrastructure (GI) minor version properties. + */ +@Immutable +public final class GiMinorVersionProperties implements JsonSerializable { + /* + * A valid Oracle Grid Infrastructure (GI) software version. + */ + private String version; + + /* + * Grid Infrastructure Image Id + */ + private String gridImageOcid; + + /** + * Creates an instance of GiMinorVersionProperties class. + */ + private GiMinorVersionProperties() { + } + + /** + * Get the version property: A valid Oracle Grid Infrastructure (GI) software version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the gridImageOcid property: Grid Infrastructure Image Id. + * + * @return the gridImageOcid value. + */ + public String gridImageOcid() { + return this.gridImageOcid; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (version() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property version in model GiMinorVersionProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GiMinorVersionProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("gridImageOcid", this.gridImageOcid); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GiMinorVersionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GiMinorVersionProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GiMinorVersionProperties. + */ + public static GiMinorVersionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GiMinorVersionProperties deserializedGiMinorVersionProperties = new GiMinorVersionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedGiMinorVersionProperties.version = reader.getString(); + } else if ("gridImageOcid".equals(fieldName)) { + deserializedGiMinorVersionProperties.gridImageOcid = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGiMinorVersionProperties; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersions.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersions.java new file mode 100644 index 000000000000..b5447fcc66b2 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersions.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of GiMinorVersions. + */ +public interface GiMinorVersions { + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String location, String giversionname); + + /** + * List GiMinorVersion resources by GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param shapeFamily If provided, filters the results to the set of database versions which are supported for the + * given shape family. + * @param zone Filters the result for the given Azure Availability Zone. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiMinorVersion list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByParent(String location, String giversionname, ShapeFamily shapeFamily, + String zone, Context context); + + /** + * Get a GiMinorVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param giMinorVersionName The name of the GiMinorVersion. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiMinorVersion along with {@link Response}. + */ + Response getWithResponse(String location, String giversionname, String giMinorVersionName, + Context context); + + /** + * Get a GiMinorVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param giMinorVersionName The name of the GiMinorVersion. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiMinorVersion. + */ + GiMinorVersion get(String location, String giversionname, String giMinorVersionName); +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersion.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersion.java index 6b7632faee7e..ee31d40a6d97 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersion.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersionProperties.java index fc42f2da25d3..25ca5d8acfc7 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersionProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersionProperties.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -24,7 +25,7 @@ public final class GiVersionProperties implements JsonSerializable listByLocation(String location); + Response getWithResponse(String location, String giversionname, Context context); /** - * List GiVersion resources by Location. + * Get a GiVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param giversionname GiVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. + * @return a GiVersion. */ - PagedIterable listByLocation(String location, Context context); + GiVersion get(String location, String giversionname); /** - * Get a GiVersion. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param giversionname GiVersion name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion along with {@link Response}. + * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String location, String giversionname, Context context); + PagedIterable listByLocation(String location); /** - * Get a GiVersion. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param giversionname GiVersion name. + * @param shape If provided, filters the results for the given shape. + * @param zone Filters the result for the given Azure Availability Zone. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a GiVersion. + * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. */ - GiVersion get(String location, String giversionname); + PagedIterable listByLocation(String location, SystemShapes shape, String zone, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GridImageType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GridImageType.java new file mode 100644 index 000000000000..233b3cb0b06a --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GridImageType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * GridImageType enum. + */ +public final class GridImageType extends ExpandableStringEnum { + /** + * Release update. + */ + public static final GridImageType RELEASE_UPDATE = fromString("ReleaseUpdate"); + + /** + * Custom image. + */ + public static final GridImageType CUSTOM_IMAGE = fromString("CustomImage"); + + /** + * Creates a new instance of GridImageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GridImageType() { + } + + /** + * Creates or finds a GridImageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GridImageType. + */ + public static GridImageType fromString(String name) { + return fromString(name, GridImageType.class); + } + + /** + * Gets known GridImageType values. + * + * @return known GridImageType values. + */ + public static Collection values() { + return values(GridImageType.class); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/HardwareType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/HardwareType.java new file mode 100644 index 000000000000..2ffb33c0c89a --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/HardwareType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Hardware Type enum. + */ +public final class HardwareType extends ExpandableStringEnum { + /** + * Hardware type is Database Server. + */ + public static final HardwareType COMPUTE = fromString("COMPUTE"); + + /** + * Hardware type is Storage Server. + */ + public static final HardwareType CELL = fromString("CELL"); + + /** + * Creates a new instance of HardwareType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HardwareType() { + } + + /** + * Creates or finds a HardwareType from its string representation. + * + * @param name a name to look for. + * @return the corresponding HardwareType. + */ + public static HardwareType fromString(String name) { + return fromString(name, HardwareType.class); + } + + /** + * Gets known HardwareType values. + * + * @return known HardwareType values. + */ + public static Collection values() { + return values(HardwareType.class); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/HostFormatType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/HostFormatType.java index 74b936d4a2e5..aaa6263bc0f7 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/HostFormatType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/HostFormatType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class HostFormatType extends ExpandableStringEnum { /** - * Static value Fqdn for HostFormatType. + * FQDN format. */ public static final HostFormatType FQDN = fromString("Fqdn"); /** - * Static value Ip for HostFormatType. + * IP format. */ public static final HostFormatType IP = fromString("Ip"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Intent.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Intent.java index 24f74164f23c..126b3aef7328 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Intent.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Intent.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class Intent extends ExpandableStringEnum { /** - * Static value Retain for Intent. + * Retain intent. */ public static final Intent RETAIN = fromString("Retain"); /** - * Static value Reset for Intent. + * Reset intent. */ public static final Intent RESET = fromString("Reset"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/IormLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/IormLifecycleState.java index a843769e9cb0..dcc3000ed3d4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/IormLifecycleState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/IormLifecycleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,27 +12,27 @@ */ public final class IormLifecycleState extends ExpandableStringEnum { /** - * Static value BootStrapping for IormLifecycleState. + * Indicates that resource in Provisioning state. */ public static final IormLifecycleState BOOT_STRAPPING = fromString("BootStrapping"); /** - * Static value Enabled for IormLifecycleState. + * Indicates that resource in Enabled state. */ public static final IormLifecycleState ENABLED = fromString("Enabled"); /** - * Static value Disabled for IormLifecycleState. + * Indicates that resource in Disabled state. */ public static final IormLifecycleState DISABLED = fromString("Disabled"); /** - * Static value Updating for IormLifecycleState. + * Indicates that resource in Updating state. */ public static final IormLifecycleState UPDATING = fromString("Updating"); /** - * Static value Failed for IormLifecycleState. + * Indicates that resource in Failed state. */ public static final IormLifecycleState FAILED = fromString("Failed"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/LicenseModel.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/LicenseModel.java index 58d7239df30f..9b40fc37c436 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/LicenseModel.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/LicenseModel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class LicenseModel extends ExpandableStringEnum { /** - * Static value LicenseIncluded for LicenseModel. + * License included. */ public static final LicenseModel LICENSE_INCLUDED = fromString("LicenseIncluded"); /** - * Static value BringYourOwnLicense for LicenseModel. + * Bring Your Own License. */ public static final LicenseModel BRING_YOUR_OWN_LICENSE = fromString("BringYourOwnLicense"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/LongTermBackUpScheduleDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/LongTermBackUpScheduleDetails.java index 8caf40c6c269..4a09e5820753 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/LongTermBackUpScheduleDetails.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/LongTermBackUpScheduleDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/MaintenanceWindow.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/MaintenanceWindow.java index c15402963e0e..7d011ca00468 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/MaintenanceWindow.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/MaintenanceWindow.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Month.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Month.java index 9efe665da4d5..2b9c0f097682 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Month.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Month.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/MonthName.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/MonthName.java index 222212746d3a..da98121bf114 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/MonthName.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/MonthName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,62 +12,62 @@ */ public final class MonthName extends ExpandableStringEnum { /** - * Static value January for MonthName. + * January value. */ public static final MonthName JANUARY = fromString("January"); /** - * Static value February for MonthName. + * February value. */ public static final MonthName FEBRUARY = fromString("February"); /** - * Static value March for MonthName. + * March value. */ public static final MonthName MARCH = fromString("March"); /** - * Static value April for MonthName. + * April value. */ public static final MonthName APRIL = fromString("April"); /** - * Static value May for MonthName. + * May value. */ public static final MonthName MAY = fromString("May"); /** - * Static value June for MonthName. + * June value. */ public static final MonthName JUNE = fromString("June"); /** - * Static value July for MonthName. + * July value. */ public static final MonthName JULY = fromString("July"); /** - * Static value August for MonthName. + * August value. */ public static final MonthName AUGUST = fromString("August"); /** - * Static value September for MonthName. + * September value. */ public static final MonthName SEPTEMBER = fromString("September"); /** - * Static value October for MonthName. + * October value. */ public static final MonthName OCTOBER = fromString("October"); /** - * Static value November for MonthName. + * November value. */ public static final MonthName NOVEMBER = fromString("November"); /** - * Static value December for MonthName. + * December value. */ public static final MonthName DECEMBER = fromString("December"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/NsgCidr.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/NsgCidr.java index d7babfe3d78b..292c9734f9d9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/NsgCidr.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/NsgCidr.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Objective.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Objective.java index dab9a749648f..c1c00ae1fe28 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Objective.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Objective.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,27 +12,27 @@ */ public final class Objective extends ExpandableStringEnum { /** - * Static value LowLatency for Objective. + * Low latency objective. */ public static final Objective LOW_LATENCY = fromString("LowLatency"); /** - * Static value HighThroughput for Objective. + * High throughput objective. */ public static final Objective HIGH_THROUGHPUT = fromString("HighThroughput"); /** - * Static value Balanced for Objective. + * Balanced objective. */ public static final Objective BALANCED = fromString("Balanced"); /** - * Static value Auto for Objective. + * Auto objective. */ public static final Objective AUTO = fromString("Auto"); /** - * Static value Basic for Objective. + * Basic objective. */ public static final Objective BASIC = fromString("Basic"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OpenModeType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OpenModeType.java index bf6574f98964..511c0e70207d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OpenModeType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OpenModeType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class OpenModeType extends ExpandableStringEnum { /** - * Static value ReadOnly for OpenModeType. + * ReadOnly mode. */ public static final OpenModeType READ_ONLY = fromString("ReadOnly"); /** - * Static value ReadWrite for OpenModeType. + * ReadWrite mode. */ public static final OpenModeType READ_WRITE = fromString("ReadWrite"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Operation.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Operation.java index 94e8a99a0bdb..e9143dd6619f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Operation.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -42,8 +42,8 @@ public interface Operation { Origin origin(); /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationDisplay.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationDisplay.java index 62e7f9ffa394..0eca3119657f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationDisplay.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for this particular operation. + * Localized display information for and operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Operations.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Operations.java index a086e2d5ca67..c2c46f9bb93e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Operations.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationsInsightsStatusType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationsInsightsStatusType.java index 966bac086472..54b059206c41 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationsInsightsStatusType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OperationsInsightsStatusType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,32 +12,32 @@ */ public final class OperationsInsightsStatusType extends ExpandableStringEnum { /** - * Static value Enabling for OperationsInsightsStatusType. + * Enabling status. */ public static final OperationsInsightsStatusType ENABLING = fromString("Enabling"); /** - * Static value Enabled for OperationsInsightsStatusType. + * Enabled status. */ public static final OperationsInsightsStatusType ENABLED = fromString("Enabled"); /** - * Static value Disabling for OperationsInsightsStatusType. + * Disabling status. */ public static final OperationsInsightsStatusType DISABLING = fromString("Disabling"); /** - * Static value NotEnabled for OperationsInsightsStatusType. + * NotEnabled status. */ public static final OperationsInsightsStatusType NOT_ENABLED = fromString("NotEnabled"); /** - * Static value FailedEnabling for OperationsInsightsStatusType. + * FailedEnabling status. */ public static final OperationsInsightsStatusType FAILED_ENABLING = fromString("FailedEnabling"); /** - * Static value FailedDisabling for OperationsInsightsStatusType. + * FailedDisabling status. */ public static final OperationsInsightsStatusType FAILED_DISABLING = fromString("FailedDisabling"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscription.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscription.java index fe7b1a8c2024..6047ab0d45e0 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscription.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscription.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProperties.java index 6f8c63c789b0..c03b1f20a0d7 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Oracle Subscription resource model. @@ -51,6 +52,21 @@ public final class OracleSubscriptionProperties implements JsonSerializable azureSubscriptionIds; + + /* + * State of the add Azure subscription operation on Oracle subscription + */ + private AddSubscriptionOperationState addSubscriptionOperationState; + + /* + * Status details of the last operation on Oracle subscription + */ + private String lastOperationStatusDetail; + /** * Creates an instance of OracleSubscriptionProperties class. */ @@ -153,6 +169,34 @@ public OracleSubscriptionProperties withIntent(Intent intent) { return this; } + /** + * Get the azureSubscriptionIds property: Azure subscriptions to be added. + * + * @return the azureSubscriptionIds value. + */ + public List azureSubscriptionIds() { + return this.azureSubscriptionIds; + } + + /** + * Get the addSubscriptionOperationState property: State of the add Azure subscription operation on Oracle + * subscription. + * + * @return the addSubscriptionOperationState value. + */ + public AddSubscriptionOperationState addSubscriptionOperationState() { + return this.addSubscriptionOperationState; + } + + /** + * Get the lastOperationStatusDetail property: Status details of the last operation on Oracle subscription. + * + * @return the lastOperationStatusDetail value. + */ + public String lastOperationStatusDetail() { + return this.lastOperationStatusDetail; + } + /** * Validates the instance. * @@ -204,6 +248,14 @@ public static OracleSubscriptionProperties fromJson(JsonReader jsonReader) throw deserializedOracleSubscriptionProperties.productCode = reader.getString(); } else if ("intent".equals(fieldName)) { deserializedOracleSubscriptionProperties.intent = Intent.fromString(reader.getString()); + } else if ("azureSubscriptionIds".equals(fieldName)) { + List azureSubscriptionIds = reader.readArray(reader1 -> reader1.getString()); + deserializedOracleSubscriptionProperties.azureSubscriptionIds = azureSubscriptionIds; + } else if ("addSubscriptionOperationState".equals(fieldName)) { + deserializedOracleSubscriptionProperties.addSubscriptionOperationState + = AddSubscriptionOperationState.fromString(reader.getString()); + } else if ("lastOperationStatusDetail".equals(fieldName)) { + deserializedOracleSubscriptionProperties.lastOperationStatusDetail = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProvisioningState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProvisioningState.java index 4f7d326edfab..66248634a2fb 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProvisioningState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,17 +13,17 @@ public final class OracleSubscriptionProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for OracleSubscriptionProvisioningState. + * Resource has been created. */ public static final OracleSubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for OracleSubscriptionProvisioningState. + * Resource creation failed. */ public static final OracleSubscriptionProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for OracleSubscriptionProvisioningState. + * Resource creation was canceled. */ public static final OracleSubscriptionProvisioningState CANCELED = fromString("Canceled"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionUpdate.java index f2325b9f35a5..ce934ee79b4f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionUpdate.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -22,7 +22,7 @@ public final class OracleSubscriptionUpdate implements JsonSerializable list(Context context); /** - * Get a OracleSubscription. + * Create a OracleSubscription. * - * @param context The context to associate with this operation. + * @param resource Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription along with {@link Response}. + * @return oracleSubscription resource definition. */ - Response getWithResponse(Context context); + OracleSubscription createOrUpdate(OracleSubscriptionInner resource); /** - * Get a OracleSubscription. + * Create a OracleSubscription. * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a OracleSubscription. + * @return oracleSubscription resource definition. */ - OracleSubscription get(); + OracleSubscription createOrUpdate(OracleSubscriptionInner resource, Context context); /** - * Create a OracleSubscription. + * Get a OracleSubscription. * - * @param resource Resource create parameters. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oracleSubscription resource definition. + * @return a OracleSubscription along with {@link Response}. */ - OracleSubscription createOrUpdate(OracleSubscriptionInner resource); + Response getWithResponse(Context context); /** - * Create a OracleSubscription. + * Get a OracleSubscription. * - * @param resource Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return oracleSubscription resource definition. + * @return a OracleSubscription. */ - OracleSubscription createOrUpdate(OracleSubscriptionInner resource, Context context); + OracleSubscription get(); /** * Update a OracleSubscription. @@ -118,62 +118,83 @@ public interface OracleSubscriptions { void delete(Context context); /** - * List Activation Links. + * List Cloud Account Details. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model. + * @return cloud Account Details model. */ - ActivationLinks listActivationLinks(); + CloudAccountDetails listCloudAccountDetails(); /** - * List Activation Links. + * List Cloud Account Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return activation Links model. + * @return cloud Account Details model. */ - ActivationLinks listActivationLinks(Context context); + CloudAccountDetails listCloudAccountDetails(Context context); /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model. + * @return saaS Subscription Details model. */ - CloudAccountDetails listCloudAccountDetails(); + SaasSubscriptionDetails listSaasSubscriptionDetails(); /** - * List Cloud Account Details. + * List Saas Subscription Details. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return cloud Account Details model. + * @return saaS Subscription Details model. */ - CloudAccountDetails listCloudAccountDetails(Context context); + SaasSubscriptionDetails listSaasSubscriptionDetails(Context context); /** - * List Saas Subscription Details. + * List Activation Links. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model. + * @return activation Links model. */ - SaasSubscriptionDetails listSaasSubscriptionDetails(); + ActivationLinks listActivationLinks(); /** - * List Saas Subscription Details. + * List Activation Links. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return saaS Subscription Details model. + * @return activation Links model. */ - SaasSubscriptionDetails listSaasSubscriptionDetails(Context context); + ActivationLinks listActivationLinks(Context context); + + /** + * Add Azure Subscriptions. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 addAzureSubscriptions(AzureSubscriptions body); + + /** + * Add Azure Subscriptions. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void addAzureSubscriptions(AzureSubscriptions body, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Origin.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Origin.java index 3c5bdcdc4005..32794a65e124 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Origin.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,17 +13,17 @@ */ public final class Origin extends ExpandableStringEnum { /** - * Static value user for Origin. + * Indicates the operation is initiated by a user. */ public static final Origin USER = fromString("user"); /** - * Static value system for Origin. + * Indicates the operation is initiated by a system. */ public static final Origin SYSTEM = fromString("system"); /** - * Static value user,system for Origin. + * Indicates the operation is initiated by a user or system. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PatchingMode.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PatchingMode.java index 719a0d2e3a6b..60b763a6b780 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PatchingMode.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PatchingMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class PatchingMode extends ExpandableStringEnum { /** - * Static value Rolling for PatchingMode. + * Rolling patching. */ public static final PatchingMode ROLLING = fromString("Rolling"); /** - * Static value NonRolling for PatchingMode. + * Non Rolling patching. */ public static final PatchingMode NON_ROLLING = fromString("NonRolling"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PeerDbDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PeerDbDetails.java index fedf46f1efc6..09df43cbbda3 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PeerDbDetails.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PeerDbDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -17,11 +17,22 @@ @Fluent public final class PeerDbDetails implements JsonSerializable { /* - * The database OCID of the Disaster Recovery peer database, which is located in a different region from the current - * peer database. + * The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the + * current peer database. */ private String peerDbId; + /* + * Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer + * database. + */ + private String peerDbOcid; + + /* + * The location of the Disaster Recovery peer database. + */ + private String peerDbLocation; + /** * Creates an instance of PeerDbDetails class. */ @@ -29,7 +40,7 @@ public PeerDbDetails() { } /** - * Get the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * Get the peerDbId property: The Azure resource ID of the Disaster Recovery peer database, which is located in a * different region from the current peer database. * * @return the peerDbId value. @@ -39,7 +50,7 @@ public String peerDbId() { } /** - * Set the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * Set the peerDbId property: The Azure resource ID of the Disaster Recovery peer database, which is located in a * different region from the current peer database. * * @param peerDbId the peerDbId value to set. @@ -50,6 +61,48 @@ public PeerDbDetails withPeerDbId(String peerDbId) { return this; } + /** + * Get the peerDbOcid property: Ocid of the Disaster Recovery peer database, which is located in a different region + * from the current peer database. + * + * @return the peerDbOcid value. + */ + public String peerDbOcid() { + return this.peerDbOcid; + } + + /** + * Set the peerDbOcid property: Ocid of the Disaster Recovery peer database, which is located in a different region + * from the current peer database. + * + * @param peerDbOcid the peerDbOcid value to set. + * @return the PeerDbDetails object itself. + */ + public PeerDbDetails withPeerDbOcid(String peerDbOcid) { + this.peerDbOcid = peerDbOcid; + return this; + } + + /** + * Get the peerDbLocation property: The location of the Disaster Recovery peer database. + * + * @return the peerDbLocation value. + */ + public String peerDbLocation() { + return this.peerDbLocation; + } + + /** + * Set the peerDbLocation property: The location of the Disaster Recovery peer database. + * + * @param peerDbLocation the peerDbLocation value to set. + * @return the PeerDbDetails object itself. + */ + public PeerDbDetails withPeerDbLocation(String peerDbLocation) { + this.peerDbLocation = peerDbLocation; + return this; + } + /** * Validates the instance. * @@ -65,6 +118,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("peerDbId", this.peerDbId); + jsonWriter.writeStringField("peerDbOcid", this.peerDbOcid); + jsonWriter.writeStringField("peerDbLocation", this.peerDbLocation); return jsonWriter.writeEndObject(); } @@ -85,6 +140,10 @@ public static PeerDbDetails fromJson(JsonReader jsonReader) throws IOException { if ("peerDbId".equals(fieldName)) { deserializedPeerDbDetails.peerDbId = reader.getString(); + } else if ("peerDbOcid".equals(fieldName)) { + deserializedPeerDbDetails.peerDbOcid = reader.getString(); + } else if ("peerDbLocation".equals(fieldName)) { + deserializedPeerDbDetails.peerDbLocation = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PermissionLevelType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PermissionLevelType.java index 2460526ce95e..bc8a1e1b8ae7 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PermissionLevelType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PermissionLevelType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class PermissionLevelType extends ExpandableStringEnum { /** - * Static value Restricted for PermissionLevelType. + * Restricted permission level. */ public static final PermissionLevelType RESTRICTED = fromString("Restricted"); /** - * Static value Unrestricted for PermissionLevelType. + * Unrestricted permission level. */ public static final PermissionLevelType UNRESTRICTED = fromString("Unrestricted"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Plan.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Plan.java index f766c9a22b97..c8d9ed0c891a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Plan.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Plan.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PlanUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PlanUpdate.java index 62db637a6508..d420ce6bbcca 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PlanUpdate.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PlanUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PortRange.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PortRange.java index fc3432504646..5b59e9d1e063 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PortRange.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PortRange.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Preference.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Preference.java index 76a616989496..c248c9755891 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Preference.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/Preference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class Preference extends ExpandableStringEnum { /** - * Static value NoPreference for Preference. + * No preference. */ public static final Preference NO_PREFERENCE = fromString("NoPreference"); /** - * Static value CustomPreference for Preference. + * Custom preference. */ public static final Preference CUSTOM_PREFERENCE = fromString("CustomPreference"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PrivateIpAddressProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PrivateIpAddressProperties.java index d444bb7fa546..f2b955d60f97 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PrivateIpAddressProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PrivateIpAddressProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PrivateIpAddressesFilter.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PrivateIpAddressesFilter.java index 95982d5ac546..c10d9afa37e6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PrivateIpAddressesFilter.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/PrivateIpAddressesFilter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ProfileType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ProfileType.java index b01f45043258..8384da612ec8 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ProfileType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ProfileType.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,7 +16,7 @@ * The connection string profile to allow clients to group, filter and select connection string values based on * structured metadata. */ -@Fluent +@Immutable public final class ProfileType implements JsonSerializable { /* * Consumer group used by the connection. @@ -67,7 +67,7 @@ public final class ProfileType implements JsonSerializable { /** * Creates an instance of ProfileType class. */ - public ProfileType() { + private ProfileType() { } /** @@ -79,17 +79,6 @@ public ConsumerGroup consumerGroup() { return this.consumerGroup; } - /** - * Set the consumerGroup property: Consumer group used by the connection. - * - * @param consumerGroup the consumerGroup value to set. - * @return the ProfileType object itself. - */ - public ProfileType withConsumerGroup(ConsumerGroup consumerGroup) { - this.consumerGroup = consumerGroup; - return this; - } - /** * Get the displayName property: A user-friendly name for the connection. * @@ -99,17 +88,6 @@ public String displayName() { return this.displayName; } - /** - * Set the displayName property: A user-friendly name for the connection. - * - * @param displayName the displayName value to set. - * @return the ProfileType object itself. - */ - public ProfileType withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - /** * Get the hostFormat property: Host format used in connection string. * @@ -119,17 +97,6 @@ public HostFormatType hostFormat() { return this.hostFormat; } - /** - * Set the hostFormat property: Host format used in connection string. - * - * @param hostFormat the hostFormat value to set. - * @return the ProfileType object itself. - */ - public ProfileType withHostFormat(HostFormatType hostFormat) { - this.hostFormat = hostFormat; - return this; - } - /** * Get the isRegional property: True for a regional connection string, applicable to cross-region DG only. * @@ -139,17 +106,6 @@ public Boolean isRegional() { return this.isRegional; } - /** - * Set the isRegional property: True for a regional connection string, applicable to cross-region DG only. - * - * @param isRegional the isRegional value to set. - * @return the ProfileType object itself. - */ - public ProfileType withIsRegional(Boolean isRegional) { - this.isRegional = isRegional; - return this; - } - /** * Get the protocol property: Protocol used by the connection. * @@ -159,17 +115,6 @@ public ProtocolType protocol() { return this.protocol; } - /** - * Set the protocol property: Protocol used by the connection. - * - * @param protocol the protocol value to set. - * @return the ProfileType object itself. - */ - public ProfileType withProtocol(ProtocolType protocol) { - this.protocol = protocol; - return this; - } - /** * Get the sessionMode property: Specifies whether the listener performs a direct hand-off of the session, or * redirects the session. @@ -180,18 +125,6 @@ public SessionModeType sessionMode() { return this.sessionMode; } - /** - * Set the sessionMode property: Specifies whether the listener performs a direct hand-off of the session, or - * redirects the session. - * - * @param sessionMode the sessionMode value to set. - * @return the ProfileType object itself. - */ - public ProfileType withSessionMode(SessionModeType sessionMode) { - this.sessionMode = sessionMode; - return this; - } - /** * Get the syntaxFormat property: Specifies whether the connection string is using the long (LONG), Easy Connect * (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. @@ -202,18 +135,6 @@ public SyntaxFormatType syntaxFormat() { return this.syntaxFormat; } - /** - * Set the syntaxFormat property: Specifies whether the connection string is using the long (LONG), Easy Connect - * (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. - * - * @param syntaxFormat the syntaxFormat value to set. - * @return the ProfileType object itself. - */ - public ProfileType withSyntaxFormat(SyntaxFormatType syntaxFormat) { - this.syntaxFormat = syntaxFormat; - return this; - } - /** * Get the tlsAuthentication property: Specifies whether the TLS handshake is using one-way (SERVER) or mutual * (MUTUAL) authentication. @@ -224,18 +145,6 @@ public TlsAuthenticationType tlsAuthentication() { return this.tlsAuthentication; } - /** - * Set the tlsAuthentication property: Specifies whether the TLS handshake is using one-way (SERVER) or mutual - * (MUTUAL) authentication. - * - * @param tlsAuthentication the tlsAuthentication value to set. - * @return the ProfileType object itself. - */ - public ProfileType withTlsAuthentication(TlsAuthenticationType tlsAuthentication) { - this.tlsAuthentication = tlsAuthentication; - return this; - } - /** * Get the value property: Connection string value. * @@ -245,17 +154,6 @@ public String value() { return this.value; } - /** - * Set the value property: Connection string value. - * - * @param value the value value to set. - * @return the ProfileType object itself. - */ - public ProfileType withValue(String value) { - this.value = value; - return this; - } - /** * Validates the instance. * diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ProtocolType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ProtocolType.java index b7448f0e532b..68c18774ccd9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ProtocolType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ProtocolType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class ProtocolType extends ExpandableStringEnum { /** - * Static value TCP for ProtocolType. + * TCP protocol. */ public static final ProtocolType TCP = fromString("TCP"); /** - * Static value TCPS for ProtocolType. + * TCPS protocol. */ public static final ProtocolType TCPS = fromString("TCPS"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RefreshableModelType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RefreshableModelType.java index e7bbbde076ab..16b0e8a5a3ab 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RefreshableModelType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RefreshableModelType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class RefreshableModelType extends ExpandableStringEnum { /** - * Static value Automatic for RefreshableModelType. + * Automatic refreshable model type. */ public static final RefreshableModelType AUTOMATIC = fromString("Automatic"); /** - * Static value Manual for RefreshableModelType. + * Manual refreshable model type. */ public static final RefreshableModelType MANUAL = fromString("Manual"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RefreshableStatusType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RefreshableStatusType.java index bae61b480871..432e84dceb64 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RefreshableStatusType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RefreshableStatusType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class RefreshableStatusType extends ExpandableStringEnum { /** - * Static value Refreshing for RefreshableStatusType. + * Refreshing status. */ public static final RefreshableStatusType REFRESHING = fromString("Refreshing"); /** - * Static value NotRefreshing for RefreshableStatusType. + * NotRefreshing status. */ public static final RefreshableStatusType NOT_REFRESHING = fromString("NotRefreshing"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RemoveVirtualMachineFromExadbVmClusterDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RemoveVirtualMachineFromExadbVmClusterDetails.java new file mode 100644 index 000000000000..2e7746729810 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RemoveVirtualMachineFromExadbVmClusterDetails.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata + * Database Service on Exascale Infrastructure only. + */ +@Fluent +public final class RemoveVirtualMachineFromExadbVmClusterDetails + implements JsonSerializable { + /* + * The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + */ + private List dbNodes; + + /** + * Creates an instance of RemoveVirtualMachineFromExadbVmClusterDetails class. + */ + public RemoveVirtualMachineFromExadbVmClusterDetails() { + } + + /** + * Get the dbNodes property: The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be + * removed. + * + * @return the dbNodes value. + */ + public List dbNodes() { + return this.dbNodes; + } + + /** + * Set the dbNodes property: The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be + * removed. + * + * @param dbNodes the dbNodes value to set. + * @return the RemoveVirtualMachineFromExadbVmClusterDetails object itself. + */ + public RemoveVirtualMachineFromExadbVmClusterDetails withDbNodes(List dbNodes) { + this.dbNodes = dbNodes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dbNodes() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dbNodes in model RemoveVirtualMachineFromExadbVmClusterDetails")); + } else { + dbNodes().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RemoveVirtualMachineFromExadbVmClusterDetails.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("dbNodes", this.dbNodes, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RemoveVirtualMachineFromExadbVmClusterDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RemoveVirtualMachineFromExadbVmClusterDetails if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RemoveVirtualMachineFromExadbVmClusterDetails. + */ + public static RemoveVirtualMachineFromExadbVmClusterDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RemoveVirtualMachineFromExadbVmClusterDetails deserializedRemoveVirtualMachineFromExadbVmClusterDetails + = new RemoveVirtualMachineFromExadbVmClusterDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dbNodes".equals(fieldName)) { + List dbNodes = reader.readArray(reader1 -> DbNodeDetails.fromJson(reader1)); + deserializedRemoveVirtualMachineFromExadbVmClusterDetails.dbNodes = dbNodes; + } else { + reader.skipChildren(); + } + } + + return deserializedRemoveVirtualMachineFromExadbVmClusterDetails; + }); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RepeatCadenceType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RepeatCadenceType.java index c997330dffcf..6c285db9c64f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RepeatCadenceType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RepeatCadenceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,22 +12,22 @@ */ public final class RepeatCadenceType extends ExpandableStringEnum { /** - * Static value OneTime for RepeatCadenceType. + * Repeat one time. */ public static final RepeatCadenceType ONE_TIME = fromString("OneTime"); /** - * Static value Weekly for RepeatCadenceType. + * Repeat weekly. */ public static final RepeatCadenceType WEEKLY = fromString("Weekly"); /** - * Static value Monthly for RepeatCadenceType. + * Repeat monthly. */ public static final RepeatCadenceType MONTHLY = fromString("Monthly"); /** - * Static value Yearly for RepeatCadenceType. + * Repeat yearly. */ public static final RepeatCadenceType YEARLY = fromString("Yearly"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ResourceProvisioningState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ResourceProvisioningState.java index 82163835cbab..7a32968a1510 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ResourceProvisioningState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ResourceProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,17 +12,17 @@ */ public final class ResourceProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for ResourceProvisioningState. + * Resource has been created. */ public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ResourceProvisioningState. + * Resource creation failed. */ public static final ResourceProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ResourceProvisioningState. + * Resource creation was canceled. */ public static final ResourceProvisioningState CANCELED = fromString("Canceled"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RestoreAutonomousDatabaseDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RestoreAutonomousDatabaseDetails.java index 0986180c175a..65c1ef58ef62 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RestoreAutonomousDatabaseDetails.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RestoreAutonomousDatabaseDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RoleType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RoleType.java index d0f34f453ecf..052fdac5c434 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RoleType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RoleType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,27 +12,27 @@ */ public final class RoleType extends ExpandableStringEnum { /** - * Static value Primary for RoleType. + * Primary role. */ public static final RoleType PRIMARY = fromString("Primary"); /** - * Static value Standby for RoleType. + * Standby role. */ public static final RoleType STANDBY = fromString("Standby"); /** - * Static value DisabledStandby for RoleType. + * DisabledStandby role. */ public static final RoleType DISABLED_STANDBY = fromString("DisabledStandby"); /** - * Static value BackupCopy for RoleType. + * BackupCopy role. */ public static final RoleType BACKUP_COPY = fromString("BackupCopy"); /** - * Static value SnapshotStandby for RoleType. + * SnapshotStandby role. */ public static final RoleType SNAPSHOT_STANDBY = fromString("SnapshotStandby"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SaasSubscriptionDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SaasSubscriptionDetails.java index 3d43679fa2f6..c07863461465 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SaasSubscriptionDetails.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SaasSubscriptionDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ScheduledOperationsType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ScheduledOperationsType.java index 9b7ae8937cc9..737647d66c1c 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ScheduledOperationsType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ScheduledOperationsType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ScheduledOperationsTypeUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ScheduledOperationsTypeUpdate.java deleted file mode 100644 index 47848e631677..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ScheduledOperationsTypeUpdate.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The list of scheduled operations. - */ -@Fluent -public final class ScheduledOperationsTypeUpdate implements JsonSerializable { - /* - * Day of week - */ - private DayOfWeekUpdate dayOfWeek; - - /* - * auto start time. value must be of ISO-8601 format HH:mm - */ - private String scheduledStartTime; - - /* - * auto stop time. value must be of ISO-8601 format HH:mm - */ - private String scheduledStopTime; - - /** - * Creates an instance of ScheduledOperationsTypeUpdate class. - */ - public ScheduledOperationsTypeUpdate() { - } - - /** - * Get the dayOfWeek property: Day of week. - * - * @return the dayOfWeek value. - */ - public DayOfWeekUpdate dayOfWeek() { - return this.dayOfWeek; - } - - /** - * Set the dayOfWeek property: Day of week. - * - * @param dayOfWeek the dayOfWeek value to set. - * @return the ScheduledOperationsTypeUpdate object itself. - */ - public ScheduledOperationsTypeUpdate withDayOfWeek(DayOfWeekUpdate dayOfWeek) { - this.dayOfWeek = dayOfWeek; - return this; - } - - /** - * Get the scheduledStartTime property: auto start time. value must be of ISO-8601 format HH:mm. - * - * @return the scheduledStartTime value. - */ - public String scheduledStartTime() { - return this.scheduledStartTime; - } - - /** - * Set the scheduledStartTime property: auto start time. value must be of ISO-8601 format HH:mm. - * - * @param scheduledStartTime the scheduledStartTime value to set. - * @return the ScheduledOperationsTypeUpdate object itself. - */ - public ScheduledOperationsTypeUpdate withScheduledStartTime(String scheduledStartTime) { - this.scheduledStartTime = scheduledStartTime; - return this; - } - - /** - * Get the scheduledStopTime property: auto stop time. value must be of ISO-8601 format HH:mm. - * - * @return the scheduledStopTime value. - */ - public String scheduledStopTime() { - return this.scheduledStopTime; - } - - /** - * Set the scheduledStopTime property: auto stop time. value must be of ISO-8601 format HH:mm. - * - * @param scheduledStopTime the scheduledStopTime value to set. - * @return the ScheduledOperationsTypeUpdate object itself. - */ - public ScheduledOperationsTypeUpdate withScheduledStopTime(String scheduledStopTime) { - this.scheduledStopTime = scheduledStopTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dayOfWeek() != null) { - dayOfWeek().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("dayOfWeek", this.dayOfWeek); - jsonWriter.writeStringField("scheduledStartTime", this.scheduledStartTime); - jsonWriter.writeStringField("scheduledStopTime", this.scheduledStopTime); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScheduledOperationsTypeUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScheduledOperationsTypeUpdate if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ScheduledOperationsTypeUpdate. - */ - public static ScheduledOperationsTypeUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScheduledOperationsTypeUpdate deserializedScheduledOperationsTypeUpdate - = new ScheduledOperationsTypeUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dayOfWeek".equals(fieldName)) { - deserializedScheduledOperationsTypeUpdate.dayOfWeek = DayOfWeekUpdate.fromJson(reader); - } else if ("scheduledStartTime".equals(fieldName)) { - deserializedScheduledOperationsTypeUpdate.scheduledStartTime = reader.getString(); - } else if ("scheduledStopTime".equals(fieldName)) { - deserializedScheduledOperationsTypeUpdate.scheduledStopTime = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScheduledOperationsTypeUpdate; - }); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SessionModeType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SessionModeType.java index 921d0c6140f0..f376c02a8ed3 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SessionModeType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SessionModeType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class SessionModeType extends ExpandableStringEnum { /** - * Static value Direct for SessionModeType. + * Direct session mode. */ public static final SessionModeType DIRECT = fromString("Direct"); /** - * Static value Redirect for SessionModeType. + * Redirect session mode. */ public static final SessionModeType REDIRECT = fromString("Redirect"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ShapeFamily.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ShapeFamily.java new file mode 100644 index 000000000000..eac1e53fd7d5 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ShapeFamily.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Allowed values for GI Minor Versions shapeFamily filter. + */ +public final class ShapeFamily extends ExpandableStringEnum { + /** + * Family value for Exadata Shape. + */ + public static final ShapeFamily EXADATA = fromString("EXADATA"); + + /** + * Family value for Exadb XS Shape. + */ + public static final ShapeFamily EXADB_XS = fromString("EXADB_XS"); + + /** + * Creates a new instance of ShapeFamily value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ShapeFamily() { + } + + /** + * Creates or finds a ShapeFamily from its string representation. + * + * @param name a name to look for. + * @return the corresponding ShapeFamily. + */ + public static ShapeFamily fromString(String name) { + return fromString(name, ShapeFamily.class); + } + + /** + * Gets known ShapeFamily values. + * + * @return known ShapeFamily values. + */ + public static Collection values() { + return values(ShapeFamily.class); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SourceType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SourceType.java index 49d3afdb8e91..8e8c5d651856 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SourceType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SourceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,37 +12,37 @@ */ public final class SourceType extends ExpandableStringEnum { /** - * Static value None for SourceType. + * None source. */ public static final SourceType NONE = fromString("None"); /** - * Static value Database for SourceType. + * Database source. */ public static final SourceType DATABASE = fromString("Database"); /** - * Static value BackupFromId for SourceType. + * Backup from ID source. */ public static final SourceType BACKUP_FROM_ID = fromString("BackupFromId"); /** - * Static value BackupFromTimestamp for SourceType. + * Backup from timestamp source. */ public static final SourceType BACKUP_FROM_TIMESTAMP = fromString("BackupFromTimestamp"); /** - * Static value CloneToRefreshable for SourceType. + * Clone to refreshable source. */ public static final SourceType CLONE_TO_REFRESHABLE = fromString("CloneToRefreshable"); /** - * Static value CrossRegionDataguard for SourceType. + * Cross region dataguard source. */ public static final SourceType CROSS_REGION_DATAGUARD = fromString("CrossRegionDataguard"); /** - * Static value CrossRegionDisasterRecovery for SourceType. + * cross region disaster recovery source. */ public static final SourceType CROSS_REGION_DISASTER_RECOVERY = fromString("CrossRegionDisasterRecovery"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SyntaxFormatType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SyntaxFormatType.java index 6fb27a347cf5..a95ea0fac022 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SyntaxFormatType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SyntaxFormatType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,17 +12,17 @@ */ public final class SyntaxFormatType extends ExpandableStringEnum { /** - * Static value Long for SyntaxFormatType. + * Long format. */ public static final SyntaxFormatType LONG = fromString("Long"); /** - * Static value Ezconnect for SyntaxFormatType. + * Ezconnect format. */ public static final SyntaxFormatType EZCONNECT = fromString("Ezconnect"); /** - * Static value Ezconnectplus for SyntaxFormatType. + * Ezconnectplus format. */ public static final SyntaxFormatType EZCONNECTPLUS = fromString("Ezconnectplus"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemShapes.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemShapes.java new file mode 100644 index 000000000000..f34ed02ce73d --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemShapes.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Allowed values for System Shapes. + */ +public final class SystemShapes extends ExpandableStringEnum { + /** + * Exadata X9M shape. + */ + public static final SystemShapes EXADATA_X9M = fromString("Exadata.X9M"); + + /** + * Exadata X11M shape. + */ + public static final SystemShapes EXADATA_X11M = fromString("Exadata.X11M"); + + /** + * Exadata DB on Exascale Infrastructure shape. + */ + public static final SystemShapes EXA_DB_XS = fromString("ExaDbXS"); + + /** + * Creates a new instance of SystemShapes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SystemShapes() { + } + + /** + * Creates or finds a SystemShapes from its string representation. + * + * @param name a name to look for. + * @return the corresponding SystemShapes. + */ + public static SystemShapes fromString(String name) { + return fromString(name, SystemShapes.class); + } + + /** + * Gets known SystemShapes values. + * + * @return known SystemShapes values. + */ + public static Collection values() { + return values(SystemShapes.class); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersion.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersion.java index 8789e6b2cb53..a82cdbd890e4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersion.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersionProperties.java index 0777faebd758..532ab7be5558 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersionProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersionProperties.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -24,7 +25,7 @@ public final class SystemVersionProperties implements JsonSerializable listByLocation(String location); + Response getWithResponse(String location, String systemversionname, Context context); /** - * List SystemVersion resources by Location. + * Get a SystemVersion. * * @param location The name of the Azure region. - * @param context The context to associate with this operation. + * @param systemversionname SystemVersion name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. + * @return a SystemVersion. */ - PagedIterable listByLocation(String location, Context context); + SystemVersion get(String location, String systemversionname); /** - * Get a SystemVersion. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion along with {@link Response}. + * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String location, String systemversionname, Context context); + PagedIterable listByLocation(String location); /** - * Get a SystemVersion. + * List SystemVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. - * @param systemversionname SystemVersion name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SystemVersion. + * @return the response of a SystemVersion list operation as paginated response with {@link PagedIterable}. */ - SystemVersion get(String location, String systemversionname); + PagedIterable listByLocation(String location, Context context); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/TlsAuthenticationType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/TlsAuthenticationType.java index 72006ecb18e0..6aa30b8a3fcd 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/TlsAuthenticationType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/TlsAuthenticationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class TlsAuthenticationType extends ExpandableStringEnum { /** - * Static value Server for TlsAuthenticationType. + * Server authentication. */ public static final TlsAuthenticationType SERVER = fromString("Server"); /** - * Static value Mutual for TlsAuthenticationType. + * Mutual TLS. */ public static final TlsAuthenticationType MUTUAL = fromString("Mutual"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddress.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddress.java index 31f09d42b3a4..0bda3495b4a2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddress.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddress.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressLifecycleState.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressLifecycleState.java index 91bd7c3cf5cf..294f678cfb2b 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressLifecycleState.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressLifecycleState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,27 +13,27 @@ public final class VirtualNetworkAddressLifecycleState extends ExpandableStringEnum { /** - * Static value Provisioning for VirtualNetworkAddressLifecycleState. + * Indicates that resource in Provisioning state. */ public static final VirtualNetworkAddressLifecycleState PROVISIONING = fromString("Provisioning"); /** - * Static value Available for VirtualNetworkAddressLifecycleState. + * Indicates that resource in Available state. */ public static final VirtualNetworkAddressLifecycleState AVAILABLE = fromString("Available"); /** - * Static value Terminating for VirtualNetworkAddressLifecycleState. + * Indicates that resource in Terminating state. */ public static final VirtualNetworkAddressLifecycleState TERMINATING = fromString("Terminating"); /** - * Static value Terminated for VirtualNetworkAddressLifecycleState. + * Indicates that resource in Terminated state. */ public static final VirtualNetworkAddressLifecycleState TERMINATED = fromString("Terminated"); /** - * Static value Failed for VirtualNetworkAddressLifecycleState. + * Indicates that resource in Failed state. */ public static final VirtualNetworkAddressLifecycleState FAILED = fromString("Failed"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressProperties.java index 63837a26f912..1be12eb61a4f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressProperties.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddressProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddresses.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddresses.java index 6a532ff5af6e..c7bdaac3870e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddresses.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/VirtualNetworkAddresses.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -13,83 +13,83 @@ */ public interface VirtualNetworkAddresses { /** - * List VirtualNetworkAddress resources by CloudVmCluster. + * Get a VirtualNetworkAddress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + * @return a VirtualNetworkAddress along with {@link Response}. */ - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + Response getWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context); /** - * List VirtualNetworkAddress resources by CloudVmCluster. + * Get a VirtualNetworkAddress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param context The context to associate with this operation. + * @param virtualnetworkaddressname Virtual IP address hostname. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + * @return a VirtualNetworkAddress. */ - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, - Context context); + VirtualNetworkAddress get(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname); /** - * Get a VirtualNetworkAddress. + * Delete a VirtualNetworkAddress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String cloudvmclustername, - String virtualnetworkaddressname, Context context); + void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname); /** - * Get a VirtualNetworkAddress. + * Delete a VirtualNetworkAddress. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a VirtualNetworkAddress. */ - VirtualNetworkAddress get(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname); + void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, Context context); /** - * Delete a VirtualNetworkAddress. + * List VirtualNetworkAddress resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname); + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); /** - * Delete a VirtualNetworkAddress. + * List VirtualNetworkAddress resources by CloudVmCluster. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param cloudvmclustername CloudVmCluster name. - * @param virtualnetworkaddressname Virtual IP address hostname. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, Context context); + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context); /** * Get a VirtualNetworkAddress. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/WorkloadType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/WorkloadType.java index badb574be9e4..979472e1da8d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/WorkloadType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/WorkloadType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,22 +12,22 @@ */ public final class WorkloadType extends ExpandableStringEnum { /** - * Static value OLTP for WorkloadType. + * OLTP - indicates an Autonomous Transaction Processing database. */ public static final WorkloadType OLTP = fromString("OLTP"); /** - * Static value DW for WorkloadType. + * DW - indicates an Autonomous Data Warehouse database. */ public static final WorkloadType DW = fromString("DW"); /** - * Static value AJD for WorkloadType. + * AJD - indicates an Autonomous JSON Database. */ public static final WorkloadType AJD = fromString("AJD"); /** - * Static value APEX for WorkloadType. + * APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. */ public static final WorkloadType APEX = fromString("APEX"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ZoneType.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ZoneType.java index a1daa6e83a25..91bb4785104b 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ZoneType.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ZoneType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.models; @@ -12,12 +12,12 @@ */ public final class ZoneType extends ExpandableStringEnum { /** - * Static value Primary for ZoneType. + * Primary zone. */ public static final ZoneType PRIMARY = fromString("Primary"); /** - * Static value Secondary for ZoneType. + * Secondary zone. */ public static final ZoneType SECONDARY = fromString("Secondary"); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/package-info.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/package-info.java index 495a6ed36825..3a94992b4453 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/package-info.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for OracleDatabaseResourceManager. - * null. + * Package containing the data models for OracleDatabase. */ package com.azure.resourcemanager.oracledatabase.models; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/package-info.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/package-info.java index dafd6db89a60..baaf89940b34 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/package-info.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/package-info.java @@ -1,9 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for OracleDatabaseResourceManager. - * null. + * Package containing the classes for OracleDatabase. */ package com.azure.resourcemanager.oracledatabase; diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/module-info.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/module-info.java index 706a3550bd69..2661df787b96 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/module-info.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.oracledatabase { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.oracledatabase.fluent.models to com.azure.core; opens com.azure.resourcemanager.oracledatabase.models to com.azure.core; + opens com.azure.resourcemanager.oracledatabase.implementation.models to com.azure.core; } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/azure-resourcemanager-oracledatabase_apiview_properties.json b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/azure-resourcemanager-oracledatabase_apiview_properties.json new file mode 100644 index 000000000000..bbd2cf82362e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/azure-resourcemanager-oracledatabase_apiview_properties.json @@ -0,0 +1,362 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient": "Oracle.Database.AutonomousDatabaseBackups", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.beginCreateOrUpdate": "Azure.ResourceManager.AutonomousDatabaseBackups.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.beginDelete": "Azure.ResourceManager.AutonomousDatabaseBackups.delete", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.beginUpdate": "Oracle.Database.AutonomousDatabaseBackups.update", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.createOrUpdate": "Azure.ResourceManager.AutonomousDatabaseBackups.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.delete": "Azure.ResourceManager.AutonomousDatabaseBackups.delete", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.get": "Azure.ResourceManager.AutonomousDatabaseBackups.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.getWithResponse": "Azure.ResourceManager.AutonomousDatabaseBackups.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.listByAutonomousDatabase": "Oracle.Database.AutonomousDatabaseBackups.listByParent", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.update": "Oracle.Database.AutonomousDatabaseBackups.update", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient": "Oracle.Database.AutonomousDatabaseCharacterSets", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient.get": "Oracle.Database.AutonomousDatabaseCharacterSets.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient.getWithResponse": "Oracle.Database.AutonomousDatabaseCharacterSets.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient.listByLocation": "Oracle.Database.AutonomousDatabaseCharacterSets.listByLocation", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient": "Oracle.Database.AutonomousDatabaseNationalCharacterSets", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient.get": "Oracle.Database.AutonomousDatabaseNationalCharacterSets.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient.getWithResponse": "Oracle.Database.AutonomousDatabaseNationalCharacterSets.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient.listByLocation": "Oracle.Database.AutonomousDatabaseNationalCharacterSets.listByLocation", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient": "Oracle.Database.AutonomousDatabaseVersions", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient.get": "Oracle.Database.AutonomousDatabaseVersions.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient.getWithResponse": "Oracle.Database.AutonomousDatabaseVersions.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient.listByLocation": "Oracle.Database.AutonomousDatabaseVersions.listByLocation", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient": "Oracle.Database.AutonomousDatabases", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginChangeDisasterRecoveryConfiguration": "Oracle.Database.AutonomousDatabases.changeDisasterRecoveryConfiguration", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginCreateOrUpdate": "Azure.ResourceManager.AutonomousDatabases.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginDelete": "Azure.ResourceManager.AutonomousDatabases.delete", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginFailover": "Oracle.Database.AutonomousDatabases.failover", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginRestore": "Oracle.Database.AutonomousDatabases.restore", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginShrink": "Oracle.Database.AutonomousDatabases.shrink", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginSwitchover": "Oracle.Database.AutonomousDatabases.switchover", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginUpdate": "Azure.ResourceManager.AutonomousDatabases.update", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.changeDisasterRecoveryConfiguration": "Oracle.Database.AutonomousDatabases.changeDisasterRecoveryConfiguration", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.createOrUpdate": "Azure.ResourceManager.AutonomousDatabases.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.delete": "Azure.ResourceManager.AutonomousDatabases.delete", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.failover": "Oracle.Database.AutonomousDatabases.failover", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.generateWallet": "Oracle.Database.AutonomousDatabases.generateWallet", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.generateWalletWithResponse": "Oracle.Database.AutonomousDatabases.generateWallet", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.getByResourceGroup": "Azure.ResourceManager.AutonomousDatabases.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.getByResourceGroupWithResponse": "Azure.ResourceManager.AutonomousDatabases.get", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.list": "Azure.ResourceManager.AutonomousDatabases.listBySubscription", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.listByResourceGroup": "Oracle.Database.AutonomousDatabases.listByResourceGroup", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.restore": "Oracle.Database.AutonomousDatabases.restore", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.shrink": "Oracle.Database.AutonomousDatabases.shrink", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.switchover": "Oracle.Database.AutonomousDatabases.switchover", + "com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.update": "Azure.ResourceManager.AutonomousDatabases.update", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient": "Oracle.Database.CloudExadataInfrastructures", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.addStorageCapacity": "Oracle.Database.CloudExadataInfrastructures.addStorageCapacity", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.beginAddStorageCapacity": "Oracle.Database.CloudExadataInfrastructures.addStorageCapacity", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.beginCreateOrUpdate": "Azure.ResourceManager.CloudExadataInfrastructures.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.beginDelete": "Azure.ResourceManager.CloudExadataInfrastructures.delete", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.beginUpdate": "Azure.ResourceManager.CloudExadataInfrastructures.update", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.createOrUpdate": "Azure.ResourceManager.CloudExadataInfrastructures.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.delete": "Azure.ResourceManager.CloudExadataInfrastructures.delete", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.getByResourceGroup": "Azure.ResourceManager.CloudExadataInfrastructures.get", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.getByResourceGroupWithResponse": "Azure.ResourceManager.CloudExadataInfrastructures.get", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.list": "Azure.ResourceManager.CloudExadataInfrastructures.listBySubscription", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.listByResourceGroup": "Oracle.Database.CloudExadataInfrastructures.listByResourceGroup", + "com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.update": "Azure.ResourceManager.CloudExadataInfrastructures.update", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient": "Oracle.Database.CloudVmClusters", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.addVms": "Oracle.Database.CloudVmClusters.addVms", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginAddVms": "Oracle.Database.CloudVmClusters.addVms", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginCreateOrUpdate": "Azure.ResourceManager.CloudVmClusters.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginDelete": "Azure.ResourceManager.CloudVmClusters.delete", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginRemoveVms": "Oracle.Database.CloudVmClusters.removeVms", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginUpdate": "Azure.ResourceManager.CloudVmClusters.update", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.createOrUpdate": "Azure.ResourceManager.CloudVmClusters.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.delete": "Azure.ResourceManager.CloudVmClusters.delete", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.getByResourceGroup": "Azure.ResourceManager.CloudVmClusters.get", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.getByResourceGroupWithResponse": "Azure.ResourceManager.CloudVmClusters.get", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.list": "Azure.ResourceManager.CloudVmClusters.listBySubscription", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.listByResourceGroup": "Oracle.Database.CloudVmClusters.listByResourceGroup", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.listPrivateIpAddresses": "Oracle.Database.CloudVmClusters.listPrivateIpAddresses", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.listPrivateIpAddressesWithResponse": "Oracle.Database.CloudVmClusters.listPrivateIpAddresses", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.removeVms": "Oracle.Database.CloudVmClusters.removeVms", + "com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.update": "Azure.ResourceManager.CloudVmClusters.update", + "com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient": "Oracle.Database.DbNodes", + "com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.action": "Oracle.Database.DbNodes.action", + "com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.beginAction": "Oracle.Database.DbNodes.action", + "com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.get": "Oracle.Database.DbNodes.get", + "com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.getWithResponse": "Oracle.Database.DbNodes.get", + "com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.listByCloudVmCluster": "Oracle.Database.DbNodes.listByParent", + "com.azure.resourcemanager.oracledatabase.fluent.DbServersClient": "Oracle.Database.DbServers", + "com.azure.resourcemanager.oracledatabase.fluent.DbServersClient.get": "Oracle.Database.DbServers.get", + "com.azure.resourcemanager.oracledatabase.fluent.DbServersClient.getWithResponse": "Oracle.Database.DbServers.get", + "com.azure.resourcemanager.oracledatabase.fluent.DbServersClient.listByCloudExadataInfrastructure": "Oracle.Database.DbServers.listByParent", + "com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient": "Oracle.Database.DbSystemShapes", + "com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient.get": "Oracle.Database.DbSystemShapes.get", + "com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient.getWithResponse": "Oracle.Database.DbSystemShapes.get", + "com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient.listByLocation": "Oracle.Database.DbSystemShapes.listByLocation", + "com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient": "Oracle.Database.DnsPrivateViews", + "com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient.get": "Oracle.Database.DnsPrivateViews.get", + "com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient.getWithResponse": "Oracle.Database.DnsPrivateViews.get", + "com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient.listByLocation": "Oracle.Database.DnsPrivateViews.listByLocation", + "com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient": "Oracle.Database.DnsPrivateZones", + "com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient.get": "Oracle.Database.DnsPrivateZones.get", + "com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient.getWithResponse": "Oracle.Database.DnsPrivateZones.get", + "com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient.listByLocation": "Oracle.Database.DnsPrivateZones.listByLocation", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient": "Oracle.Database.ExadbVmClusters", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.beginCreateOrUpdate": "Azure.ResourceManager.ExadbVmClusters.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.beginDelete": "Azure.ResourceManager.ExadbVmClusters.delete", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.beginRemoveVms": "Oracle.Database.ExadbVmClusters.removeVms", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.beginUpdate": "Azure.ResourceManager.ExadbVmClusters.update", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.createOrUpdate": "Azure.ResourceManager.ExadbVmClusters.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.delete": "Azure.ResourceManager.ExadbVmClusters.delete", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.getByResourceGroup": "Azure.ResourceManager.ExadbVmClusters.get", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.getByResourceGroupWithResponse": "Azure.ResourceManager.ExadbVmClusters.get", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.list": "Azure.ResourceManager.ExadbVmClusters.listBySubscription", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.listByResourceGroup": "Oracle.Database.ExadbVmClusters.listByResourceGroup", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.removeVms": "Oracle.Database.ExadbVmClusters.removeVms", + "com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.update": "Azure.ResourceManager.ExadbVmClusters.update", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient": "Oracle.Database.ExascaleDbNodes", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.action": "Oracle.Database.ExascaleDbNodes.action", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.beginAction": "Oracle.Database.ExascaleDbNodes.action", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.get": "Oracle.Database.ExascaleDbNodes.get", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.getWithResponse": "Oracle.Database.ExascaleDbNodes.get", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.listByParent": "Oracle.Database.ExascaleDbNodes.listByParent", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient": "Oracle.Database.ExascaleDbStorageVaults", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.beginCreate": "Oracle.Database.ExascaleDbStorageVaults.create", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.beginDelete": "Oracle.Database.ExascaleDbStorageVaults.delete", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.beginUpdate": "Oracle.Database.ExascaleDbStorageVaults.update", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.create": "Oracle.Database.ExascaleDbStorageVaults.create", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.delete": "Oracle.Database.ExascaleDbStorageVaults.delete", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.getByResourceGroup": "Oracle.Database.ExascaleDbStorageVaults.get", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.getByResourceGroupWithResponse": "Oracle.Database.ExascaleDbStorageVaults.get", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.list": "Oracle.Database.ExascaleDbStorageVaults.listBySubscription", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.listByResourceGroup": "Oracle.Database.ExascaleDbStorageVaults.listByResourceGroup", + "com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.update": "Oracle.Database.ExascaleDbStorageVaults.update", + "com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient": "Oracle.Database.FlexComponents", + "com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient.get": "Oracle.Database.FlexComponents.get", + "com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient.getWithResponse": "Oracle.Database.FlexComponents.get", + "com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient.listByParent": "Oracle.Database.FlexComponents.listByParent", + "com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient": "Oracle.Database.GiMinorVersions", + "com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient.get": "Oracle.Database.GiMinorVersions.get", + "com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient.getWithResponse": "Oracle.Database.GiMinorVersions.get", + "com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient.listByParent": "Oracle.Database.GiMinorVersions.listByParent", + "com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient": "Oracle.Database.GiVersions", + "com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient.get": "Oracle.Database.GiVersions.get", + "com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient.getWithResponse": "Oracle.Database.GiVersions.get", + "com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient.listByLocation": "Oracle.Database.GiVersions.listByLocation", + "com.azure.resourcemanager.oracledatabase.fluent.OperationsClient": "Oracle.Database.Operations", + "com.azure.resourcemanager.oracledatabase.fluent.OperationsClient.list": "Azure.ResourceManager.Operations.list", + "com.azure.resourcemanager.oracledatabase.fluent.OracleDatabaseManagementClient": "Oracle.Database", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient": "Oracle.Database.OracleSubscriptions", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.addAzureSubscriptions": "Oracle.Database.OracleSubscriptions.addAzureSubscriptions", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginAddAzureSubscriptions": "Oracle.Database.OracleSubscriptions.addAzureSubscriptions", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginCreateOrUpdate": "Azure.ResourceManager.OracleSubscriptions.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginDelete": "Azure.ResourceManager.OracleSubscriptions.delete", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginListActivationLinks": "Oracle.Database.OracleSubscriptions.listActivationLinks", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginListCloudAccountDetails": "Oracle.Database.OracleSubscriptions.listCloudAccountDetails", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginListSaasSubscriptionDetails": "Oracle.Database.OracleSubscriptions.listSaasSubscriptionDetails", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginUpdate": "Oracle.Database.OracleSubscriptions.update", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.createOrUpdate": "Azure.ResourceManager.OracleSubscriptions.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.delete": "Azure.ResourceManager.OracleSubscriptions.delete", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.get": "Azure.ResourceManager.OracleSubscriptions.get", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.getWithResponse": "Azure.ResourceManager.OracleSubscriptions.get", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.list": "Azure.ResourceManager.OracleSubscriptions.listBySubscription", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.listActivationLinks": "Oracle.Database.OracleSubscriptions.listActivationLinks", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.listCloudAccountDetails": "Oracle.Database.OracleSubscriptions.listCloudAccountDetails", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.listSaasSubscriptionDetails": "Oracle.Database.OracleSubscriptions.listSaasSubscriptionDetails", + "com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.update": "Oracle.Database.OracleSubscriptions.update", + "com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient": "Oracle.Database.SystemVersions", + "com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient.get": "Oracle.Database.SystemVersions.get", + "com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient.getWithResponse": "Oracle.Database.SystemVersions.get", + "com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient.listByLocation": "Oracle.Database.SystemVersions.listByLocation", + "com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient": "Oracle.Database.VirtualNetworkAddresses", + "com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.beginCreateOrUpdate": "Azure.ResourceManager.VirtualNetworkAddresses.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.beginDelete": "Azure.ResourceManager.VirtualNetworkAddresses.delete", + "com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.createOrUpdate": "Azure.ResourceManager.VirtualNetworkAddresses.createOrUpdate", + "com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.delete": "Azure.ResourceManager.VirtualNetworkAddresses.delete", + "com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.get": "Azure.ResourceManager.VirtualNetworkAddresses.get", + "com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.getWithResponse": "Azure.ResourceManager.VirtualNetworkAddresses.get", + "com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.listByCloudVmCluster": "Oracle.Database.VirtualNetworkAddresses.listByParent", + "com.azure.resourcemanager.oracledatabase.fluent.models.ActivationLinksInner": "Oracle.Database.ActivationLinks", + "com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseBackupInner": "Oracle.Database.AutonomousDatabaseBackup", + "com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseCharacterSetInner": "Oracle.Database.AutonomousDatabaseCharacterSet", + "com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseInner": "Oracle.Database.AutonomousDatabase", + "com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseNationalCharacterSetInner": "Oracle.Database.AutonomousDatabaseNationalCharacterSet", + "com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseWalletFileInner": "Oracle.Database.AutonomousDatabaseWalletFile", + "com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDbVersionInner": "Oracle.Database.AutonomousDbVersion", + "com.azure.resourcemanager.oracledatabase.fluent.models.CloudAccountDetailsInner": "Oracle.Database.CloudAccountDetails", + "com.azure.resourcemanager.oracledatabase.fluent.models.CloudExadataInfrastructureInner": "Oracle.Database.CloudExadataInfrastructure", + "com.azure.resourcemanager.oracledatabase.fluent.models.CloudVmClusterInner": "Oracle.Database.CloudVmCluster", + "com.azure.resourcemanager.oracledatabase.fluent.models.DbActionResponseInner": "Oracle.Database.DbActionResponse", + "com.azure.resourcemanager.oracledatabase.fluent.models.DbNodeInner": "Oracle.Database.DbNode", + "com.azure.resourcemanager.oracledatabase.fluent.models.DbServerInner": "Oracle.Database.DbServer", + "com.azure.resourcemanager.oracledatabase.fluent.models.DbSystemShapeInner": "Oracle.Database.DbSystemShape", + "com.azure.resourcemanager.oracledatabase.fluent.models.DnsPrivateViewInner": "Oracle.Database.DnsPrivateView", + "com.azure.resourcemanager.oracledatabase.fluent.models.DnsPrivateZoneInner": "Oracle.Database.DnsPrivateZone", + "com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner": "Oracle.Database.ExadbVmCluster", + "com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner": "Oracle.Database.ExascaleDbNode", + "com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner": "Oracle.Database.ExascaleDbStorageVault", + "com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner": "Oracle.Database.FlexComponent", + "com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner": "Oracle.Database.GiMinorVersion", + "com.azure.resourcemanager.oracledatabase.fluent.models.GiVersionInner": "Oracle.Database.GiVersion", + "com.azure.resourcemanager.oracledatabase.fluent.models.OperationInner": "Azure.ResourceManager.CommonTypes.Operation", + "com.azure.resourcemanager.oracledatabase.fluent.models.OracleSubscriptionInner": "Oracle.Database.OracleSubscription", + "com.azure.resourcemanager.oracledatabase.fluent.models.PrivateIpAddressPropertiesInner": "Oracle.Database.PrivateIpAddressProperties", + "com.azure.resourcemanager.oracledatabase.fluent.models.SaasSubscriptionDetailsInner": "Oracle.Database.SaasSubscriptionDetails", + "com.azure.resourcemanager.oracledatabase.fluent.models.SystemVersionInner": "Oracle.Database.SystemVersion", + "com.azure.resourcemanager.oracledatabase.fluent.models.VirtualNetworkAddressInner": "Oracle.Database.VirtualNetworkAddress", + "com.azure.resourcemanager.oracledatabase.implementation.OracleDatabaseManagementClientBuilder": "Oracle.Database", + "com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseBackupListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseCharacterSetListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseNationalCharacterSetListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDbVersionListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.CloudExadataInfrastructureListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.CloudVmClusterListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.DbNodeListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.DbServerListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.DbSystemShapeListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.DnsPrivateViewListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.DnsPrivateZoneListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.ExadbVmClusterListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.ExascaleDbNodeListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.ExascaleDbStorageVaultListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.FlexComponentListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.GiMinorVersionListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.GiVersionListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.OperationListResult": "Azure.ResourceManager.CommonTypes.OperationListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.OracleSubscriptionListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.SystemVersionListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.implementation.models.VirtualNetworkAddressListResult": "Azure.ResourceManager.ResourceListResult", + "com.azure.resourcemanager.oracledatabase.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode": "Oracle.Database.AddRemoveDbNode", + "com.azure.resourcemanager.oracledatabase.models.AddSubscriptionOperationState": "Oracle.Database.AddSubscriptionOperationState", + "com.azure.resourcemanager.oracledatabase.models.AllConnectionStringType": "Oracle.Database.AllConnectionStringType", + "com.azure.resourcemanager.oracledatabase.models.ApexDetailsType": "Oracle.Database.ApexDetailsType", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupLifecycleState": "Oracle.Database.AutonomousDatabaseBackupLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties": "Oracle.Database.AutonomousDatabaseBackupProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupType": "Oracle.Database.AutonomousDatabaseBackupType", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBaseProperties": "Oracle.Database.AutonomousDatabaseBaseProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSetProperties": "Oracle.Database.AutonomousDatabaseCharacterSetProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCloneProperties": "Oracle.Database.AutonomousDatabaseCloneProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCrossRegionDisasterRecoveryProperties": "Oracle.Database.AutonomousDatabaseCrossRegionDisasterRecoveryProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseFromBackupTimestampProperties": "Oracle.Database.AutonomousDatabaseFromBackupTimestampProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseLifecycleState": "Oracle.Database.AutonomousDatabaseLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSetProperties": "Oracle.Database.AutonomousDatabaseNationalCharacterSetProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseProperties": "Oracle.Database.AutonomousDatabaseProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseStandbySummary": "Oracle.Database.AutonomousDatabaseStandbySummary", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousDbVersionProperties": "Oracle.Database.AutonomousDbVersionProperties", + "com.azure.resourcemanager.oracledatabase.models.AutonomousMaintenanceScheduleType": "Oracle.Database.AutonomousMaintenanceScheduleType", + "com.azure.resourcemanager.oracledatabase.models.AzureResourceProvisioningState": "Oracle.Database.AzureResourceProvisioningState", + "com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions": "Oracle.Database.AzureSubscriptions", + "com.azure.resourcemanager.oracledatabase.models.CloneType": "Oracle.Database.CloneType", + "com.azure.resourcemanager.oracledatabase.models.CloudAccountProvisioningState": "Oracle.Database.CloudAccountProvisioningState", + "com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureLifecycleState": "Oracle.Database.CloudExadataInfrastructureLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureProperties": "Oracle.Database.CloudExadataInfrastructureProperties", + "com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.oracledatabase.models.CloudVmClusterLifecycleState": "Oracle.Database.CloudVmClusterLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.CloudVmClusterProperties": "Oracle.Database.CloudVmClusterProperties", + "com.azure.resourcemanager.oracledatabase.models.CloudVmClusterUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.oracledatabase.models.CloudVmClusterUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.oracledatabase.models.ComputeModel": "Oracle.Database.ComputeModel", + "com.azure.resourcemanager.oracledatabase.models.ConnectionStringType": "Oracle.Database.ConnectionStringType", + "com.azure.resourcemanager.oracledatabase.models.ConnectionUrlType": "Oracle.Database.ConnectionUrlType", + "com.azure.resourcemanager.oracledatabase.models.ConsumerGroup": "Oracle.Database.ConsumerGroup", + "com.azure.resourcemanager.oracledatabase.models.CustomerContact": "Oracle.Database.CustomerContact", + "com.azure.resourcemanager.oracledatabase.models.DataBaseType": "Oracle.Database.DataBaseType", + "com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions": "Oracle.Database.DataCollectionOptions", + "com.azure.resourcemanager.oracledatabase.models.DataSafeStatusType": "Oracle.Database.DataSafeStatusType", + "com.azure.resourcemanager.oracledatabase.models.DatabaseEditionType": "Oracle.Database.DatabaseEditionType", + "com.azure.resourcemanager.oracledatabase.models.DayOfWeek": "Oracle.Database.DayOfWeek", + "com.azure.resourcemanager.oracledatabase.models.DayOfWeekName": "Oracle.Database.DayOfWeekName", + "com.azure.resourcemanager.oracledatabase.models.DbIormConfig": "Oracle.Database.DbIormConfig", + "com.azure.resourcemanager.oracledatabase.models.DbNodeAction": "Oracle.Database.DbNodeAction", + "com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum": "Oracle.Database.DbNodeActionEnum", + "com.azure.resourcemanager.oracledatabase.models.DbNodeDetails": "Oracle.Database.DbNodeDetails", + "com.azure.resourcemanager.oracledatabase.models.DbNodeMaintenanceType": "Oracle.Database.DbNodeMaintenanceType", + "com.azure.resourcemanager.oracledatabase.models.DbNodeProperties": "Oracle.Database.DbNodeProperties", + "com.azure.resourcemanager.oracledatabase.models.DbNodeProvisioningState": "Oracle.Database.DbNodeProvisioningState", + "com.azure.resourcemanager.oracledatabase.models.DbServerPatchingDetails": "Oracle.Database.DbServerPatchingDetails", + "com.azure.resourcemanager.oracledatabase.models.DbServerPatchingStatus": "Oracle.Database.DbServerPatchingStatus", + "com.azure.resourcemanager.oracledatabase.models.DbServerProperties": "Oracle.Database.DbServerProperties", + "com.azure.resourcemanager.oracledatabase.models.DbServerProvisioningState": "Oracle.Database.DbServerProvisioningState", + "com.azure.resourcemanager.oracledatabase.models.DbSystemShapeProperties": "Oracle.Database.DbSystemShapeProperties", + "com.azure.resourcemanager.oracledatabase.models.DefinedFileSystemConfiguration": "Oracle.Database.DefinedFileSystemConfiguration", + "com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails": "Oracle.Database.DisasterRecoveryConfigurationDetails", + "com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType": "Oracle.Database.DisasterRecoveryType", + "com.azure.resourcemanager.oracledatabase.models.DiskRedundancy": "Oracle.Database.DiskRedundancy", + "com.azure.resourcemanager.oracledatabase.models.DnsPrivateViewProperties": "Oracle.Database.DnsPrivateViewProperties", + "com.azure.resourcemanager.oracledatabase.models.DnsPrivateViewsLifecycleState": "Oracle.Database.DnsPrivateViewsLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.DnsPrivateZoneProperties": "Oracle.Database.DnsPrivateZoneProperties", + "com.azure.resourcemanager.oracledatabase.models.DnsPrivateZonesLifecycleState": "Oracle.Database.DnsPrivateZonesLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.EstimatedPatchingTime": "Oracle.Database.EstimatedPatchingTime", + "com.azure.resourcemanager.oracledatabase.models.ExadataIormConfig": "Oracle.Database.ExadataIormConfig", + "com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterLifecycleState": "Oracle.Database.ExadbVmClusterLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterProperties": "Oracle.Database.ExadbVmClusterProperties", + "com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterStorageDetails": "Oracle.Database.ExadbVmClusterStorageDetails", + "com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodeProperties": "Oracle.Database.ExascaleDbNodeProperties", + "com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageDetails": "Oracle.Database.ExascaleDbStorageDetails", + "com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageInputDetails": "Oracle.Database.ExascaleDbStorageInputDetails", + "com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultLifecycleState": "Oracle.Database.ExascaleDbStorageVaultLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties": "Oracle.Database.ExascaleDbStorageVaultProperties", + "com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultTagsUpdate": "Azure.ResourceManager.Foundations.TagsUpdateModel", + "com.azure.resourcemanager.oracledatabase.models.FileSystemConfigurationDetails": "Oracle.Database.FileSystemConfigurationDetails", + "com.azure.resourcemanager.oracledatabase.models.FlexComponentProperties": "Oracle.Database.FlexComponentProperties", + "com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails": "Oracle.Database.GenerateAutonomousDatabaseWalletDetails", + "com.azure.resourcemanager.oracledatabase.models.GenerateType": "Oracle.Database.GenerateType", + "com.azure.resourcemanager.oracledatabase.models.GiMinorVersionProperties": "Oracle.Database.GiMinorVersionProperties", + "com.azure.resourcemanager.oracledatabase.models.GiVersionProperties": "Oracle.Database.GiVersionProperties", + "com.azure.resourcemanager.oracledatabase.models.GridImageType": "Oracle.Database.GridImageType", + "com.azure.resourcemanager.oracledatabase.models.HardwareType": "Oracle.Database.HardwareType", + "com.azure.resourcemanager.oracledatabase.models.HostFormatType": "Oracle.Database.HostFormatType", + "com.azure.resourcemanager.oracledatabase.models.Intent": "Oracle.Database.Intent", + "com.azure.resourcemanager.oracledatabase.models.IormLifecycleState": "Oracle.Database.IormLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.LicenseModel": "Oracle.Database.LicenseModel", + "com.azure.resourcemanager.oracledatabase.models.LongTermBackUpScheduleDetails": "Oracle.Database.LongTermBackUpScheduleDetails", + "com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow": "Oracle.Database.MaintenanceWindow", + "com.azure.resourcemanager.oracledatabase.models.Month": "Oracle.Database.Month", + "com.azure.resourcemanager.oracledatabase.models.MonthName": "Oracle.Database.MonthName", + "com.azure.resourcemanager.oracledatabase.models.NsgCidr": "Oracle.Database.NsgCidr", + "com.azure.resourcemanager.oracledatabase.models.Objective": "Oracle.Database.Objective", + "com.azure.resourcemanager.oracledatabase.models.OpenModeType": "Oracle.Database.OpenModeType", + "com.azure.resourcemanager.oracledatabase.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "com.azure.resourcemanager.oracledatabase.models.OperationsInsightsStatusType": "Oracle.Database.OperationsInsightsStatusType", + "com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionProperties": "Oracle.Database.OracleSubscriptionProperties", + "com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionProvisioningState": "Oracle.Database.OracleSubscriptionProvisioningState", + "com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "com.azure.resourcemanager.oracledatabase.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "com.azure.resourcemanager.oracledatabase.models.PatchingMode": "Oracle.Database.PatchingMode", + "com.azure.resourcemanager.oracledatabase.models.PeerDbDetails": "Oracle.Database.PeerDbDetails", + "com.azure.resourcemanager.oracledatabase.models.PermissionLevelType": "Oracle.Database.PermissionLevelType", + "com.azure.resourcemanager.oracledatabase.models.Plan": "Azure.ResourceManager.CommonTypes.Plan", + "com.azure.resourcemanager.oracledatabase.models.PlanUpdate": "Oracle.Database.PlanUpdate", + "com.azure.resourcemanager.oracledatabase.models.PortRange": "Oracle.Database.PortRange", + "com.azure.resourcemanager.oracledatabase.models.Preference": "Oracle.Database.Preference", + "com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter": "Oracle.Database.PrivateIpAddressesFilter", + "com.azure.resourcemanager.oracledatabase.models.ProfileType": "Oracle.Database.ProfileType", + "com.azure.resourcemanager.oracledatabase.models.ProtocolType": "Oracle.Database.ProtocolType", + "com.azure.resourcemanager.oracledatabase.models.RefreshableModelType": "Oracle.Database.RefreshableModelType", + "com.azure.resourcemanager.oracledatabase.models.RefreshableStatusType": "Oracle.Database.RefreshableStatusType", + "com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails": "Oracle.Database.RemoveVirtualMachineFromExadbVmClusterDetails", + "com.azure.resourcemanager.oracledatabase.models.RepeatCadenceType": "Oracle.Database.RepeatCadenceType", + "com.azure.resourcemanager.oracledatabase.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState", + "com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails": "Oracle.Database.RestoreAutonomousDatabaseDetails", + "com.azure.resourcemanager.oracledatabase.models.RoleType": "Oracle.Database.RoleType", + "com.azure.resourcemanager.oracledatabase.models.ScheduledOperationsType": "Oracle.Database.ScheduledOperationsType", + "com.azure.resourcemanager.oracledatabase.models.SessionModeType": "Oracle.Database.SessionModeType", + "com.azure.resourcemanager.oracledatabase.models.ShapeFamily": "Oracle.Database.ShapeFamily", + "com.azure.resourcemanager.oracledatabase.models.SourceType": "Oracle.Database.SourceType", + "com.azure.resourcemanager.oracledatabase.models.SyntaxFormatType": "Oracle.Database.SyntaxFormatType", + "com.azure.resourcemanager.oracledatabase.models.SystemShapes": "Oracle.Database.SystemShapes", + "com.azure.resourcemanager.oracledatabase.models.SystemVersionProperties": "Oracle.Database.SystemVersionProperties", + "com.azure.resourcemanager.oracledatabase.models.TlsAuthenticationType": "Oracle.Database.TlsAuthenticationType", + "com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressLifecycleState": "Oracle.Database.VirtualNetworkAddressLifecycleState", + "com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProperties": "Oracle.Database.VirtualNetworkAddressProperties", + "com.azure.resourcemanager.oracledatabase.models.WorkloadType": "Oracle.Database.WorkloadType", + "com.azure.resourcemanager.oracledatabase.models.ZoneType": "Oracle.Database.ZoneType" + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/azure-resourcemanager-oracledatabase_metadata.json b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/azure-resourcemanager-oracledatabase_metadata.json new file mode 100644 index 000000000000..e8b1bfba3a18 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/azure-resourcemanager-oracledatabase_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2025-03-01","crossLanguageDefinitions":{"com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient":"Oracle.Database.AutonomousDatabaseBackups","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.beginCreateOrUpdate":"Azure.ResourceManager.AutonomousDatabaseBackups.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.beginDelete":"Azure.ResourceManager.AutonomousDatabaseBackups.delete","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.beginUpdate":"Oracle.Database.AutonomousDatabaseBackups.update","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.createOrUpdate":"Azure.ResourceManager.AutonomousDatabaseBackups.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.delete":"Azure.ResourceManager.AutonomousDatabaseBackups.delete","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.get":"Azure.ResourceManager.AutonomousDatabaseBackups.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.getWithResponse":"Azure.ResourceManager.AutonomousDatabaseBackups.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.listByAutonomousDatabase":"Oracle.Database.AutonomousDatabaseBackups.listByParent","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseBackupsClient.update":"Oracle.Database.AutonomousDatabaseBackups.update","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient":"Oracle.Database.AutonomousDatabaseCharacterSets","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient.get":"Oracle.Database.AutonomousDatabaseCharacterSets.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient.getWithResponse":"Oracle.Database.AutonomousDatabaseCharacterSets.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseCharacterSetsClient.listByLocation":"Oracle.Database.AutonomousDatabaseCharacterSets.listByLocation","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient":"Oracle.Database.AutonomousDatabaseNationalCharacterSets","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient.get":"Oracle.Database.AutonomousDatabaseNationalCharacterSets.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient.getWithResponse":"Oracle.Database.AutonomousDatabaseNationalCharacterSets.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseNationalCharacterSetsClient.listByLocation":"Oracle.Database.AutonomousDatabaseNationalCharacterSets.listByLocation","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient":"Oracle.Database.AutonomousDatabaseVersions","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient.get":"Oracle.Database.AutonomousDatabaseVersions.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient.getWithResponse":"Oracle.Database.AutonomousDatabaseVersions.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabaseVersionsClient.listByLocation":"Oracle.Database.AutonomousDatabaseVersions.listByLocation","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient":"Oracle.Database.AutonomousDatabases","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginChangeDisasterRecoveryConfiguration":"Oracle.Database.AutonomousDatabases.changeDisasterRecoveryConfiguration","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginCreateOrUpdate":"Azure.ResourceManager.AutonomousDatabases.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginDelete":"Azure.ResourceManager.AutonomousDatabases.delete","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginFailover":"Oracle.Database.AutonomousDatabases.failover","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginRestore":"Oracle.Database.AutonomousDatabases.restore","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginShrink":"Oracle.Database.AutonomousDatabases.shrink","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginSwitchover":"Oracle.Database.AutonomousDatabases.switchover","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.beginUpdate":"Azure.ResourceManager.AutonomousDatabases.update","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.changeDisasterRecoveryConfiguration":"Oracle.Database.AutonomousDatabases.changeDisasterRecoveryConfiguration","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.createOrUpdate":"Azure.ResourceManager.AutonomousDatabases.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.delete":"Azure.ResourceManager.AutonomousDatabases.delete","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.failover":"Oracle.Database.AutonomousDatabases.failover","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.generateWallet":"Oracle.Database.AutonomousDatabases.generateWallet","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.generateWalletWithResponse":"Oracle.Database.AutonomousDatabases.generateWallet","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.getByResourceGroup":"Azure.ResourceManager.AutonomousDatabases.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.getByResourceGroupWithResponse":"Azure.ResourceManager.AutonomousDatabases.get","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.list":"Azure.ResourceManager.AutonomousDatabases.listBySubscription","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.listByResourceGroup":"Oracle.Database.AutonomousDatabases.listByResourceGroup","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.restore":"Oracle.Database.AutonomousDatabases.restore","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.shrink":"Oracle.Database.AutonomousDatabases.shrink","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.switchover":"Oracle.Database.AutonomousDatabases.switchover","com.azure.resourcemanager.oracledatabase.fluent.AutonomousDatabasesClient.update":"Azure.ResourceManager.AutonomousDatabases.update","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient":"Oracle.Database.CloudExadataInfrastructures","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.addStorageCapacity":"Oracle.Database.CloudExadataInfrastructures.addStorageCapacity","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.beginAddStorageCapacity":"Oracle.Database.CloudExadataInfrastructures.addStorageCapacity","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.beginCreateOrUpdate":"Azure.ResourceManager.CloudExadataInfrastructures.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.beginDelete":"Azure.ResourceManager.CloudExadataInfrastructures.delete","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.beginUpdate":"Azure.ResourceManager.CloudExadataInfrastructures.update","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.createOrUpdate":"Azure.ResourceManager.CloudExadataInfrastructures.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.delete":"Azure.ResourceManager.CloudExadataInfrastructures.delete","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.getByResourceGroup":"Azure.ResourceManager.CloudExadataInfrastructures.get","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.getByResourceGroupWithResponse":"Azure.ResourceManager.CloudExadataInfrastructures.get","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.list":"Azure.ResourceManager.CloudExadataInfrastructures.listBySubscription","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.listByResourceGroup":"Oracle.Database.CloudExadataInfrastructures.listByResourceGroup","com.azure.resourcemanager.oracledatabase.fluent.CloudExadataInfrastructuresClient.update":"Azure.ResourceManager.CloudExadataInfrastructures.update","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient":"Oracle.Database.CloudVmClusters","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.addVms":"Oracle.Database.CloudVmClusters.addVms","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginAddVms":"Oracle.Database.CloudVmClusters.addVms","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginCreateOrUpdate":"Azure.ResourceManager.CloudVmClusters.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginDelete":"Azure.ResourceManager.CloudVmClusters.delete","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginRemoveVms":"Oracle.Database.CloudVmClusters.removeVms","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.beginUpdate":"Azure.ResourceManager.CloudVmClusters.update","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.createOrUpdate":"Azure.ResourceManager.CloudVmClusters.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.delete":"Azure.ResourceManager.CloudVmClusters.delete","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.getByResourceGroup":"Azure.ResourceManager.CloudVmClusters.get","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.getByResourceGroupWithResponse":"Azure.ResourceManager.CloudVmClusters.get","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.list":"Azure.ResourceManager.CloudVmClusters.listBySubscription","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.listByResourceGroup":"Oracle.Database.CloudVmClusters.listByResourceGroup","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.listPrivateIpAddresses":"Oracle.Database.CloudVmClusters.listPrivateIpAddresses","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.listPrivateIpAddressesWithResponse":"Oracle.Database.CloudVmClusters.listPrivateIpAddresses","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.removeVms":"Oracle.Database.CloudVmClusters.removeVms","com.azure.resourcemanager.oracledatabase.fluent.CloudVmClustersClient.update":"Azure.ResourceManager.CloudVmClusters.update","com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient":"Oracle.Database.DbNodes","com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.action":"Oracle.Database.DbNodes.action","com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.beginAction":"Oracle.Database.DbNodes.action","com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.get":"Oracle.Database.DbNodes.get","com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.getWithResponse":"Oracle.Database.DbNodes.get","com.azure.resourcemanager.oracledatabase.fluent.DbNodesClient.listByCloudVmCluster":"Oracle.Database.DbNodes.listByParent","com.azure.resourcemanager.oracledatabase.fluent.DbServersClient":"Oracle.Database.DbServers","com.azure.resourcemanager.oracledatabase.fluent.DbServersClient.get":"Oracle.Database.DbServers.get","com.azure.resourcemanager.oracledatabase.fluent.DbServersClient.getWithResponse":"Oracle.Database.DbServers.get","com.azure.resourcemanager.oracledatabase.fluent.DbServersClient.listByCloudExadataInfrastructure":"Oracle.Database.DbServers.listByParent","com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient":"Oracle.Database.DbSystemShapes","com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient.get":"Oracle.Database.DbSystemShapes.get","com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient.getWithResponse":"Oracle.Database.DbSystemShapes.get","com.azure.resourcemanager.oracledatabase.fluent.DbSystemShapesClient.listByLocation":"Oracle.Database.DbSystemShapes.listByLocation","com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient":"Oracle.Database.DnsPrivateViews","com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient.get":"Oracle.Database.DnsPrivateViews.get","com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient.getWithResponse":"Oracle.Database.DnsPrivateViews.get","com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateViewsClient.listByLocation":"Oracle.Database.DnsPrivateViews.listByLocation","com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient":"Oracle.Database.DnsPrivateZones","com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient.get":"Oracle.Database.DnsPrivateZones.get","com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient.getWithResponse":"Oracle.Database.DnsPrivateZones.get","com.azure.resourcemanager.oracledatabase.fluent.DnsPrivateZonesClient.listByLocation":"Oracle.Database.DnsPrivateZones.listByLocation","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient":"Oracle.Database.ExadbVmClusters","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.beginCreateOrUpdate":"Azure.ResourceManager.ExadbVmClusters.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.beginDelete":"Azure.ResourceManager.ExadbVmClusters.delete","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.beginRemoveVms":"Oracle.Database.ExadbVmClusters.removeVms","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.beginUpdate":"Azure.ResourceManager.ExadbVmClusters.update","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.createOrUpdate":"Azure.ResourceManager.ExadbVmClusters.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.delete":"Azure.ResourceManager.ExadbVmClusters.delete","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.getByResourceGroup":"Azure.ResourceManager.ExadbVmClusters.get","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.getByResourceGroupWithResponse":"Azure.ResourceManager.ExadbVmClusters.get","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.list":"Azure.ResourceManager.ExadbVmClusters.listBySubscription","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.listByResourceGroup":"Oracle.Database.ExadbVmClusters.listByResourceGroup","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.removeVms":"Oracle.Database.ExadbVmClusters.removeVms","com.azure.resourcemanager.oracledatabase.fluent.ExadbVmClustersClient.update":"Azure.ResourceManager.ExadbVmClusters.update","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient":"Oracle.Database.ExascaleDbNodes","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.action":"Oracle.Database.ExascaleDbNodes.action","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.beginAction":"Oracle.Database.ExascaleDbNodes.action","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.get":"Oracle.Database.ExascaleDbNodes.get","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.getWithResponse":"Oracle.Database.ExascaleDbNodes.get","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbNodesClient.listByParent":"Oracle.Database.ExascaleDbNodes.listByParent","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient":"Oracle.Database.ExascaleDbStorageVaults","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.beginCreate":"Oracle.Database.ExascaleDbStorageVaults.create","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.beginDelete":"Oracle.Database.ExascaleDbStorageVaults.delete","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.beginUpdate":"Oracle.Database.ExascaleDbStorageVaults.update","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.create":"Oracle.Database.ExascaleDbStorageVaults.create","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.delete":"Oracle.Database.ExascaleDbStorageVaults.delete","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.getByResourceGroup":"Oracle.Database.ExascaleDbStorageVaults.get","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.getByResourceGroupWithResponse":"Oracle.Database.ExascaleDbStorageVaults.get","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.list":"Oracle.Database.ExascaleDbStorageVaults.listBySubscription","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.listByResourceGroup":"Oracle.Database.ExascaleDbStorageVaults.listByResourceGroup","com.azure.resourcemanager.oracledatabase.fluent.ExascaleDbStorageVaultsClient.update":"Oracle.Database.ExascaleDbStorageVaults.update","com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient":"Oracle.Database.FlexComponents","com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient.get":"Oracle.Database.FlexComponents.get","com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient.getWithResponse":"Oracle.Database.FlexComponents.get","com.azure.resourcemanager.oracledatabase.fluent.FlexComponentsClient.listByParent":"Oracle.Database.FlexComponents.listByParent","com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient":"Oracle.Database.GiMinorVersions","com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient.get":"Oracle.Database.GiMinorVersions.get","com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient.getWithResponse":"Oracle.Database.GiMinorVersions.get","com.azure.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient.listByParent":"Oracle.Database.GiMinorVersions.listByParent","com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient":"Oracle.Database.GiVersions","com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient.get":"Oracle.Database.GiVersions.get","com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient.getWithResponse":"Oracle.Database.GiVersions.get","com.azure.resourcemanager.oracledatabase.fluent.GiVersionsClient.listByLocation":"Oracle.Database.GiVersions.listByLocation","com.azure.resourcemanager.oracledatabase.fluent.OperationsClient":"Oracle.Database.Operations","com.azure.resourcemanager.oracledatabase.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.oracledatabase.fluent.OracleDatabaseManagementClient":"Oracle.Database","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient":"Oracle.Database.OracleSubscriptions","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.addAzureSubscriptions":"Oracle.Database.OracleSubscriptions.addAzureSubscriptions","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginAddAzureSubscriptions":"Oracle.Database.OracleSubscriptions.addAzureSubscriptions","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginCreateOrUpdate":"Azure.ResourceManager.OracleSubscriptions.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginDelete":"Azure.ResourceManager.OracleSubscriptions.delete","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginListActivationLinks":"Oracle.Database.OracleSubscriptions.listActivationLinks","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginListCloudAccountDetails":"Oracle.Database.OracleSubscriptions.listCloudAccountDetails","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginListSaasSubscriptionDetails":"Oracle.Database.OracleSubscriptions.listSaasSubscriptionDetails","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.beginUpdate":"Oracle.Database.OracleSubscriptions.update","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.createOrUpdate":"Azure.ResourceManager.OracleSubscriptions.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.delete":"Azure.ResourceManager.OracleSubscriptions.delete","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.get":"Azure.ResourceManager.OracleSubscriptions.get","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.getWithResponse":"Azure.ResourceManager.OracleSubscriptions.get","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.list":"Azure.ResourceManager.OracleSubscriptions.listBySubscription","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.listActivationLinks":"Oracle.Database.OracleSubscriptions.listActivationLinks","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.listCloudAccountDetails":"Oracle.Database.OracleSubscriptions.listCloudAccountDetails","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.listSaasSubscriptionDetails":"Oracle.Database.OracleSubscriptions.listSaasSubscriptionDetails","com.azure.resourcemanager.oracledatabase.fluent.OracleSubscriptionsClient.update":"Oracle.Database.OracleSubscriptions.update","com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient":"Oracle.Database.SystemVersions","com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient.get":"Oracle.Database.SystemVersions.get","com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient.getWithResponse":"Oracle.Database.SystemVersions.get","com.azure.resourcemanager.oracledatabase.fluent.SystemVersionsClient.listByLocation":"Oracle.Database.SystemVersions.listByLocation","com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient":"Oracle.Database.VirtualNetworkAddresses","com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.beginCreateOrUpdate":"Azure.ResourceManager.VirtualNetworkAddresses.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.beginDelete":"Azure.ResourceManager.VirtualNetworkAddresses.delete","com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.createOrUpdate":"Azure.ResourceManager.VirtualNetworkAddresses.createOrUpdate","com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.delete":"Azure.ResourceManager.VirtualNetworkAddresses.delete","com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.get":"Azure.ResourceManager.VirtualNetworkAddresses.get","com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.getWithResponse":"Azure.ResourceManager.VirtualNetworkAddresses.get","com.azure.resourcemanager.oracledatabase.fluent.VirtualNetworkAddressesClient.listByCloudVmCluster":"Oracle.Database.VirtualNetworkAddresses.listByParent","com.azure.resourcemanager.oracledatabase.fluent.models.ActivationLinksInner":"Oracle.Database.ActivationLinks","com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseBackupInner":"Oracle.Database.AutonomousDatabaseBackup","com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseCharacterSetInner":"Oracle.Database.AutonomousDatabaseCharacterSet","com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseInner":"Oracle.Database.AutonomousDatabase","com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseNationalCharacterSetInner":"Oracle.Database.AutonomousDatabaseNationalCharacterSet","com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseWalletFileInner":"Oracle.Database.AutonomousDatabaseWalletFile","com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDbVersionInner":"Oracle.Database.AutonomousDbVersion","com.azure.resourcemanager.oracledatabase.fluent.models.CloudAccountDetailsInner":"Oracle.Database.CloudAccountDetails","com.azure.resourcemanager.oracledatabase.fluent.models.CloudExadataInfrastructureInner":"Oracle.Database.CloudExadataInfrastructure","com.azure.resourcemanager.oracledatabase.fluent.models.CloudVmClusterInner":"Oracle.Database.CloudVmCluster","com.azure.resourcemanager.oracledatabase.fluent.models.DbActionResponseInner":"Oracle.Database.DbActionResponse","com.azure.resourcemanager.oracledatabase.fluent.models.DbNodeInner":"Oracle.Database.DbNode","com.azure.resourcemanager.oracledatabase.fluent.models.DbServerInner":"Oracle.Database.DbServer","com.azure.resourcemanager.oracledatabase.fluent.models.DbSystemShapeInner":"Oracle.Database.DbSystemShape","com.azure.resourcemanager.oracledatabase.fluent.models.DnsPrivateViewInner":"Oracle.Database.DnsPrivateView","com.azure.resourcemanager.oracledatabase.fluent.models.DnsPrivateZoneInner":"Oracle.Database.DnsPrivateZone","com.azure.resourcemanager.oracledatabase.fluent.models.ExadbVmClusterInner":"Oracle.Database.ExadbVmCluster","com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbNodeInner":"Oracle.Database.ExascaleDbNode","com.azure.resourcemanager.oracledatabase.fluent.models.ExascaleDbStorageVaultInner":"Oracle.Database.ExascaleDbStorageVault","com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner":"Oracle.Database.FlexComponent","com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner":"Oracle.Database.GiMinorVersion","com.azure.resourcemanager.oracledatabase.fluent.models.GiVersionInner":"Oracle.Database.GiVersion","com.azure.resourcemanager.oracledatabase.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.oracledatabase.fluent.models.OracleSubscriptionInner":"Oracle.Database.OracleSubscription","com.azure.resourcemanager.oracledatabase.fluent.models.PrivateIpAddressPropertiesInner":"Oracle.Database.PrivateIpAddressProperties","com.azure.resourcemanager.oracledatabase.fluent.models.SaasSubscriptionDetailsInner":"Oracle.Database.SaasSubscriptionDetails","com.azure.resourcemanager.oracledatabase.fluent.models.SystemVersionInner":"Oracle.Database.SystemVersion","com.azure.resourcemanager.oracledatabase.fluent.models.VirtualNetworkAddressInner":"Oracle.Database.VirtualNetworkAddress","com.azure.resourcemanager.oracledatabase.implementation.OracleDatabaseManagementClientBuilder":"Oracle.Database","com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseBackupListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseCharacterSetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDatabaseNationalCharacterSetListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.AutonomousDbVersionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.CloudExadataInfrastructureListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.CloudVmClusterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.DbNodeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.DbServerListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.DbSystemShapeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.DnsPrivateViewListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.DnsPrivateZoneListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.ExadbVmClusterListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.ExascaleDbNodeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.ExascaleDbStorageVaultListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.FlexComponentListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.GiMinorVersionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.GiVersionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.oracledatabase.implementation.models.OracleSubscriptionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.SystemVersionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.implementation.models.VirtualNetworkAddressListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.oracledatabase.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode":"Oracle.Database.AddRemoveDbNode","com.azure.resourcemanager.oracledatabase.models.AddSubscriptionOperationState":"Oracle.Database.AddSubscriptionOperationState","com.azure.resourcemanager.oracledatabase.models.AllConnectionStringType":"Oracle.Database.AllConnectionStringType","com.azure.resourcemanager.oracledatabase.models.ApexDetailsType":"Oracle.Database.ApexDetailsType","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupLifecycleState":"Oracle.Database.AutonomousDatabaseBackupLifecycleState","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties":"Oracle.Database.AutonomousDatabaseBackupProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupType":"Oracle.Database.AutonomousDatabaseBackupType","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBaseProperties":"Oracle.Database.AutonomousDatabaseBaseProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSetProperties":"Oracle.Database.AutonomousDatabaseCharacterSetProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCloneProperties":"Oracle.Database.AutonomousDatabaseCloneProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCrossRegionDisasterRecoveryProperties":"Oracle.Database.AutonomousDatabaseCrossRegionDisasterRecoveryProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseFromBackupTimestampProperties":"Oracle.Database.AutonomousDatabaseFromBackupTimestampProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseLifecycleState":"Oracle.Database.AutonomousDatabaseLifecycleState","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSetProperties":"Oracle.Database.AutonomousDatabaseNationalCharacterSetProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseProperties":"Oracle.Database.AutonomousDatabaseProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseStandbySummary":"Oracle.Database.AutonomousDatabaseStandbySummary","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousDbVersionProperties":"Oracle.Database.AutonomousDbVersionProperties","com.azure.resourcemanager.oracledatabase.models.AutonomousMaintenanceScheduleType":"Oracle.Database.AutonomousMaintenanceScheduleType","com.azure.resourcemanager.oracledatabase.models.AzureResourceProvisioningState":"Oracle.Database.AzureResourceProvisioningState","com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions":"Oracle.Database.AzureSubscriptions","com.azure.resourcemanager.oracledatabase.models.CloneType":"Oracle.Database.CloneType","com.azure.resourcemanager.oracledatabase.models.CloudAccountProvisioningState":"Oracle.Database.CloudAccountProvisioningState","com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureLifecycleState":"Oracle.Database.CloudExadataInfrastructureLifecycleState","com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureProperties":"Oracle.Database.CloudExadataInfrastructureProperties","com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.oracledatabase.models.CloudVmClusterLifecycleState":"Oracle.Database.CloudVmClusterLifecycleState","com.azure.resourcemanager.oracledatabase.models.CloudVmClusterProperties":"Oracle.Database.CloudVmClusterProperties","com.azure.resourcemanager.oracledatabase.models.CloudVmClusterUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.oracledatabase.models.CloudVmClusterUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.oracledatabase.models.ComputeModel":"Oracle.Database.ComputeModel","com.azure.resourcemanager.oracledatabase.models.ConnectionStringType":"Oracle.Database.ConnectionStringType","com.azure.resourcemanager.oracledatabase.models.ConnectionUrlType":"Oracle.Database.ConnectionUrlType","com.azure.resourcemanager.oracledatabase.models.ConsumerGroup":"Oracle.Database.ConsumerGroup","com.azure.resourcemanager.oracledatabase.models.CustomerContact":"Oracle.Database.CustomerContact","com.azure.resourcemanager.oracledatabase.models.DataBaseType":"Oracle.Database.DataBaseType","com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions":"Oracle.Database.DataCollectionOptions","com.azure.resourcemanager.oracledatabase.models.DataSafeStatusType":"Oracle.Database.DataSafeStatusType","com.azure.resourcemanager.oracledatabase.models.DatabaseEditionType":"Oracle.Database.DatabaseEditionType","com.azure.resourcemanager.oracledatabase.models.DayOfWeek":"Oracle.Database.DayOfWeek","com.azure.resourcemanager.oracledatabase.models.DayOfWeekName":"Oracle.Database.DayOfWeekName","com.azure.resourcemanager.oracledatabase.models.DbIormConfig":"Oracle.Database.DbIormConfig","com.azure.resourcemanager.oracledatabase.models.DbNodeAction":"Oracle.Database.DbNodeAction","com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum":"Oracle.Database.DbNodeActionEnum","com.azure.resourcemanager.oracledatabase.models.DbNodeDetails":"Oracle.Database.DbNodeDetails","com.azure.resourcemanager.oracledatabase.models.DbNodeMaintenanceType":"Oracle.Database.DbNodeMaintenanceType","com.azure.resourcemanager.oracledatabase.models.DbNodeProperties":"Oracle.Database.DbNodeProperties","com.azure.resourcemanager.oracledatabase.models.DbNodeProvisioningState":"Oracle.Database.DbNodeProvisioningState","com.azure.resourcemanager.oracledatabase.models.DbServerPatchingDetails":"Oracle.Database.DbServerPatchingDetails","com.azure.resourcemanager.oracledatabase.models.DbServerPatchingStatus":"Oracle.Database.DbServerPatchingStatus","com.azure.resourcemanager.oracledatabase.models.DbServerProperties":"Oracle.Database.DbServerProperties","com.azure.resourcemanager.oracledatabase.models.DbServerProvisioningState":"Oracle.Database.DbServerProvisioningState","com.azure.resourcemanager.oracledatabase.models.DbSystemShapeProperties":"Oracle.Database.DbSystemShapeProperties","com.azure.resourcemanager.oracledatabase.models.DefinedFileSystemConfiguration":"Oracle.Database.DefinedFileSystemConfiguration","com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails":"Oracle.Database.DisasterRecoveryConfigurationDetails","com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType":"Oracle.Database.DisasterRecoveryType","com.azure.resourcemanager.oracledatabase.models.DiskRedundancy":"Oracle.Database.DiskRedundancy","com.azure.resourcemanager.oracledatabase.models.DnsPrivateViewProperties":"Oracle.Database.DnsPrivateViewProperties","com.azure.resourcemanager.oracledatabase.models.DnsPrivateViewsLifecycleState":"Oracle.Database.DnsPrivateViewsLifecycleState","com.azure.resourcemanager.oracledatabase.models.DnsPrivateZoneProperties":"Oracle.Database.DnsPrivateZoneProperties","com.azure.resourcemanager.oracledatabase.models.DnsPrivateZonesLifecycleState":"Oracle.Database.DnsPrivateZonesLifecycleState","com.azure.resourcemanager.oracledatabase.models.EstimatedPatchingTime":"Oracle.Database.EstimatedPatchingTime","com.azure.resourcemanager.oracledatabase.models.ExadataIormConfig":"Oracle.Database.ExadataIormConfig","com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterLifecycleState":"Oracle.Database.ExadbVmClusterLifecycleState","com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterProperties":"Oracle.Database.ExadbVmClusterProperties","com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterStorageDetails":"Oracle.Database.ExadbVmClusterStorageDetails","com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodeProperties":"Oracle.Database.ExascaleDbNodeProperties","com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageDetails":"Oracle.Database.ExascaleDbStorageDetails","com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageInputDetails":"Oracle.Database.ExascaleDbStorageInputDetails","com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultLifecycleState":"Oracle.Database.ExascaleDbStorageVaultLifecycleState","com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties":"Oracle.Database.ExascaleDbStorageVaultProperties","com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultTagsUpdate":"Azure.ResourceManager.Foundations.TagsUpdateModel","com.azure.resourcemanager.oracledatabase.models.FileSystemConfigurationDetails":"Oracle.Database.FileSystemConfigurationDetails","com.azure.resourcemanager.oracledatabase.models.FlexComponentProperties":"Oracle.Database.FlexComponentProperties","com.azure.resourcemanager.oracledatabase.models.GenerateAutonomousDatabaseWalletDetails":"Oracle.Database.GenerateAutonomousDatabaseWalletDetails","com.azure.resourcemanager.oracledatabase.models.GenerateType":"Oracle.Database.GenerateType","com.azure.resourcemanager.oracledatabase.models.GiMinorVersionProperties":"Oracle.Database.GiMinorVersionProperties","com.azure.resourcemanager.oracledatabase.models.GiVersionProperties":"Oracle.Database.GiVersionProperties","com.azure.resourcemanager.oracledatabase.models.GridImageType":"Oracle.Database.GridImageType","com.azure.resourcemanager.oracledatabase.models.HardwareType":"Oracle.Database.HardwareType","com.azure.resourcemanager.oracledatabase.models.HostFormatType":"Oracle.Database.HostFormatType","com.azure.resourcemanager.oracledatabase.models.Intent":"Oracle.Database.Intent","com.azure.resourcemanager.oracledatabase.models.IormLifecycleState":"Oracle.Database.IormLifecycleState","com.azure.resourcemanager.oracledatabase.models.LicenseModel":"Oracle.Database.LicenseModel","com.azure.resourcemanager.oracledatabase.models.LongTermBackUpScheduleDetails":"Oracle.Database.LongTermBackUpScheduleDetails","com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow":"Oracle.Database.MaintenanceWindow","com.azure.resourcemanager.oracledatabase.models.Month":"Oracle.Database.Month","com.azure.resourcemanager.oracledatabase.models.MonthName":"Oracle.Database.MonthName","com.azure.resourcemanager.oracledatabase.models.NsgCidr":"Oracle.Database.NsgCidr","com.azure.resourcemanager.oracledatabase.models.Objective":"Oracle.Database.Objective","com.azure.resourcemanager.oracledatabase.models.OpenModeType":"Oracle.Database.OpenModeType","com.azure.resourcemanager.oracledatabase.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.oracledatabase.models.OperationsInsightsStatusType":"Oracle.Database.OperationsInsightsStatusType","com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionProperties":"Oracle.Database.OracleSubscriptionProperties","com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionProvisioningState":"Oracle.Database.OracleSubscriptionProvisioningState","com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate":"Azure.ResourceManager.Foundations.ResourceUpdateModel","com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdateProperties":"Azure.ResourceManager.Foundations.ResourceUpdateModelProperties","com.azure.resourcemanager.oracledatabase.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.oracledatabase.models.PatchingMode":"Oracle.Database.PatchingMode","com.azure.resourcemanager.oracledatabase.models.PeerDbDetails":"Oracle.Database.PeerDbDetails","com.azure.resourcemanager.oracledatabase.models.PermissionLevelType":"Oracle.Database.PermissionLevelType","com.azure.resourcemanager.oracledatabase.models.Plan":"Azure.ResourceManager.CommonTypes.Plan","com.azure.resourcemanager.oracledatabase.models.PlanUpdate":"Oracle.Database.PlanUpdate","com.azure.resourcemanager.oracledatabase.models.PortRange":"Oracle.Database.PortRange","com.azure.resourcemanager.oracledatabase.models.Preference":"Oracle.Database.Preference","com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter":"Oracle.Database.PrivateIpAddressesFilter","com.azure.resourcemanager.oracledatabase.models.ProfileType":"Oracle.Database.ProfileType","com.azure.resourcemanager.oracledatabase.models.ProtocolType":"Oracle.Database.ProtocolType","com.azure.resourcemanager.oracledatabase.models.RefreshableModelType":"Oracle.Database.RefreshableModelType","com.azure.resourcemanager.oracledatabase.models.RefreshableStatusType":"Oracle.Database.RefreshableStatusType","com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails":"Oracle.Database.RemoveVirtualMachineFromExadbVmClusterDetails","com.azure.resourcemanager.oracledatabase.models.RepeatCadenceType":"Oracle.Database.RepeatCadenceType","com.azure.resourcemanager.oracledatabase.models.ResourceProvisioningState":"Azure.ResourceManager.ResourceProvisioningState","com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails":"Oracle.Database.RestoreAutonomousDatabaseDetails","com.azure.resourcemanager.oracledatabase.models.RoleType":"Oracle.Database.RoleType","com.azure.resourcemanager.oracledatabase.models.ScheduledOperationsType":"Oracle.Database.ScheduledOperationsType","com.azure.resourcemanager.oracledatabase.models.SessionModeType":"Oracle.Database.SessionModeType","com.azure.resourcemanager.oracledatabase.models.ShapeFamily":"Oracle.Database.ShapeFamily","com.azure.resourcemanager.oracledatabase.models.SourceType":"Oracle.Database.SourceType","com.azure.resourcemanager.oracledatabase.models.SyntaxFormatType":"Oracle.Database.SyntaxFormatType","com.azure.resourcemanager.oracledatabase.models.SystemShapes":"Oracle.Database.SystemShapes","com.azure.resourcemanager.oracledatabase.models.SystemVersionProperties":"Oracle.Database.SystemVersionProperties","com.azure.resourcemanager.oracledatabase.models.TlsAuthenticationType":"Oracle.Database.TlsAuthenticationType","com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressLifecycleState":"Oracle.Database.VirtualNetworkAddressLifecycleState","com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProperties":"Oracle.Database.VirtualNetworkAddressProperties","com.azure.resourcemanager.oracledatabase.models.WorkloadType":"Oracle.Database.WorkloadType","com.azure.resourcemanager.oracledatabase.models.ZoneType":"Oracle.Database.ZoneType"}} \ No newline at end of file diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracledatabase/proxy-config.json b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracledatabase/proxy-config.json index 834af90d4e09..8d042121ef51 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracledatabase/proxy-config.json +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracledatabase/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseBackupsClientImpl$AutonomousDatabaseBackupsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseCharacterSetsClientImpl$AutonomousDatabaseCharacterSetsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseNationalCharacterSetsClientImpl$AutonomousDatabaseNationalCharacterSetsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseVersionsClientImpl$AutonomousDatabaseVersionsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabasesClientImpl$AutonomousDatabasesService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.CloudExadataInfrastructuresClientImpl$CloudExadataInfrastructuresService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.CloudVmClustersClientImpl$CloudVmClustersService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.DbNodesClientImpl$DbNodesService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.DbServersClientImpl$DbServersService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.DbSystemShapesClientImpl$DbSystemShapesService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.DnsPrivateViewsClientImpl$DnsPrivateViewsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.DnsPrivateZonesClientImpl$DnsPrivateZonesService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.GiVersionsClientImpl$GiVersionsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.OracleSubscriptionsClientImpl$OracleSubscriptionsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.SystemVersionsClientImpl$SystemVersionsService" ], [ "com.azure.resourcemanager.oracledatabase.implementation.VirtualNetworkAddressesClientImpl$VirtualNetworkAddressesService" ] ] \ No newline at end of file +[["com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseBackupsClientImpl$AutonomousDatabaseBackupsService"],["com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseCharacterSetsClientImpl$AutonomousDatabaseCharacterSetsService"],["com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseNationalCharacterSetsClientImpl$AutonomousDatabaseNationalCharacterSetsService"],["com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabaseVersionsClientImpl$AutonomousDatabaseVersionsService"],["com.azure.resourcemanager.oracledatabase.implementation.AutonomousDatabasesClientImpl$AutonomousDatabasesService"],["com.azure.resourcemanager.oracledatabase.implementation.CloudExadataInfrastructuresClientImpl$CloudExadataInfrastructuresService"],["com.azure.resourcemanager.oracledatabase.implementation.CloudVmClustersClientImpl$CloudVmClustersService"],["com.azure.resourcemanager.oracledatabase.implementation.DbNodesClientImpl$DbNodesService"],["com.azure.resourcemanager.oracledatabase.implementation.DbServersClientImpl$DbServersService"],["com.azure.resourcemanager.oracledatabase.implementation.DbSystemShapesClientImpl$DbSystemShapesService"],["com.azure.resourcemanager.oracledatabase.implementation.DnsPrivateViewsClientImpl$DnsPrivateViewsService"],["com.azure.resourcemanager.oracledatabase.implementation.DnsPrivateZonesClientImpl$DnsPrivateZonesService"],["com.azure.resourcemanager.oracledatabase.implementation.ExadbVmClustersClientImpl$ExadbVmClustersService"],["com.azure.resourcemanager.oracledatabase.implementation.ExascaleDbNodesClientImpl$ExascaleDbNodesService"],["com.azure.resourcemanager.oracledatabase.implementation.ExascaleDbStorageVaultsClientImpl$ExascaleDbStorageVaultsService"],["com.azure.resourcemanager.oracledatabase.implementation.FlexComponentsClientImpl$FlexComponentsService"],["com.azure.resourcemanager.oracledatabase.implementation.GiMinorVersionsClientImpl$GiMinorVersionsService"],["com.azure.resourcemanager.oracledatabase.implementation.GiVersionsClientImpl$GiVersionsService"],["com.azure.resourcemanager.oracledatabase.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.oracledatabase.implementation.OracleSubscriptionsClientImpl$OracleSubscriptionsService"],["com.azure.resourcemanager.oracledatabase.implementation.SystemVersionsClientImpl$SystemVersionsService"],["com.azure.resourcemanager.oracledatabase.implementation.VirtualNetworkAddressesClientImpl$VirtualNetworkAddressesService"]] \ No newline at end of file diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracledatabase/reflect-config.json b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracledatabase/reflect-config.json index 8878e547a798..0637a088a01e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracledatabase/reflect-config.json +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracledatabase/reflect-config.json @@ -1 +1 @@ -[ ] \ No newline at end of file +[] \ No newline at end of file diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/azure-resourcemanager-oracledatabase.properties b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/azure-resourcemanager-oracledatabase.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/resources/azure-resourcemanager-oracledatabase.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsCreateOrUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsCreateOrUpdateSamples.java deleted file mode 100644 index c1c630db5a37..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsCreateOrUpdateSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties; - -/** - * Samples for AutonomousDatabaseBackups CreateOrUpdate. - */ -public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create. - * json - */ - /** - * Sample code: Create Autonomous Database Backup. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createAutonomousDatabaseBackup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .define("1711644130") - .withExistingAutonomousDatabase("rg000", "databasedb1") - .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("Nightly Backup") - .withRetentionPeriodInDays(365)) - .create(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create. - * json - */ - /** - * Sample code: AutonomousDatabaseBackups_CreateOrUpdate. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void autonomousDatabaseBackupsCreateOrUpdate( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .define("1711644130") - .withExistingAutonomousDatabase("rg000", "databasedb1") - .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("Nightly Backup") - .withRetentionPeriodInDays(365)) - .create(); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsDeleteSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsDeleteSamples.java deleted file mode 100644 index d1972d1c9eaa..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsDeleteSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabaseBackups Delete. - */ -public final class AutonomousDatabaseBackupsDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete. - * json - */ - /** - * Sample code: Delete Autonomous Database Backup. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - deleteAutonomousDatabaseBackup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .delete("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete. - * json - */ - /** - * Sample code: AutonomousDatabaseBackups_Delete. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabaseBackupsDelete(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .delete("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsGetSamples.java deleted file mode 100644 index ffc17390874e..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsGetSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabaseBackups Get. - */ -public final class AutonomousDatabaseBackupsGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get. - * json - */ - /** - * Sample code: Get Autonomous Database Backup. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getAutonomousDatabaseBackup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get. - * json - */ - /** - * Sample code: AutonomousDatabaseBackups_Get. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabaseBackupsGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.java index c613ee04e29b..a2dc1f9d5e5c 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,23 +9,7 @@ */ public final class AutonomousDatabaseBackupsListByAutonomousDatabaseSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseBackup_listByParent.json - */ - /** - * Sample code: List Autonomous Database Backups by Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listAutonomousDatabaseBackupsByAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseBackups() - .listByAutonomousDatabase("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseBackup_listByParent.json + * x-ms-original-file: 2025-03-01/autonomousDatabaseBackup_listByParent.json */ /** * Sample code: AutonomousDatabaseBackups_ListByAutonomousDatabase. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsUpdateSamples.java index a3820390cc56..f01035e10a39 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsUpdateSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -11,27 +11,7 @@ */ public final class AutonomousDatabaseBackupsUpdateSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch. - * json - */ - /** - * Sample code: Patch Autonomous Database Backup. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - patchAutonomousDatabaseBackup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - AutonomousDatabaseBackup resource = manager.autonomousDatabaseBackups() - .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch. - * json + * x-ms-original-file: 2025-03-01/autonomousDatabaseBackup_patch.json */ /** * Sample code: AutonomousDatabaseBackups_Update. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsGetSamples.java deleted file mode 100644 index 67e57cd5f060..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabaseCharacterSets Get. - */ -public final class AutonomousDatabaseCharacterSetsGetSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseCharacterSet_get.json - */ - /** - * Sample code: Get autonomous db character set. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getAutonomousDbCharacterSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseCharacterSets() - .getWithResponse("eastus", "DATABASE", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsListByLocationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsListByLocationSamples.java deleted file mode 100644 index 174598b0b98c..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsListByLocationSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabaseCharacterSets ListByLocation. - */ -public final class AutonomousDatabaseCharacterSetsListByLocationSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseCharacterSet_listByLocation.json - */ - /** - * Sample code: List autonomous db character sets by location. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listAutonomousDbCharacterSetsByLocation( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsGetSamples.java deleted file mode 100644 index f22d151ed0f5..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabaseNationalCharacterSets Get. - */ -public final class AutonomousDatabaseNationalCharacterSetsGetSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseNationalCharacterSet_get.json - */ - /** - * Sample code: Get autonomous db national character set. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getAutonomousDbNationalCharacterSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseNationalCharacterSets() - .getWithResponse("eastus", "NATIONAL", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsListByLocationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsListByLocationSamples.java deleted file mode 100644 index 825a4ccb26fd..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsListByLocationSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabaseNationalCharacterSets ListByLocation. - */ -public final class AutonomousDatabaseNationalCharacterSetsListByLocationSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseNationalCharacterSet_listByLocation.json - */ - /** - * Sample code: List autonomous db national character sets by location. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listAutonomousDbNationalCharacterSetsByLocation( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseNationalCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsGetSamples.java deleted file mode 100644 index ca5832f44611..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabaseVersions Get. - */ -public final class AutonomousDatabaseVersionsGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get. - * json - */ - /** - * Sample code: Get an autonomous version. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getAnAutonomousVersion(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseVersions().getWithResponse("eastus", "18.4.0.0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsListByLocationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsListByLocationSamples.java deleted file mode 100644 index e2425bb23ed8..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsListByLocationSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabaseVersions ListByLocation. - */ -public final class AutonomousDatabaseVersionsListByLocationSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabaseVersion_listByLocation.json - */ - /** - * Sample code: List an autonomous versions by location. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listAnAutonomousVersionsByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabaseVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples.java new file mode 100644 index 000000000000..01ca9af7a6fa --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryConfigurationDetails; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType; + +/** + * Samples for AutonomousDatabases ChangeDisasterRecoveryConfiguration. + */ +public final class AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples { + /* + * x-ms-original-file: 2025-03-01/autonomousDatabase_changeDisasterRecoveryConfiguration.json + */ + /** + * Sample code: AutonomousDatabases_ChangeDisasterRecoveryConfiguration. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void autonomousDatabasesChangeDisasterRecoveryConfiguration( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .changeDisasterRecoveryConfiguration("rg000", "databasedb1", + new DisasterRecoveryConfigurationDetails().withDisasterRecoveryType(DisasterRecoveryType.ADG) + .withIsReplicateAutomaticBackups(false), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesCreateOrUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesCreateOrUpdateSamples.java deleted file mode 100644 index fd21c212aa5b..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesCreateOrUpdateSamples.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCloneProperties; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseProperties; -import com.azure.resourcemanager.oracledatabase.models.CloneType; -import com.azure.resourcemanager.oracledatabase.models.ComputeModel; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for AutonomousDatabases CreateOrUpdate. - */ -public final class AutonomousDatabasesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json - */ - /** - * Sample code: AutonomousDatabases_CreateOrUpdate. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabasesCreateOrUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .define("databasedb1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new AutonomousDatabaseProperties().withAdminPassword("fakeTokenPlaceholder") - .withCharacterSet("AL32UTF8") - .withComputeCount(2.0F) - .withComputeModel(ComputeModel.ECPU) - .withDataStorageSizeInTbs(1) - .withDbVersion("18.4.0.0") - .withDisplayName("example_autonomous_databasedb1") - .withNcharacterSet("AL16UTF16") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1")) - .create(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json - */ - /** - * Sample code: Create Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .define("databasedb1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new AutonomousDatabaseProperties().withAdminPassword("fakeTokenPlaceholder") - .withCharacterSet("AL32UTF8") - .withComputeCount(2.0F) - .withComputeModel(ComputeModel.ECPU) - .withDataStorageSizeInTbs(1) - .withDbVersion("18.4.0.0") - .withDisplayName("example_autonomous_databasedb1") - .withNcharacterSet("AL16UTF16") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1")) - .create(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create. - * json - */ - /** - * Sample code: Create clone Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createCloneAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .define("databasedb1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new AutonomousDatabaseCloneProperties().withAdminPassword("fakeTokenPlaceholder") - .withCharacterSet("AL32UTF8") - .withComputeCount(2.0F) - .withComputeModel(ComputeModel.ECPU) - .withDataStorageSizeInTbs(1) - .withDisplayName("example_autonomous_databasedb1_clone") - .withNcharacterSet("AL16UTF16") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") - .withSourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1") - .withCloneType(CloneType.FULL)) - .create(); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create. - * json - */ - /** - * Sample code: AutonomousDatabases_CreateOrUpdate_clone. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - autonomousDatabasesCreateOrUpdateClone(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .define("databasedb1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new AutonomousDatabaseCloneProperties().withAdminPassword("fakeTokenPlaceholder") - .withCharacterSet("AL32UTF8") - .withComputeCount(2.0F) - .withComputeModel(ComputeModel.ECPU) - .withDataStorageSizeInTbs(1) - .withDisplayName("example_autonomous_databasedb1_clone") - .withNcharacterSet("AL16UTF16") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") - .withSourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1") - .withCloneType(CloneType.FULL)) - .create(); - } - - // Use "Map.of" if available - @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/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesDeleteSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesDeleteSamples.java deleted file mode 100644 index 0c6748cc5e91..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabases Delete. - */ -public final class AutonomousDatabasesDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_delete.json - */ - /** - * Sample code: Delete Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - deleteAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().delete("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesFailoverSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesFailoverSamples.java index 45eb7cc828a2..f49b5d85d143 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesFailoverSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesFailoverSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -11,8 +11,7 @@ */ public final class AutonomousDatabasesFailoverSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + * x-ms-original-file: 2025-03-01/autonomousDatabase_failover.json */ /** * Sample code: AutonomousDatabases_Failover. @@ -25,20 +24,4 @@ public final class AutonomousDatabasesFailoverSamples { .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json - */ - /** - * Sample code: Perform failover action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performFailoverActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), - com.azure.core.util.Context.NONE); - } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesGenerateWalletSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesGenerateWalletSamples.java index 830d08a0d4a5..b382236d6c33 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesGenerateWalletSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesGenerateWalletSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -12,16 +12,15 @@ */ public final class AutonomousDatabasesGenerateWalletSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabase_generateWallet.json + * x-ms-original-file: 2025-03-01/autonomousDatabase_generateWallet.json */ /** - * Sample code: Generate wallet action on Autonomous Database. + * Sample code: AutonomousDatabases_generateWallet. * * @param manager Entry point to OracleDatabaseManager. */ - public static void generateWalletActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void + autonomousDatabasesGenerateWallet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.autonomousDatabases() .generateWalletWithResponse("rg000", "databasedb1", new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesGetByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesGetByResourceGroupSamples.java deleted file mode 100644 index ed5524740ec9..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesGetByResourceGroupSamples.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabases GetByResourceGroup. - */ -public final class AutonomousDatabasesGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json - */ - /** - * Sample code: Get Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json - */ - /** - * Sample code: AutonomousDatabases_Get. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void autonomousDatabasesGet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesListByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesListByResourceGroupSamples.java deleted file mode 100644 index 6757789c8559..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesListByResourceGroupSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabases ListByResourceGroup. - */ -public final class AutonomousDatabasesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabase_listByResourceGroup.json - */ - /** - * Sample code: List Autonomous Database by resource group. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listAutonomousDatabaseByResourceGroup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesListSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesListSamples.java deleted file mode 100644 index ce85e5d2e9a2..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabases List. - */ -public final class AutonomousDatabasesListSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * autonomousDatabase_listBySubscription.json - */ - /** - * Sample code: List Autonomous Database by subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listAutonomousDatabaseBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesRestoreSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesRestoreSamples.java index f9f93a775d68..03015ab90214 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesRestoreSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesRestoreSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -12,8 +12,7 @@ */ public final class AutonomousDatabasesRestoreSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + * x-ms-original-file: 2025-03-01/autonomousDatabase_restore.json */ /** * Sample code: AutonomousDatabases_Restore. @@ -27,21 +26,4 @@ public final class AutonomousDatabasesRestoreSamples { new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json - */ - /** - * Sample code: Perform restore action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performRestoreActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .restore("rg000", "databasedb1", - new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2024-04-23T00:00:00.000Z")), - com.azure.core.util.Context.NONE); - } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesShrinkSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesShrinkSamples.java deleted file mode 100644 index 912c18372290..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesShrinkSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for AutonomousDatabases Shrink. - */ -public final class AutonomousDatabasesShrinkSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_shrink.json - */ - /** - * Sample code: Perform shrink action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performShrinkActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases().shrink("rg000", "databasedb1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesSwitchoverSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesSwitchoverSamples.java index c496e3729bae..7272c2ed6388 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesSwitchoverSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesSwitchoverSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -11,26 +11,7 @@ */ public final class AutonomousDatabasesSwitchoverSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover. - * json - */ - /** - * Sample code: Perform switchover action on Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void performSwitchoverActionOnAutonomousDatabase( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.autonomousDatabases() - .switchover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover. - * json + * x-ms-original-file: 2025-03-01/autonomousDatabase_switchover.json */ /** * Sample code: AutonomousDatabases_Switchover. diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesUpdateSamples.java deleted file mode 100644 index 2a9089542541..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabase; - -/** - * Samples for AutonomousDatabases Update. - */ -public final class AutonomousDatabasesUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_patch.json - */ - /** - * Sample code: Patch Autonomous Database. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void patchAutonomousDatabase(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - AutonomousDatabase resource = manager.autonomousDatabases() - .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacitySamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacitySamples.java index f7af6bf009f9..b93fe000c36f 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacitySamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacitySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,15 +9,14 @@ */ public final class CloudExadataInfrastructuresAddStorageCapacitySamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_addStorageCapacity.json + * x-ms-original-file: 2025-03-01/exaInfra_addStorageCapacity.json */ /** - * Sample code: Perform add storage capacity on exadata infra. + * Sample code: CloudExadataInfrastructures_addStorageCapacity. * * @param manager Entry point to OracleDatabaseManager. */ - public static void performAddStorageCapacityOnExadataInfra( + public static void cloudExadataInfrastructuresAddStorageCapacity( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.cloudExadataInfrastructures().addStorageCapacity("rg000", "infra1", com.azure.core.util.Context.NONE); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresCreateOrUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresCreateOrUpdateSamples.java deleted file mode 100644 index ea2a8fffa75d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresCreateOrUpdateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for CloudExadataInfrastructures CreateOrUpdate. - */ -public final class CloudExadataInfrastructuresCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_create.json - */ - /** - * Sample code: Create Exadata Infrastructure. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures() - .define("infra1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withZones(Arrays.asList("1")) - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new CloudExadataInfrastructureProperties().withComputeCount(100) - .withStorageCount(10) - .withShape("EXADATA.X9M") - .withDisplayName("infra 1")) - .create(); - } - - // Use "Map.of" if available - @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/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresDeleteSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresDeleteSamples.java deleted file mode 100644 index 04f1a87139e2..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for CloudExadataInfrastructures Delete. - */ -public final class CloudExadataInfrastructuresDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_delete.json - */ - /** - * Sample code: Delete Exadata Infrastructure. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - deleteExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures().delete("rg000", "infra1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresGetByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresGetByResourceGroupSamples.java deleted file mode 100644 index 02f9ac63a4d0..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresGetByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for CloudExadataInfrastructures GetByResourceGroup. - */ -public final class CloudExadataInfrastructuresGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json - */ - /** - * Sample code: Get Exadata Infrastructure. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures() - .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListByResourceGroupSamples.java deleted file mode 100644 index fc8bb7c737e5..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for CloudExadataInfrastructures ListByResourceGroup. - */ -public final class CloudExadataInfrastructuresListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listByResourceGroup. - * json - */ - /** - * Sample code: List Exadata Infrastructure by resource group. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listExadataInfrastructureByResourceGroup( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListSamples.java deleted file mode 100644 index f24835759c81..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for CloudExadataInfrastructures List. - */ -public final class CloudExadataInfrastructuresListSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listBySubscription.json - */ - /** - * Sample code: List Exadata Infrastructure by subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listExadataInfrastructureBySubscription( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudExadataInfrastructures().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresUpdateSamples.java deleted file mode 100644 index e1da02b7094f..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructure; - -/** - * Samples for CloudExadataInfrastructures Update. - */ -public final class CloudExadataInfrastructuresUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_patch.json - */ - /** - * Sample code: Patch Exadata Infrastructure. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - patchExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - CloudExadataInfrastructure resource = manager.cloudExadataInfrastructures() - .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersAddVmsSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersAddVmsSamples.java index 5579dd55c777..15954e1ceaba 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersAddVmsSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersAddVmsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -12,15 +12,14 @@ */ public final class CloudVmClustersAddVmsSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_addVms.json + * x-ms-original-file: 2025-03-01/vmClusters_addVms.json */ /** - * Sample code: Add VMs to VM Cluster. + * Sample code: CloudVmClusters_addVms. * * @param manager Entry point to OracleDatabaseManager. */ - public static void addVMsToVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void cloudVmClustersAddVms(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.cloudVmClusters() .addVms("rg000", "cluster1", new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersCreateOrUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersCreateOrUpdateSamples.java deleted file mode 100644 index b6eaccdbfee5..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersCreateOrUpdateSamples.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.models.CloudVmClusterProperties; -import com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions; -import com.azure.resourcemanager.oracledatabase.models.LicenseModel; -import com.azure.resourcemanager.oracledatabase.models.NsgCidr; -import com.azure.resourcemanager.oracledatabase.models.PortRange; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for CloudVmClusters CreateOrUpdate. - */ -public final class CloudVmClustersCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_create.json - */ - /** - * Sample code: Create VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void createVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters() - .define("cluster1") - .withRegion("eastus") - .withExistingResourceGroup("rg000") - .withTags(mapOf("tagK1", "tagV1")) - .withProperties(new CloudVmClusterProperties().withDataStorageSizeInTbs(1000.0D) - .withDbNodeStorageSizeInGbs(1000) - .withMemorySizeInGbs(1000) - .withTimeZone("UTC") - .withHostname("hostname1") - .withDomain("domain1") - .withCpuCoreCount(2) - .withOcpuCount(3.0F) - .withClusterName("cluster1") - .withDataStoragePercentage(100) - .withIsLocalBackupEnabled(false) - .withCloudExadataInfrastructureId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/cloudExadataInfrastructures/infra1") - .withIsSparseDiskgroupEnabled(false) - .withSshPublicKeys(Arrays.asList("ssh-key 1")) - .withLicenseModel(LicenseModel.LICENSE_INCLUDED) - .withScanListenerPortTcp(1050) - .withScanListenerPortTcpSsl(1025) - .withVnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") - .withGiVersion("19.0.0.0") - .withSubnetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withBackupSubnetCidr("172.17.5.0/24") - .withNsgCidrs(Arrays.asList( - new NsgCidr().withSource("10.0.0.0/16") - .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)), - new NsgCidr().withSource("10.10.0.0/24"))) - .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(false) - .withIsHealthMonitoringEnabled(false) - .withIsIncidentLogsEnabled(false)) - .withDisplayName("cluster 1") - .withDbServers(Arrays.asList("ocid1..aaaa"))) - .create(); - } - - // Use "Map.of" if available - @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/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersDeleteSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersDeleteSamples.java deleted file mode 100644 index dd334d94eb59..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersDeleteSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for CloudVmClusters Delete. - */ -public final class CloudVmClustersDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_delete.json - */ - /** - * Sample code: Delete VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void deleteVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters().delete("rg000", "cluster1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersGetByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersGetByResourceGroupSamples.java deleted file mode 100644 index 1996de1e786f..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersGetByResourceGroupSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for CloudVmClusters GetByResourceGroup. - */ -public final class CloudVmClustersGetByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json - */ - /** - * Sample code: Get VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters().getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListByResourceGroupSamples.java deleted file mode 100644 index 8cffe93c234f..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListByResourceGroupSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for CloudVmClusters ListByResourceGroup. - */ -public final class CloudVmClustersListByResourceGroupSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listByResourceGroup. - * json - */ - /** - * Sample code: List VM Clusters by resource group. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listVMClustersByResourceGroup(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesSamples.java index c319b9265763..ae938a1915ca 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -11,16 +11,15 @@ */ public final class CloudVmClustersListPrivateIpAddressesSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * vmClusters_listPrivateIpAddresses.json + * x-ms-original-file: 2025-03-01/vmClusters_listPrivateIpAddresses.json */ /** - * Sample code: List Private IP Addresses for VM Cluster. + * Sample code: CloudVmClusters_listPrivateIpAddresses. * * @param manager Entry point to OracleDatabaseManager. */ public static void - listPrivateIPAddressesForVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + cloudVmClustersListPrivateIpAddresses(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.cloudVmClusters() .listPrivateIpAddressesWithResponse("rg000", "cluster1", new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListSamples.java deleted file mode 100644 index 65b478a59287..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for CloudVmClusters List. - */ -public final class CloudVmClustersListSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listBySubscription. - * json - */ - /** - * Sample code: List VM Clusters by subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listVMClustersBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.cloudVmClusters().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersRemoveVmsSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersRemoveVmsSamples.java index bd70c22a721a..bf352ada78a5 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersRemoveVmsSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersRemoveVmsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -12,15 +12,15 @@ */ public final class CloudVmClustersRemoveVmsSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_removeVms.json + * x-ms-original-file: 2025-03-01/vmClusters_removeVms.json */ /** - * Sample code: Remove VMs from VM Cluster. + * Sample code: CloudVmClusters_removeVms. * * @param manager Entry point to OracleDatabaseManager. */ - public static void removeVMsFromVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void + cloudVmClustersRemoveVms(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.cloudVmClusters() .removeVms("rg000", "cluster1", new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa")), com.azure.core.util.Context.NONE); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersUpdateSamples.java deleted file mode 100644 index 7e14997e8ba8..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.models.CloudVmCluster; - -/** - * Samples for CloudVmClusters Update. - */ -public final class CloudVmClustersUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_patch.json - */ - /** - * Sample code: Patch VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void patchVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - CloudVmCluster resource = manager.cloudVmClusters() - .getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().apply(); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionSamples.java index f6e6ffdd0e94..06e67b7f72d6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -12,8 +12,7 @@ */ public final class DbNodesActionSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + * x-ms-original-file: 2025-03-01/dbNodes_action.json */ /** * Sample code: DbNodes_Action. @@ -25,20 +24,4 @@ public static void dbNodesAction(com.azure.resourcemanager.oracledatabase.Oracle .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json - */ - /** - * Sample code: VM actions on DbNodes of VM Cluster. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - vmActionsOnDbNodesOfVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes() - .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), - com.azure.core.util.Context.NONE); - } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesGetSamples.java deleted file mode 100644 index cab5c6a8e193..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for DbNodes Get. - */ -public final class DbNodesGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json - */ - /** - * Sample code: Get DbNode. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getDbNode(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbNodes().getWithResponse("rg000", "cluster1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterSamples.java index b5662ed427c4..0341a9569218 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,15 +9,15 @@ */ public final class DbNodesListByCloudVmClusterSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_listByParent.json + * x-ms-original-file: 2025-03-01/dbNodes_listByParent.json */ /** - * Sample code: List DbNodes by VM Cluster. + * Sample code: DbNodes_listByCloudVmCluster. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listDbNodesByVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void + dbNodesListByCloudVmCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.dbNodes().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersGetSamples.java deleted file mode 100644 index a4f490da1b22..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for DbServers Get. - */ -public final class DbServersGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json - */ - /** - * Sample code: Get DbServer by parent. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getDbServerByParent(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbServers().getWithResponse("rg000", "infra1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureSamples.java index 73d9a6ac206f..b20e9c919986 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,16 +9,15 @@ */ public final class DbServersListByCloudExadataInfrastructureSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_listByParent.json + * x-ms-original-file: 2025-03-01/dbServers_listByParent.json */ /** - * Sample code: List DbServers by Exadata Infrastructure. + * Sample code: DbServers_listByCloudExadataInfrastructure. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - listDbServersByExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void dbServersListByCloudExadataInfrastructure( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesGetSamples.java deleted file mode 100644 index 0c0e72de6685..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for DbSystemShapes Get. - */ -public final class DbSystemShapesGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json - */ - /** - * Sample code: Get a DbSystemShape by name. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getADbSystemShapeByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().getWithResponse("eastus", "EXADATA.X9M", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationSamples.java index 437d1d87c7e0..7d9a819e4c20 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,17 +9,15 @@ */ public final class DbSystemShapesListByLocationSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_listByLocation. - * json + * x-ms-original-file: 2025-03-01/dbSystemShapes_listByLocation.json */ /** - * Sample code: List DbSystemShapes by location. + * Sample code: DbSystemShapes_listByLocation. * * @param manager Entry point to OracleDatabaseManager. */ public static void - listDbSystemShapesByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().listByLocation("eastus", com.azure.core.util.Context.NONE); + dbSystemShapesListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.dbSystemShapes().listByLocation("eastus", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsGetSamples.java deleted file mode 100644 index 964d314a074f..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for DnsPrivateViews Get. - */ -public final class DnsPrivateViewsGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json - */ - /** - * Sample code: Get a DnsPrivateView by name. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getADnsPrivateViewByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dnsPrivateViews().getWithResponse("eastus", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsListByLocationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsListByLocationSamples.java deleted file mode 100644 index d903c9ae9062..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsListByLocationSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for DnsPrivateViews ListByLocation. - */ -public final class DnsPrivateViewsListByLocationSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_listByLocation. - * json - */ - /** - * Sample code: List DnsPrivateViews by location. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listDnsPrivateViewsByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dnsPrivateViews().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesGetSamples.java deleted file mode 100644 index 28cd2c760bc7..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for DnsPrivateZones Get. - */ -public final class DnsPrivateZonesGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json - */ - /** - * Sample code: Get a DnsPrivateZone by name. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getADnsPrivateZoneByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dnsPrivateZones() - .getWithResponse("eastus", "example-dns-private-zone", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesListByLocationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesListByLocationSamples.java deleted file mode 100644 index 47dff99e44f5..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesListByLocationSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for DnsPrivateZones ListByLocation. - */ -public final class DnsPrivateZonesListByLocationSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_listByLocation. - * json - */ - /** - * Sample code: List DnsPrivateZones by location. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listDnsPrivateZonesByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dnsPrivateZones().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersRemoveVmsSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersRemoveVmsSamples.java new file mode 100644 index 000000000000..f21546866f2f --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersRemoveVmsSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.DbNodeDetails; +import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; +import java.util.Arrays; + +/** + * Samples for ExadbVmClusters RemoveVms. + */ +public final class ExadbVmClustersRemoveVmsSamples { + /* + * x-ms-original-file: 2025-03-01/ExadbVmClusters_RemoveVms_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_RemoveVms_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersRemoveVmsMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .removeVms("rgopenapi", "vmClusterName", new RemoveVirtualMachineFromExadbVmClusterDetails() + .withDbNodes(Arrays.asList(new DbNodeDetails().withDbNodeId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesActionSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesActionSamples.java new file mode 100644 index 000000000000..ef96321c1cb1 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesActionSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; + +/** + * Samples for ExascaleDbNodes Action. + */ +public final class ExascaleDbNodesActionSamples { + /* + * x-ms-original-file: 2025-03-01/ExascaleDbNodes_Action_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_Action_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbNodesActionMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes() + .action("rgopenapi", "vmClusterName", "dbNodeName", new DbNodeAction().withAction(DbNodeActionEnum.START), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesListByParentSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesListByParentSamples.java new file mode 100644 index 000000000000..5c83e395ea2e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesListByParentSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbNodes ListByParent. + */ +public final class ExascaleDbNodesListByParentSamples { + /* + * x-ms-original-file: 2025-03-01/ExascaleDbNodes_ListByParent_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_ListByParent_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbNodesListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes().listByParent("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsCreateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsCreateSamples.java new file mode 100644 index 000000000000..82f07833184e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsCreateSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageInputDetails; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExascaleDbStorageVaults Create. + */ +public final class ExascaleDbStorageVaultsCreateSamples { + /* + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_Create_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Create_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsCreateMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults() + .define("vmClusterName") + .withRegion("ltguhzffucaytqg") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key7827", "fakeTokenPlaceholder")) + .withProperties(new ExascaleDbStorageVaultProperties().withAdditionalFlashCacheInPercent(0) + .withDescription("dmnvnnduldfmrmkkvvsdtuvmsmruxzzpsfdydgytlckutfozephjygjetrauvbdfcwmti") + .withDisplayName( + "hbsybtelyvhpalemszcvartlhwvskrnpiveqfblvkdihoytqaotdgsgauvgivzaftfgeiwlyeqzssicwrrnlxtsmeakbcsxabjlt") + .withHighCapacityDatabaseStorageInput(new ExascaleDbStorageInputDetails().withTotalSizeInGbs(21)) + .withTimeZone( + "ltrbozwxjunncicrtzjrpqnqrcjgghohztrdlbfjrbkpenopyldwolslwgrgumjfkyovvkzcuxjujuxtjjzubvqvnhrswnbdgcbslopeofmtepbrrlymqwwszvsglmyuvlcuejshtpokirwklnwpcykhyinjmlqvxtyixlthtdishhmtipbygsayvgqzfrprgppylydlcskbmvwctxifdltippfvsxiughqbojqpqrekxsotnqsk")) + .withZones(Arrays.asList("qk")) + .create(); + } + + // Use "Map.of" if available + @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/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsDeleteSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsDeleteSamples.java new file mode 100644 index 000000000000..d239a5cf91b8 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbStorageVaults Delete. + */ +public final class ExascaleDbStorageVaultsDeleteSamples { + /* + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Delete_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsDeleteMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().delete("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsGetByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..4a97677ed45f --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbStorageVaults GetByResourceGroup. + */ +public final class ExascaleDbStorageVaultsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbStorageVaultsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListByResourceGroupSamples.java new file mode 100644 index 000000000000..3e64a448127b --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbStorageVaults ListByResourceGroup. + */ +public final class ExascaleDbStorageVaultsListByResourceGroupSamples { + /* + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsListByResourceGroupMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListSamples.java new file mode 100644 index 000000000000..fcd3f0f055f4 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbStorageVaults List. + */ +public final class ExascaleDbStorageVaultsListSamples { + /* + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_ListBySubscription_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsListBySubscriptionMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbStorageVaults().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsUpdateSamples.java new file mode 100644 index 000000000000..137ab7079a6e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsUpdateSamples.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExascaleDbStorageVaults Update. + */ +public final class ExascaleDbStorageVaultsUpdateSamples { + /* + * x-ms-original-file: 2025-03-01/ExascaleDbStorageVaults_Update_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbStorageVaults_Update_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exascaleDbStorageVaultsUpdateMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + ExascaleDbStorageVault resource = manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("key6179", "fakeTokenPlaceholder")).apply(); + } + + // Use "Map.of" if available + @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/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsGetSamples.java new file mode 100644 index 000000000000..d25f6a33b266 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for FlexComponents Get. + */ +public final class FlexComponentsGetSamples { + /* + * x-ms-original-file: 2025-03-01/FlexComponents_Get_MaximumSet_Gen.json + */ + /** + * Sample code: FlexComponents_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + flexComponentsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.flexComponents().getWithResponse("eastus", "flexComponent", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsListByParentSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsListByParentSamples.java new file mode 100644 index 000000000000..88a18b46a52b --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsListByParentSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + +/** + * Samples for FlexComponents ListByParent. + */ +public final class FlexComponentsListByParentSamples { + /* + * x-ms-original-file: 2025-03-01/FlexComponents_ListByParent_MaximumSet_Gen.json + */ + /** + * Sample code: FlexComponents_ListByParent_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + flexComponentsListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.flexComponents().listByParent("eastus", SystemShapes.EXADATA_X11M, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsGetSamples.java new file mode 100644 index 000000000000..62bef0800031 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for GiMinorVersions Get. + */ +public final class GiMinorVersionsGetSamples { + /* + * x-ms-original-file: 2025-03-01/GiMinorVersions_Get_MaximumSet_Gen.json + */ + /** + * Sample code: GiMinorVersions_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + giMinorVersionsGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giMinorVersions() + .getWithResponse("eastus", "giVersionName", "giMinorVersionName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsListByParentSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsListByParentSamples.java new file mode 100644 index 000000000000..c9b820f27632 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsListByParentSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; + +/** + * Samples for GiMinorVersions ListByParent. + */ +public final class GiMinorVersionsListByParentSamples { + /* + * x-ms-original-file: 2025-03-01/GiMinorVersions_ListByParent_MaximumSet_Gen.json + */ + /** + * Sample code: GiMinorVersions_ListByParent_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + giMinorVersionsListByParentMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giMinorVersions() + .listByParent("eastus", "giVersionName", ShapeFamily.fromString("rtfcosvtlpeeqoicsjqggtgc"), null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsGetSamples.java deleted file mode 100644 index 531713978fdc..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for GiVersions Get. - */ -public final class GiVersionsGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json - */ - /** - * Sample code: Get a GiVersion by name. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getAGiVersionByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giVersions().getWithResponse("eastus", "19.0.0.0", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationSamples.java index 4ae7c72d33e7..5e2b36ed078a 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationSamples.java @@ -1,24 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + /** * Samples for GiVersions ListByLocation. */ public final class GiVersionsListByLocationSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_listByLocation.json + * x-ms-original-file: 2025-03-01/GiVersions_ListByLocation_MaximumSet_Gen.json + */ + /** + * Sample code: List GiVersions by location - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listGiVersionsByLocationGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions() + .listByLocation("eastus", SystemShapes.fromString( + "osixsklyaauhoqnkxvnvsqeqenhzogntqnpubldrrfvqncwetdtwqwjjcvspwhgecbimdlulwcubikebrdzmidrucgtsuqvytkqutmbyrvvyioxpocpmuwiivyanjzucaegihztluuvpznzaoakfsselumhhsvrtrbzwpjhcihsvyouonlxdluwhqfxoqvgthkaxppbydtqjntscgzbivfdcaobbkthrbdjwpejirqmbly"), + null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2025-03-01/GiVersions_ListByLocation_MinimumSet_Gen.json */ /** - * Sample code: List GiVersions by location. + * Sample code: List GiVersions by location - generated by [MinimumSet] rule. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - listGiVersionsByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.giVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + public static void listGiVersionsByLocationGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().listByLocation("eastus", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListSamples.java index 6e17d3a0099d..4f0490985f54 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,15 +9,14 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/operations_list.json + * x-ms-original-file: 2025-03-01/operations_list.json */ /** - * Sample code: List Operations. + * Sample code: Operations_list. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listOperations(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void operationsList(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsAddAzureSubscriptionsSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsAddAzureSubscriptionsSamples.java new file mode 100644 index 000000000000..7ed4330a6114 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsAddAzureSubscriptionsSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions; +import java.util.Arrays; + +/** + * Samples for OracleSubscriptions AddAzureSubscriptions. + */ +public final class OracleSubscriptionsAddAzureSubscriptionsSamples { + /* + * x-ms-original-file: 2025-03-01/oracleSubscriptions_addAzureSubscriptions.json + */ + /** + * Sample code: OracleSubscriptions_addAzureSubscriptions. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void oracleSubscriptionsAddAzureSubscriptions( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.oracleSubscriptions() + .addAzureSubscriptions(new AzureSubscriptions().withAzureSubscriptionIds( + Arrays.asList("00000000-0000-0000-0000-000000000001")), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsCreateOrUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsCreateOrUpdateSamples.java deleted file mode 100644 index 3725152c6459..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.fluent.models.OracleSubscriptionInner; -import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionProperties; -import com.azure.resourcemanager.oracledatabase.models.Plan; - -/** - * Samples for OracleSubscriptions CreateOrUpdate. - */ -public final class OracleSubscriptionsCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_create.json - */ - /** - * Sample code: Create or Update Oracle Subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createOrUpdateOracleSubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions() - .createOrUpdate(new OracleSubscriptionInner().withProperties(new OracleSubscriptionProperties()) - .withPlan(new Plan().withName("plan1") - .withPublisher("publisher1") - .withProduct("product1") - .withPromotionCode("fakeTokenPlaceholder") - .withVersion("alpha")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsDeleteSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsDeleteSamples.java deleted file mode 100644 index 588c82efdac5..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for OracleSubscriptions Delete. - */ -public final class OracleSubscriptionsDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_delete.json - */ - /** - * Sample code: Delete Oracle Subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - deleteOracleSubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().delete(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsGetSamples.java deleted file mode 100644 index 3340f16d7cc7..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsGetSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for OracleSubscriptions Get. - */ -public final class OracleSubscriptionsGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_get.json - */ - /** - * Sample code: Get Oracle Subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getOracleSubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().getWithResponse(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksSamples.java index a11fdd259914..44f786e57e87 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,16 +9,15 @@ */ public final class OracleSubscriptionsListActivationLinksSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * oracleSubscriptions_listActivationLinks.json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_listActivationLinks.json */ /** - * Sample code: List Activation Links for the Oracle Subscription. + * Sample code: OracleSubscriptions_listActivationLinks. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listActivationLinksForTheOracleSubscription( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void + oracleSubscriptionsListActivationLinks(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsSamples.java index 74944657b776..2f5985c82a81 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,15 +9,14 @@ */ public final class OracleSubscriptionsListCloudAccountDetailsSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * oracleSubscriptions_listCloudAccountDetails.json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_listCloudAccountDetails.json */ /** - * Sample code: List Cloud Account details for the Oracle Subscription. + * Sample code: OracleSubscriptions_listCloudAccountDetails. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listCloudAccountDetailsForTheOracleSubscription( + public static void oracleSubscriptionsListCloudAccountDetails( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsSamples.java index 1c2310716eca..63896db9aba9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,15 +9,14 @@ */ public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * oracleSubscriptions_listSaasSubscriptionDetails.json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_listSaasSubscriptionDetails.json */ /** - * Sample code: List Saas Subscription details for the Oracle Subscription. + * Sample code: OracleSubscriptions_listSaasSubscriptionDetails. * * @param manager Entry point to OracleDatabaseManager. */ - public static void listSaasSubscriptionDetailsForTheOracleSubscription( + public static void oracleSubscriptionsListSaasSubscriptionDetails( com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSamples.java deleted file mode 100644 index 3257644d9ecd..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for OracleSubscriptions List. - */ -public final class OracleSubscriptionsListSamples { - /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * oracleSubscriptions_listBySubscription.json - */ - /** - * Sample code: List Oracle Subscriptions by subscription. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - listOracleSubscriptionsBySubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.oracleSubscriptions().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsUpdateSamples.java index b25a14737c1d..4ae022c5c9da 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsUpdateSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -11,15 +11,15 @@ */ public final class OracleSubscriptionsUpdateSamples { /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_patch.json + * x-ms-original-file: 2025-03-01/oracleSubscriptions_patch.json */ /** - * Sample code: Patch Oracle Subscription. + * Sample code: OracleSubscriptions_update. * * @param manager Entry point to OracleDatabaseManager. */ - public static void patchOracleSubscription(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void + oracleSubscriptionsUpdate(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsGetSamples.java deleted file mode 100644 index 6b76df6ff46d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsGetSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for SystemVersions Get. - */ -public final class SystemVersionsGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json - */ - /** - * Sample code: systemVersions_listSystemVersions. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - systemVersionsListSystemVersions(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.systemVersions().getWithResponse("eastus", "22.x", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json - */ - /** - * Sample code: Get Exadata System Version. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void getExadataSystemVersion(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.systemVersions().getWithResponse("eastus", "22.x", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsListByLocationSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsListByLocationSamples.java deleted file mode 100644 index bb8546bf9f16..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsListByLocationSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for SystemVersions ListByLocation. - */ -public final class SystemVersionsListByLocationSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation. - * json - */ - /** - * Sample code: List Exadata System Versions by the provided filter. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void listExadataSystemVersionsByTheProvidedFilter( - com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.systemVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation. - * json - */ - /** - * Sample code: systemVersions_listByLocation. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - systemVersionsListByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.systemVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesCreateOrUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesCreateOrUpdateSamples.java deleted file mode 100644 index 122dfe5bbc1e..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesCreateOrUpdateSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProperties; - -/** - * Samples for VirtualNetworkAddresses CreateOrUpdate. - */ -public final class VirtualNetworkAddressesCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_create. - * json - */ - /** - * Sample code: Create Virtual Network Address. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - createVirtualNetworkAddress(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.virtualNetworkAddresses() - .define("hostname1") - .withExistingCloudVmCluster("rg000", "cluster1") - .withProperties( - new VirtualNetworkAddressProperties().withIpAddress("192.168.0.1").withVmOcid("ocid1..aaaa")) - .create(); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesDeleteSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesDeleteSamples.java deleted file mode 100644 index d70247485ec5..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for VirtualNetworkAddresses Delete. - */ -public final class VirtualNetworkAddressesDeleteSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_delete. - * json - */ - /** - * Sample code: Delete Virtual Network Address. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - deleteVirtualNetworkAddress(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.virtualNetworkAddresses().delete("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesGetSamples.java deleted file mode 100644 index 63040040f64d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -/** - * Samples for VirtualNetworkAddresses Get. - */ -public final class VirtualNetworkAddressesGetSamples { - /* - * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json - */ - /** - * Sample code: Get Virtual Network Address. - * - * @param manager Entry point to OracleDatabaseManager. - */ - public static void - getVirtualNetworkAddress(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.virtualNetworkAddresses() - .getWithResponse("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java index 4de7f7977cbc..c1a25c3d00e4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; @@ -9,16 +9,15 @@ */ public final class VirtualNetworkAddressesListByCloudVmClusterSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ - * virtualNetworkAddresses_listByParent.json + * x-ms-original-file: 2025-03-01/virtualNetworkAddresses_listByParent.json */ /** - * Sample code: List Virtual Network Addresses by VM Cluster. + * Sample code: VirtualNetworkAddresses_listByCloudVmCluster. * * @param manager Entry point to OracleDatabaseManager. */ - public static void - listVirtualNetworkAddressesByVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + public static void virtualNetworkAddressesListByCloudVmCluster( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.virtualNetworkAddresses().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ActivationLinksInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ActivationLinksInnerTests.java deleted file mode 100644 index 9309e03b797c..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ActivationLinksInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.ActivationLinksInner; - -public final class ActivationLinksInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ActivationLinksInner model = BinaryData.fromString( - "{\"newCloudAccountActivationLink\":\"ynkedyatrwyhqmib\",\"existingCloudAccountActivationLink\":\"hwit\"}") - .toObject(ActivationLinksInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AddRemoveDbNodeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AddRemoveDbNodeTests.java deleted file mode 100644 index 061d912983ef..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AddRemoveDbNodeTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AddRemoveDbNode; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AddRemoveDbNodeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddRemoveDbNode model = BinaryData.fromString("{\"dbServers\":[\"t\"]}").toObject(AddRemoveDbNode.class); - Assertions.assertEquals("t", model.dbServers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddRemoveDbNode model = new AddRemoveDbNode().withDbServers(Arrays.asList("t")); - model = BinaryData.fromObject(model).toObject(AddRemoveDbNode.class); - Assertions.assertEquals("t", model.dbServers().get(0)); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AllConnectionStringTypeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AllConnectionStringTypeTests.java deleted file mode 100644 index a184912a4c10..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AllConnectionStringTypeTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AllConnectionStringType; -import org.junit.jupiter.api.Assertions; - -public final class AllConnectionStringTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllConnectionStringType model - = BinaryData.fromString("{\"high\":\"wzo\",\"low\":\"j\",\"medium\":\"elluwfziton\"}") - .toObject(AllConnectionStringType.class); - Assertions.assertEquals("wzo", model.high()); - Assertions.assertEquals("j", model.low()); - Assertions.assertEquals("elluwfziton", model.medium()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllConnectionStringType model - = new AllConnectionStringType().withHigh("wzo").withLow("j").withMedium("elluwfziton"); - model = BinaryData.fromObject(model).toObject(AllConnectionStringType.class); - Assertions.assertEquals("wzo", model.high()); - Assertions.assertEquals("j", model.low()); - Assertions.assertEquals("elluwfziton", model.medium()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ApexDetailsTypeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ApexDetailsTypeTests.java deleted file mode 100644 index 3d1df2a87a0d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ApexDetailsTypeTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.ApexDetailsType; -import org.junit.jupiter.api.Assertions; - -public final class ApexDetailsTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApexDetailsType model = BinaryData.fromString("{\"apexVersion\":\"kvnipjoxz\",\"ordsVersion\":\"chgejspodm\"}") - .toObject(ApexDetailsType.class); - Assertions.assertEquals("kvnipjoxz", model.apexVersion()); - Assertions.assertEquals("chgejspodm", model.ordsVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApexDetailsType model = new ApexDetailsType().withApexVersion("kvnipjoxz").withOrdsVersion("chgejspodm"); - model = BinaryData.fromObject(model).toObject(ApexDetailsType.class); - Assertions.assertEquals("kvnipjoxz", model.apexVersion()); - Assertions.assertEquals("chgejspodm", model.ordsVersion()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupInnerTests.java deleted file mode 100644 index 66336c1b9e06..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseBackupInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseBackupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseBackupInner model = BinaryData.fromString( - "{\"properties\":{\"autonomousDatabaseOcid\":\"ikh\",\"databaseSizeInTbs\":30.434949593844774,\"dbVersion\":\"dgqggebdu\",\"displayName\":\"g\",\"ocid\":\"qidbqfatpxllrxcy\",\"isAutomatic\":false,\"isRestorable\":true,\"lifecycleDetails\":\"uvarmywdmjsjq\",\"lifecycleState\":\"Creating\",\"retentionPeriodInDays\":1027618115,\"sizeInTbs\":36.2110541434972,\"timeAvailableTil\":\"2021-10-15T21:40:20Z\",\"timeStarted\":\"co\",\"timeEnded\":\"hp\",\"backupType\":\"Full\",\"provisioningState\":\"Provisioning\"},\"id\":\"areqna\",\"name\":\"xqugjhkycubedd\",\"type\":\"ssofwqmzqa\"}") - .toObject(AutonomousDatabaseBackupInner.class); - Assertions.assertEquals("g", model.properties().displayName()); - Assertions.assertEquals(1027618115, model.properties().retentionPeriodInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseBackupInner model = new AutonomousDatabaseBackupInner().withProperties( - new AutonomousDatabaseBackupProperties().withDisplayName("g").withRetentionPeriodInDays(1027618115)); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseBackupInner.class); - Assertions.assertEquals("g", model.properties().displayName()); - Assertions.assertEquals(1027618115, model.properties().retentionPeriodInDays()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupListResultTests.java deleted file mode 100644 index 31c709571790..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupListResultTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupListResult; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseBackupListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseBackupListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"autonomousDatabaseOcid\":\"qagvrvm\",\"databaseSizeInTbs\":2.9922182696156763,\"dbVersion\":\"ghimdblx\",\"displayName\":\"imfnjhfjx\",\"ocid\":\"szkkfoqre\",\"isAutomatic\":true,\"isRestorable\":false,\"lifecycleDetails\":\"fjawneaivxwczel\",\"lifecycleState\":\"Updating\",\"retentionPeriodInDays\":1974208739,\"sizeInTbs\":69.3987882976997,\"timeAvailableTil\":\"2021-01-23T17:50:30Z\",\"timeStarted\":\"nwabfatkldd\",\"timeEnded\":\"jhwuaanozjos\",\"backupType\":\"Full\",\"provisioningState\":\"Failed\"},\"id\":\"pjrvxagl\",\"name\":\"vimjwos\",\"type\":\"tx\"}],\"nextLink\":\"cskfcktqumiekk\"}") - .toObject(AutonomousDatabaseBackupListResult.class); - Assertions.assertEquals("imfnjhfjx", model.value().get(0).properties().displayName()); - Assertions.assertEquals(1974208739, model.value().get(0).properties().retentionPeriodInDays()); - Assertions.assertEquals("cskfcktqumiekk", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupPropertiesTests.java deleted file mode 100644 index 52d81f661c55..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseBackupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseBackupProperties model = BinaryData.fromString( - "{\"autonomousDatabaseOcid\":\"rmnjijpx\",\"databaseSizeInTbs\":5.180892672849591,\"dbVersion\":\"dfnbyxbaaabjyv\",\"displayName\":\"ffimrzrtuzqogsex\",\"ocid\":\"vfdnwnwmewzsyyce\",\"isAutomatic\":true,\"isRestorable\":false,\"lifecycleDetails\":\"judpfrxt\",\"lifecycleState\":\"Deleting\",\"retentionPeriodInDays\":729293630,\"sizeInTbs\":24.597232718966964,\"timeAvailableTil\":\"2021-02-25T22:09:17Z\",\"timeStarted\":\"qbrqubpaxhexiili\",\"timeEnded\":\"dtiirqt\",\"backupType\":\"LongTerm\",\"provisioningState\":\"Provisioning\"}") - .toObject(AutonomousDatabaseBackupProperties.class); - Assertions.assertEquals("ffimrzrtuzqogsex", model.displayName()); - Assertions.assertEquals(729293630, model.retentionPeriodInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseBackupProperties model - = new AutonomousDatabaseBackupProperties().withDisplayName("ffimrzrtuzqogsex") - .withRetentionPeriodInDays(729293630); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseBackupProperties.class); - Assertions.assertEquals("ffimrzrtuzqogsex", model.displayName()); - Assertions.assertEquals(729293630, model.retentionPeriodInDays()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupUpdatePropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupUpdatePropertiesTests.java deleted file mode 100644 index 7ce09f442606..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupUpdatePropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseBackupUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseBackupUpdateProperties model = BinaryData.fromString("{\"retentionPeriodInDays\":1201300359}") - .toObject(AutonomousDatabaseBackupUpdateProperties.class); - Assertions.assertEquals(1201300359, model.retentionPeriodInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseBackupUpdateProperties model - = new AutonomousDatabaseBackupUpdateProperties().withRetentionPeriodInDays(1201300359); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseBackupUpdateProperties.class); - Assertions.assertEquals(1201300359, model.retentionPeriodInDays()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupUpdateTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupUpdateTests.java deleted file mode 100644 index c227efc45e1d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupUpdateTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdate; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseBackupUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseBackupUpdate model - = BinaryData.fromString("{\"properties\":{\"retentionPeriodInDays\":725255215}}") - .toObject(AutonomousDatabaseBackupUpdate.class); - Assertions.assertEquals(725255215, model.properties().retentionPeriodInDays()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseBackupUpdate model = new AutonomousDatabaseBackupUpdate() - .withProperties(new AutonomousDatabaseBackupUpdateProperties().withRetentionPeriodInDays(725255215)); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseBackupUpdate.class); - Assertions.assertEquals(725255215, model.properties().retentionPeriodInDays()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsCreateOrUpdateMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsCreateOrUpdateMockTests.java deleted file mode 100644 index 8db069c91336..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackup; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AutonomousDatabaseBackupsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"autonomousDatabaseOcid\":\"nxo\",\"databaseSizeInTbs\":98.9751116632543,\"dbVersion\":\"zlwvsgmwohqfz\",\"displayName\":\"vux\",\"ocid\":\"kjsvthnwpzteko\",\"isAutomatic\":false,\"isRestorable\":true,\"lifecycleDetails\":\"attgplu\",\"lifecycleState\":\"Creating\",\"retentionPeriodInDays\":373452418,\"sizeInTbs\":22.807294205912633,\"timeAvailableTil\":\"2021-10-24T23:00:05Z\",\"timeStarted\":\"ykzcugswvxwl\",\"timeEnded\":\"qwm\",\"backupType\":\"Incremental\",\"provisioningState\":\"Succeeded\"},\"id\":\"xmcuqud\",\"name\":\"cvclxynpdk\",\"type\":\"gfabuiyjibuzphdu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AutonomousDatabaseBackup response = manager.autonomousDatabaseBackups() - .define("knidib") - .withExistingAutonomousDatabase("iypfp", "bcpzgpxtivh") - .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("owjrmzvuporqz") - .withRetentionPeriodInDays(441640337)) - .create(); - - Assertions.assertEquals("vux", response.properties().displayName()); - Assertions.assertEquals(373452418, response.properties().retentionPeriodInDays()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsGetWithResponseMockTests.java deleted file mode 100644 index 07b88732dafc..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AutonomousDatabaseBackupsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"autonomousDatabaseOcid\":\"owa\",\"databaseSizeInTbs\":9.333705435745854,\"dbVersion\":\"nlqwzdvpiwhx\",\"displayName\":\"zdtmaajquhuxylrj\",\"ocid\":\"ty\",\"isAutomatic\":true,\"isRestorable\":false,\"lifecycleDetails\":\"ospspshckf\",\"lifecycleState\":\"Failed\",\"retentionPeriodInDays\":796493990,\"sizeInTbs\":53.373425291790454,\"timeAvailableTil\":\"2021-10-11T20:55:17Z\",\"timeStarted\":\"df\",\"timeEnded\":\"yogtieyujtvczkcn\",\"backupType\":\"Full\",\"provisioningState\":\"Provisioning\"},\"id\":\"njdxvglnkvxl\",\"name\":\"paglqivbgk\",\"type\":\"vkhpzvuqdflvo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AutonomousDatabaseBackup response = manager.autonomousDatabaseBackups() - .getWithResponse("auunfprnjletlx", "mr", "ddoui", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zdtmaajquhuxylrj", response.properties().displayName()); - Assertions.assertEquals(796493990, response.properties().retentionPeriodInDays()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseMockTests.java index a1fdc71ef600..0827ed57ffe0 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackup; @@ -22,19 +22,19 @@ public final class AutonomousDatabaseBackupsListByAutonomousDatabaseMockTests { @Test public void testListByAutonomousDatabase() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"autonomousDatabaseOcid\":\"t\",\"databaseSizeInTbs\":9.306459908294428,\"dbVersion\":\"lbyvictctbrxkjzw\",\"displayName\":\"xff\",\"ocid\":\"hkwfbkgozxwop\",\"isAutomatic\":false,\"isRestorable\":false,\"lifecycleDetails\":\"zqaclna\",\"lifecycleState\":\"Updating\",\"retentionPeriodInDays\":357864069,\"sizeInTbs\":21.508443835195067,\"timeAvailableTil\":\"2021-03-20T14:50:38Z\",\"timeStarted\":\"nfsm\",\"timeEnded\":\"ttuxuuyilflqoiqu\",\"backupType\":\"LongTerm\",\"provisioningState\":\"Failed\"},\"id\":\"njhvsujztc\",\"name\":\"ytqj\",\"type\":\"w\"}]}"; + = "{\"value\":[{\"properties\":{\"autonomousDatabaseOcid\":\"tu\",\"databaseSizeInTbs\":25.005421930354444,\"dbVersion\":\"kwr\",\"displayName\":\"nkqbhsyrq\",\"ocid\":\"jqhden\",\"isAutomatic\":false,\"isRestorable\":false,\"lifecycleDetails\":\"akdkifmjnnawtqab\",\"lifecycleState\":\"Updating\",\"retentionPeriodInDays\":338982677,\"sizeInTbs\":40.92865413253386,\"timeAvailableTil\":\"2021-05-03T21:10:06Z\",\"timeStarted\":\"eyirdhlisngw\",\"timeEnded\":\"qqmpizruwnpqx\",\"backupType\":\"Incremental\",\"provisioningState\":\"Failed\"},\"id\":\"ngjsaasi\",\"name\":\"xtmkzjvkviir\",\"type\":\"gfgrwsdp\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.autonomousDatabaseBackups() - .listByAutonomousDatabase("tmkzjvkviirhgfgr", "sdp", com.azure.core.util.Context.NONE); + .listByAutonomousDatabase("tlmj", "yuojqtobaxk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xff", response.iterator().next().properties().displayName()); - Assertions.assertEquals(357864069, response.iterator().next().properties().retentionPeriodInDays()); + Assertions.assertEquals("nkqbhsyrq", response.iterator().next().properties().displayName()); + Assertions.assertEquals(338982677, response.iterator().next().properties().retentionPeriodInDays()); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetInnerTests.java deleted file mode 100644 index b509a6e4b25f..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseCharacterSetInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSetProperties; - -public final class AutonomousDatabaseCharacterSetInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseCharacterSetInner model = BinaryData.fromString( - "{\"properties\":{\"characterSet\":\"ujidsuyono\"},\"id\":\"laocqxtccmg\",\"name\":\"udxytlmoyrx\",\"type\":\"wfudwpzntxhdzhl\"}") - .toObject(AutonomousDatabaseCharacterSetInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseCharacterSetInner model - = new AutonomousDatabaseCharacterSetInner().withProperties(new AutonomousDatabaseCharacterSetProperties()); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseCharacterSetInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetListResultTests.java deleted file mode 100644 index 3e4834be463e..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSetListResult; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseCharacterSetListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseCharacterSetListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"characterSet\":\"ebb\"},\"id\":\"m\",\"name\":\"yqupedeojnabckh\",\"type\":\"mtxpsiebtfh\"},{\"properties\":{\"characterSet\":\"sapskr\"},\"id\":\"mhjjdhtldwkyzx\",\"name\":\"utknc\",\"type\":\"scwsv\"},{\"properties\":{\"characterSet\":\"togt\"},\"id\":\"upqsx\",\"name\":\"nmic\",\"type\":\"kvceoveilovnotyf\"},{\"properties\":{\"characterSet\":\"njbkcnxdhbttkph\"},\"id\":\"pnvjtoqnermclf\",\"name\":\"lphox\",\"type\":\"scrpabgyepsbjt\"}],\"nextLink\":\"qugxywpmueefjzwf\"}") - .toObject(AutonomousDatabaseCharacterSetListResult.class); - Assertions.assertEquals("qugxywpmueefjzwf", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetPropertiesTests.java deleted file mode 100644 index 525f8fe3dad3..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSetProperties; - -public final class AutonomousDatabaseCharacterSetPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseCharacterSetProperties model = BinaryData.fromString("{\"characterSet\":\"jbhckfrlhr\"}") - .toObject(AutonomousDatabaseCharacterSetProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseCharacterSetProperties model = new AutonomousDatabaseCharacterSetProperties(); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseCharacterSetProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsListByLocationMockTests.java deleted file mode 100644 index e80053947a89..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsListByLocationMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSet; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AutonomousDatabaseCharacterSetsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"characterSet\":\"cwwyyur\"},\"id\":\"chpp\",\"name\":\"prsnmokayzejn\",\"type\":\"lbkpb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.autonomousDatabaseCharacterSets().listByLocation("pn", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetInnerTests.java deleted file mode 100644 index 1d1e3faa560a..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseNationalCharacterSetInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSetProperties; - -public final class AutonomousDatabaseNationalCharacterSetInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseNationalCharacterSetInner model = BinaryData.fromString( - "{\"properties\":{\"characterSet\":\"vo\"},\"id\":\"vmeueci\",\"name\":\"yhz\",\"type\":\"euojgjrwju\"}") - .toObject(AutonomousDatabaseNationalCharacterSetInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseNationalCharacterSetInner model = new AutonomousDatabaseNationalCharacterSetInner() - .withProperties(new AutonomousDatabaseNationalCharacterSetProperties()); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseNationalCharacterSetInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetListResultTests.java deleted file mode 100644 index 794f05a1e574..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSetListResult; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseNationalCharacterSetListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseNationalCharacterSetListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"characterSet\":\"yvpycanuzbpzk\"},\"id\":\"kuwbcrnwb\",\"name\":\"ehhseyvjusrts\",\"type\":\"hspkdeemao\"},{\"properties\":{\"characterSet\":\"ag\"},\"id\":\"t\",\"name\":\"elmqk\",\"type\":\"hahvljuahaq\"},{\"properties\":{\"characterSet\":\"dhmdua\"},\"id\":\"exq\",\"name\":\"vfadmws\",\"type\":\"crgvxpvgom\"},{\"properties\":{\"characterSet\":\"misgwbnb\"},\"id\":\"ldawkzbaliourqha\",\"name\":\"auhashsfwx\",\"type\":\"sowzxcugi\"}],\"nextLink\":\"ooxdjebwpuc\"}") - .toObject(AutonomousDatabaseNationalCharacterSetListResult.class); - Assertions.assertEquals("ooxdjebwpuc", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetPropertiesTests.java deleted file mode 100644 index 5dd8c39b9327..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSetProperties; - -public final class AutonomousDatabaseNationalCharacterSetPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseNationalCharacterSetProperties model - = BinaryData.fromString("{\"characterSet\":\"otwmcdyt\"}") - .toObject(AutonomousDatabaseNationalCharacterSetProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseNationalCharacterSetProperties model = new AutonomousDatabaseNationalCharacterSetProperties(); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseNationalCharacterSetProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsListByLocationMockTests.java deleted file mode 100644 index 4a412e1fddd4..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsListByLocationMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSet; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AutonomousDatabaseNationalCharacterSetsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"characterSet\":\"wogqqnobpudcdab\"},\"id\":\"wpwyawbz\",\"name\":\"sqbuc\",\"type\":\"jg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.autonomousDatabaseNationalCharacterSets() - .listByLocation("kmfx", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseStandbySummaryTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseStandbySummaryTests.java deleted file mode 100644 index 31ef01b49a4e..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseStandbySummaryTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseLifecycleState; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseStandbySummary; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseStandbySummaryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseStandbySummary model = BinaryData.fromString( - "{\"lagTimeInSeconds\":355535904,\"lifecycleState\":\"Inaccessible\",\"lifecycleDetails\":\"vd\",\"timeDataGuardRoleChanged\":\"jgrtfwvukxga\",\"timeDisasterRecoveryRoleChanged\":\"ccsnhsjc\"}") - .toObject(AutonomousDatabaseStandbySummary.class); - Assertions.assertEquals(355535904, model.lagTimeInSeconds()); - Assertions.assertEquals(AutonomousDatabaseLifecycleState.INACCESSIBLE, model.lifecycleState()); - Assertions.assertEquals("vd", model.lifecycleDetails()); - Assertions.assertEquals("jgrtfwvukxga", model.timeDataGuardRoleChanged()); - Assertions.assertEquals("ccsnhsjc", model.timeDisasterRecoveryRoleChanged()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDatabaseStandbySummary model = new AutonomousDatabaseStandbySummary().withLagTimeInSeconds(355535904) - .withLifecycleState(AutonomousDatabaseLifecycleState.INACCESSIBLE) - .withLifecycleDetails("vd") - .withTimeDataGuardRoleChanged("jgrtfwvukxga") - .withTimeDisasterRecoveryRoleChanged("ccsnhsjc"); - model = BinaryData.fromObject(model).toObject(AutonomousDatabaseStandbySummary.class); - Assertions.assertEquals(355535904, model.lagTimeInSeconds()); - Assertions.assertEquals(AutonomousDatabaseLifecycleState.INACCESSIBLE, model.lifecycleState()); - Assertions.assertEquals("vd", model.lifecycleDetails()); - Assertions.assertEquals("jgrtfwvukxga", model.timeDataGuardRoleChanged()); - Assertions.assertEquals("ccsnhsjc", model.timeDisasterRecoveryRoleChanged()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsGetWithResponseMockTests.java deleted file mode 100644 index 3577c220319d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDbVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AutonomousDatabaseVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"version\":\"zid\",\"dbWorkload\":\"APEX\",\"isDefaultForFree\":true,\"isDefaultForPaid\":false,\"isFreeTierEnabled\":false,\"isPaidEnabled\":true},\"id\":\"gznmmaxrizkzob\",\"name\":\"opxlhslnelxieixy\",\"type\":\"llxecwc\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AutonomousDbVersion response = manager.autonomousDatabaseVersions() - .getWithResponse("abpfhvfs", "kvntjlrigjkskyri", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsListByLocationMockTests.java deleted file mode 100644 index 5151bed117ea..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseVersionsListByLocationMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDbVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AutonomousDatabaseVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"fusfzsvtuikzhajq\",\"dbWorkload\":\"AJD\",\"isDefaultForFree\":false,\"isDefaultForPaid\":false,\"isFreeTierEnabled\":false,\"isPaidEnabled\":false},\"id\":\"y\",\"name\":\"qnzrd\",\"type\":\"sovwxznptgoeiyb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.autonomousDatabaseVersions().listByLocation("jw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseWalletFileInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseWalletFileInnerTests.java deleted file mode 100644 index 4ebc065b70ee..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseWalletFileInnerTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseWalletFileInner; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDatabaseWalletFileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDatabaseWalletFileInner model - = BinaryData.fromString("{\"walletFiles\":\"uqlcvydy\"}").toObject(AutonomousDatabaseWalletFileInner.class); - Assertions.assertEquals("uqlcvydy", model.walletFiles()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionInnerTests.java deleted file mode 100644 index 41c20e94a73a..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDbVersionInner; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDbVersionProperties; - -public final class AutonomousDbVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDbVersionInner model = BinaryData.fromString( - "{\"properties\":{\"version\":\"uwprzql\",\"dbWorkload\":\"AJD\",\"isDefaultForFree\":false,\"isDefaultForPaid\":true,\"isFreeTierEnabled\":false,\"isPaidEnabled\":true},\"id\":\"xobbcswsrt\",\"name\":\"riplrbpbewtg\",\"type\":\"fgb\"}") - .toObject(AutonomousDbVersionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDbVersionInner model - = new AutonomousDbVersionInner().withProperties(new AutonomousDbVersionProperties()); - model = BinaryData.fromObject(model).toObject(AutonomousDbVersionInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionListResultTests.java deleted file mode 100644 index 758f1fd00a31..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDbVersionListResult; -import org.junit.jupiter.api.Assertions; - -public final class AutonomousDbVersionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDbVersionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"version\":\"txnrjaw\",\"dbWorkload\":\"DW\",\"isDefaultForFree\":true,\"isDefaultForPaid\":false,\"isFreeTierEnabled\":false,\"isPaidEnabled\":false},\"id\":\"bkpyc\",\"name\":\"klwndnhjdauwhv\",\"type\":\"l\"}],\"nextLink\":\"btdhxujznbm\"}") - .toObject(AutonomousDbVersionListResult.class); - Assertions.assertEquals("btdhxujznbm", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionPropertiesTests.java deleted file mode 100644 index ee208aa645c6..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDbVersionPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDbVersionProperties; - -public final class AutonomousDbVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutonomousDbVersionProperties model = BinaryData.fromString( - "{\"version\":\"gw\",\"dbWorkload\":\"AJD\",\"isDefaultForFree\":false,\"isDefaultForPaid\":true,\"isFreeTierEnabled\":false,\"isPaidEnabled\":true}") - .toObject(AutonomousDbVersionProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutonomousDbVersionProperties model = new AutonomousDbVersionProperties(); - model = BinaryData.fromObject(model).toObject(AutonomousDbVersionProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudAccountDetailsInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudAccountDetailsInnerTests.java deleted file mode 100644 index 5ea00d611794..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudAccountDetailsInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.CloudAccountDetailsInner; - -public final class CloudAccountDetailsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudAccountDetailsInner model - = BinaryData.fromString("{\"cloudAccountName\":\"ypyynpcdpumnzg\",\"cloudAccountHomeRegion\":\"z\"}") - .toObject(CloudAccountDetailsInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureInnerTests.java deleted file mode 100644 index f707ca1c3807..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureInnerTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.CloudExadataInfrastructureInner; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureProperties; -import com.azure.resourcemanager.oracledatabase.models.CustomerContact; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow; -import com.azure.resourcemanager.oracledatabase.models.Month; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CloudExadataInfrastructureInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudExadataInfrastructureInner model = BinaryData.fromString( - "{\"properties\":{\"ocid\":\"oaeupfhyhltrpmo\",\"computeCount\":1593902435,\"storageCount\":1490971149,\"totalStorageSizeInGbs\":557848148,\"availableStorageSizeInGbs\":860799201,\"timeCreated\":\"thfuiuaodsfcpkvx\",\"lifecycleDetails\":\"puozmyzydag\",\"maintenanceWindow\":{\"preference\":\"CustomPreference\",\"months\":[{\"name\":\"September\"},{\"name\":\"June\"},{\"name\":\"July\"},{\"name\":\"May\"}],\"weeksOfMonth\":[962649448,1285068717,1627689194],\"daysOfWeek\":[{\"name\":\"Friday\"},{\"name\":\"Sunday\"},{\"name\":\"Friday\"}],\"hoursOfDay\":[2101673805,180468800,512563876,436585772],\"leadTimeInWeeks\":1170430043,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":760240945,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":true},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":1027022233,\"estimatedNetworkSwitchesPatchingTime\":1162722818,\"estimatedStorageServerPatchingTime\":1075133602,\"totalEstimatedPatchingTime\":1510965337},\"customerContacts\":[{\"email\":\"dystkiiuxhqyud\"},{\"email\":\"o\"},{\"email\":\"rq\"},{\"email\":\"b\"}],\"provisioningState\":\"Failed\",\"lifecycleState\":\"MaintenanceInProgress\",\"shape\":\"yifqrvkdvjsllrmv\",\"ociUrl\":\"f\",\"cpuCount\":122021588,\"maxCpuCount\":1825333220,\"memorySizeInGbs\":500448783,\"maxMemoryInGbs\":608072417,\"dbNodeStorageSizeInGbs\":1948903121,\"maxDbNodeStorageSizeInGbs\":825397815,\"dataStorageSizeInTbs\":99.91485616589475,\"maxDataStorageInTbs\":80.49183536969151,\"dbServerVersion\":\"iqzbq\",\"storageServerVersion\":\"sovmyokacspkwl\",\"activatedStorageCount\":1196709774,\"additionalStorageCount\":1687920757,\"displayName\":\"pxjmflbvvnchr\",\"lastMaintenanceRunId\":\"ciwwzjuqkhr\",\"nextMaintenanceRunId\":\"jiwkuofoskghsau\",\"monthlyDbServerVersion\":\"mjmvxieduugidyjr\",\"monthlyStorageServerVersion\":\"byao\"},\"zones\":[\"e\"],\"location\":\"sonpclhocohs\",\"tags\":{\"ffeii\":\"vleggzfbuhfmvfax\"},\"id\":\"hl\",\"name\":\"m\",\"type\":\"zy\"}") - .toObject(CloudExadataInfrastructureInner.class); - Assertions.assertEquals("sonpclhocohs", model.location()); - Assertions.assertEquals("vleggzfbuhfmvfax", model.tags().get("ffeii")); - Assertions.assertEquals(1593902435, model.properties().computeCount()); - Assertions.assertEquals(1490971149, model.properties().storageCount()); - Assertions.assertEquals(Preference.CUSTOM_PREFERENCE, model.properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.SEPTEMBER, model.properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(962649448, model.properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.FRIDAY, - model.properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(2101673805, model.properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(1170430043, model.properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, model.properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(760240945, model.properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, model.properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(true, model.properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("dystkiiuxhqyud", model.properties().customerContacts().get(0).email()); - Assertions.assertEquals("yifqrvkdvjsllrmv", model.properties().shape()); - Assertions.assertEquals("pxjmflbvvnchr", model.properties().displayName()); - Assertions.assertEquals("e", model.zones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudExadataInfrastructureInner model = new CloudExadataInfrastructureInner().withLocation("sonpclhocohs") - .withTags(mapOf("ffeii", "vleggzfbuhfmvfax")) - .withProperties(new CloudExadataInfrastructureProperties().withComputeCount(1593902435) - .withStorageCount(1490971149) - .withMaintenanceWindow(new MaintenanceWindow().withPreference(Preference.CUSTOM_PREFERENCE) - .withMonths( - Arrays.asList(new Month().withName(MonthName.SEPTEMBER), new Month().withName(MonthName.JUNE), - new Month().withName(MonthName.JULY), new Month().withName(MonthName.MAY))) - .withWeeksOfMonth(Arrays.asList(962649448, 1285068717, 1627689194)) - .withDaysOfWeek(Arrays.asList(new DayOfWeek().withName(DayOfWeekName.FRIDAY), - new DayOfWeek().withName(DayOfWeekName.SUNDAY), new DayOfWeek().withName(DayOfWeekName.FRIDAY))) - .withHoursOfDay(Arrays.asList(2101673805, 180468800, 512563876, 436585772)) - .withLeadTimeInWeeks(1170430043) - .withPatchingMode(PatchingMode.NON_ROLLING) - .withCustomActionTimeoutInMins(760240945) - .withIsCustomActionTimeoutEnabled(true) - .withIsMonthlyPatchingEnabled(true)) - .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail("dystkiiuxhqyud"), - new CustomerContact().withEmail("o"), new CustomerContact().withEmail("rq"), - new CustomerContact().withEmail("b"))) - .withShape("yifqrvkdvjsllrmv") - .withDisplayName("pxjmflbvvnchr")) - .withZones(Arrays.asList("e")); - model = BinaryData.fromObject(model).toObject(CloudExadataInfrastructureInner.class); - Assertions.assertEquals("sonpclhocohs", model.location()); - Assertions.assertEquals("vleggzfbuhfmvfax", model.tags().get("ffeii")); - Assertions.assertEquals(1593902435, model.properties().computeCount()); - Assertions.assertEquals(1490971149, model.properties().storageCount()); - Assertions.assertEquals(Preference.CUSTOM_PREFERENCE, model.properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.SEPTEMBER, model.properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(962649448, model.properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.FRIDAY, - model.properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(2101673805, model.properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(1170430043, model.properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, model.properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(760240945, model.properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, model.properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(true, model.properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("dystkiiuxhqyud", model.properties().customerContacts().get(0).email()); - Assertions.assertEquals("yifqrvkdvjsllrmv", model.properties().shape()); - Assertions.assertEquals("pxjmflbvvnchr", model.properties().displayName()); - Assertions.assertEquals("e", model.zones().get(0)); - } - - // Use "Map.of" if available - @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/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureListResultTests.java deleted file mode 100644 index 0e16a385108d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureListResultTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureListResult; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import org.junit.jupiter.api.Assertions; - -public final class CloudExadataInfrastructureListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudExadataInfrastructureListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ocid\":\"vtz\",\"computeCount\":1277339929,\"storageCount\":77118274,\"totalStorageSizeInGbs\":1861825815,\"availableStorageSizeInGbs\":698311711,\"timeCreated\":\"xqeofjaeqjhqjba\",\"lifecycleDetails\":\"msmjqulngsntn\",\"maintenanceWindow\":{\"preference\":\"CustomPreference\",\"months\":[{\"name\":\"September\"}],\"weeksOfMonth\":[2115498043,306155012,1161449621],\"daysOfWeek\":[{\"name\":\"Tuesday\"},{\"name\":\"Tuesday\"},{\"name\":\"Sunday\"},{\"name\":\"Monday\"}],\"hoursOfDay\":[947497777,890604952,3133273],\"leadTimeInWeeks\":1214814852,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":422670277,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":1343054120,\"estimatedNetworkSwitchesPatchingTime\":1034535063,\"estimatedStorageServerPatchingTime\":2077137838,\"totalEstimatedPatchingTime\":1299495603},\"customerContacts\":[{\"email\":\"ksqrglssai\"},{\"email\":\"qpjwnzlljfm\"}],\"provisioningState\":\"Canceled\",\"lifecycleState\":\"Terminated\",\"shape\":\"vmgxsab\",\"ociUrl\":\"qduujitcjczdz\",\"cpuCount\":1471497811,\"maxCpuCount\":700767866,\"memorySizeInGbs\":2049933545,\"maxMemoryInGbs\":1632911740,\"dbNodeStorageSizeInGbs\":881924894,\"maxDbNodeStorageSizeInGbs\":176871010,\"dataStorageSizeInTbs\":43.592224361707366,\"maxDataStorageInTbs\":55.89189866671263,\"dbServerVersion\":\"rwjfe\",\"storageServerVersion\":\"nhutjeltmrldhugj\",\"activatedStorageCount\":1346954674,\"additionalStorageCount\":797371044,\"displayName\":\"qxhocdgeablgphut\",\"lastMaintenanceRunId\":\"ndv\",\"nextMaintenanceRunId\":\"ozwyiftyhxhuro\",\"monthlyDbServerVersion\":\"tyxolniwpwc\",\"monthlyStorageServerVersion\":\"jfkgiawxk\"},\"zones\":[\"ypl\",\"ckbasyypndd\",\"sgcbac\",\"hejkotynqgou\"],\"location\":\"ndlik\",\"tags\":{\"bmadgak\":\"kgfg\",\"ytb\":\"qsrxybzqqed\",\"modmglougpb\":\"iqfouflmmnkz\"},\"id\":\"wtmutduq\",\"name\":\"ta\",\"type\":\"spwgcuertumkdosv\"},{\"properties\":{\"ocid\":\"bmdg\",\"computeCount\":398280406,\"storageCount\":1089342550,\"totalStorageSizeInGbs\":763703494,\"availableStorageSizeInGbs\":1359237516,\"timeCreated\":\"bexppb\",\"lifecycleDetails\":\"q\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"October\"}],\"weeksOfMonth\":[1189352281],\"daysOfWeek\":[{\"name\":\"Wednesday\"},{\"name\":\"Wednesday\"}],\"hoursOfDay\":[1529578070,1939362977,596871405,2069230951],\"leadTimeInWeeks\":1739804762,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":243879376,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":1951867342,\"estimatedNetworkSwitchesPatchingTime\":239046622,\"estimatedStorageServerPatchingTime\":1167970761,\"totalEstimatedPatchingTime\":1846063928},\"customerContacts\":[{\"email\":\"s\"},{\"email\":\"l\"},{\"email\":\"juvf\"}],\"provisioningState\":\"Canceled\",\"lifecycleState\":\"Updating\",\"shape\":\"yxwjkcp\",\"ociUrl\":\"nwbxgjvtbvpyssz\",\"cpuCount\":1214648475,\"maxCpuCount\":308759192,\"memorySizeInGbs\":718700797,\"maxMemoryInGbs\":1493631585,\"dbNodeStorageSizeInGbs\":931696713,\"maxDbNodeStorageSizeInGbs\":2108357605,\"dataStorageSizeInTbs\":2.3996292155411103,\"maxDataStorageInTbs\":57.60858367831252,\"dbServerVersion\":\"bngui\",\"storageServerVersion\":\"wu\",\"activatedStorageCount\":1403075438,\"additionalStorageCount\":1608878856,\"displayName\":\"x\",\"lastMaintenanceRunId\":\"izuckyfihrfidfvz\",\"nextMaintenanceRunId\":\"zuhtymwisdkfthwx\",\"monthlyDbServerVersion\":\"t\",\"monthlyStorageServerVersion\":\"waopvkmijcmmxd\"},\"zones\":[\"fufsrpymzi\",\"nsez\"],\"location\":\"tbzsgfyccs\",\"tags\":{\"flnrosfqpteehzz\":\"mdwzjeiachboo\",\"swjdkirso\":\"ypyqrimzinp\",\"soifiyipjxsqw\":\"dqxhcrmnohjtckwh\",\"bznorcjxvsnby\":\"gr\"},\"id\":\"qabnmoc\",\"name\":\"cyshurzafbljjgp\",\"type\":\"toqcjmklja\"},{\"properties\":{\"ocid\":\"idtqajzyu\",\"computeCount\":331087178,\"storageCount\":377543492,\"totalStorageSizeInGbs\":963090330,\"availableStorageSizeInGbs\":1185115759,\"timeCreated\":\"hbzhfepg\",\"lifecycleDetails\":\"qex\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"September\"},{\"name\":\"November\"}],\"weeksOfMonth\":[812550328,1450066184,2010275395,1382197714],\"daysOfWeek\":[{\"name\":\"Sunday\"},{\"name\":\"Wednesday\"}],\"hoursOfDay\":[411376072,1936652093,187934940],\"leadTimeInWeeks\":269185067,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":865429737,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":1399700283,\"estimatedNetworkSwitchesPatchingTime\":515992017,\"estimatedStorageServerPatchingTime\":397818750,\"totalEstimatedPatchingTime\":54322845},\"customerContacts\":[{\"email\":\"ionpimexg\"},{\"email\":\"txgcpodgmaajr\"},{\"email\":\"vdjwzrlovm\"},{\"email\":\"lwhijcoejctbzaq\"}],\"provisioningState\":\"Failed\",\"lifecycleState\":\"Terminating\",\"shape\":\"bkbfkgukdkex\",\"ociUrl\":\"pofm\",\"cpuCount\":159547648,\"maxCpuCount\":1757077121,\"memorySizeInGbs\":396023335,\"maxMemoryInGbs\":584739156,\"dbNodeStorageSizeInGbs\":681879854,\"maxDbNodeStorageSizeInGbs\":263932996,\"dataStorageSizeInTbs\":5.0590045107127395,\"maxDataStorageInTbs\":80.35546922641568,\"dbServerVersion\":\"o\",\"storageServerVersion\":\"xhdzxibqeojnx\",\"activatedStorageCount\":2010157167,\"additionalStorageCount\":119552386,\"displayName\":\"dntwndeicbtw\",\"lastMaintenanceRunId\":\"zao\",\"nextMaintenanceRunId\":\"uhrhcffcyddgl\",\"monthlyDbServerVersion\":\"t\",\"monthlyStorageServerVersion\":\"qkwpyeicxmqc\"},\"zones\":[\"q\",\"hkh\",\"xuigdtopbobj\",\"ghmewuam\"],\"location\":\"hrzayvvtpgvdf\",\"tags\":{\"efgugnxk\":\"tkftutqxlngx\",\"hjybigehoqfbo\":\"xdqmidtthzrvqdra\",\"zlcuiywgqywgndrv\":\"skanyk\",\"ocpecfvmmco\":\"nhzgpphrcgyn\"},\"id\":\"fsxlzevgbmqjqa\",\"name\":\"c\",\"type\":\"pmivkwlzu\"},{\"properties\":{\"ocid\":\"fwnfnb\",\"computeCount\":1187016173,\"storageCount\":2055969856,\"totalStorageSizeInGbs\":198217735,\"availableStorageSizeInGbs\":1067067753,\"timeCreated\":\"etqgtzxdpnq\",\"lifecycleDetails\":\"qwxrjfeallnw\",\"maintenanceWindow\":{\"preference\":\"CustomPreference\",\"months\":[{\"name\":\"April\"},{\"name\":\"February\"}],\"weeksOfMonth\":[572259851],\"daysOfWeek\":[{\"name\":\"Sunday\"},{\"name\":\"Tuesday\"},{\"name\":\"Sunday\"}],\"hoursOfDay\":[611724458,431293436,903748281,1019249185],\"leadTimeInWeeks\":2024300309,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":804356907,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":1222004699,\"estimatedNetworkSwitchesPatchingTime\":678653750,\"estimatedStorageServerPatchingTime\":1098577091,\"totalEstimatedPatchingTime\":635672501},\"customerContacts\":[{\"email\":\"ipheoflokeyyien\"},{\"email\":\"bdlwtgrhpdjpj\"},{\"email\":\"masxazjpqyegu\"},{\"email\":\"lhbxxhejjzzvdud\"}],\"provisioningState\":\"Canceled\",\"lifecycleState\":\"Provisioning\",\"shape\":\"fhotw\",\"ociUrl\":\"ynpwlbj\",\"cpuCount\":34788734,\"maxCpuCount\":1690822953,\"memorySizeInGbs\":1625524147,\"maxMemoryInGbs\":1405360141,\"dbNodeStorageSizeInGbs\":55863349,\"maxDbNodeStorageSizeInGbs\":2035779275,\"dataStorageSizeInTbs\":77.80900806799353,\"maxDataStorageInTbs\":14.723744499152136,\"dbServerVersion\":\"pusuesn\",\"storageServerVersion\":\"dejbavo\",\"activatedStorageCount\":669466066,\"additionalStorageCount\":1432436623,\"displayName\":\"ohctbqvudwx\",\"lastMaintenanceRunId\":\"dnvowg\",\"nextMaintenanceRunId\":\"jugwdkcglhsl\",\"monthlyDbServerVersion\":\"jdyggdtji\",\"monthlyStorageServerVersion\":\"b\"},\"zones\":[\"ofqweykhmenevfye\",\"fwhybcibvy\"],\"location\":\"c\",\"tags\":{\"ectehf\":\"ynnaam\",\"eypvhezrkg\":\"qsc\",\"sle\":\"hcjrefovgmk\",\"cattpngjcrcczsq\":\"yvxyqjp\"},\"id\":\"jh\",\"name\":\"mdajv\",\"type\":\"ysou\"}],\"nextLink\":\"e\"}") - .toObject(CloudExadataInfrastructureListResult.class); - Assertions.assertEquals("ndlik", model.value().get(0).location()); - Assertions.assertEquals("kgfg", model.value().get(0).tags().get("bmadgak")); - Assertions.assertEquals(1277339929, model.value().get(0).properties().computeCount()); - Assertions.assertEquals(77118274, model.value().get(0).properties().storageCount()); - Assertions.assertEquals(Preference.CUSTOM_PREFERENCE, - model.value().get(0).properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.SEPTEMBER, - model.value().get(0).properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(2115498043, - model.value().get(0).properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.TUESDAY, - model.value().get(0).properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(947497777, model.value().get(0).properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(1214814852, model.value().get(0).properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, - model.value().get(0).properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(422670277, - model.value().get(0).properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, - model.value().get(0).properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(false, - model.value().get(0).properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("ksqrglssai", model.value().get(0).properties().customerContacts().get(0).email()); - Assertions.assertEquals("vmgxsab", model.value().get(0).properties().shape()); - Assertions.assertEquals("qxhocdgeablgphut", model.value().get(0).properties().displayName()); - Assertions.assertEquals("ypl", model.value().get(0).zones().get(0)); - Assertions.assertEquals("e", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructurePropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructurePropertiesTests.java deleted file mode 100644 index d65ceefacc40..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructurePropertiesTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureProperties; -import com.azure.resourcemanager.oracledatabase.models.CustomerContact; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow; -import com.azure.resourcemanager.oracledatabase.models.Month; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CloudExadataInfrastructurePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudExadataInfrastructureProperties model = BinaryData.fromString( - "{\"ocid\":\"hxmzsbbzoggig\",\"computeCount\":2011180934,\"storageCount\":285101547,\"totalStorageSizeInGbs\":2000842411,\"availableStorageSizeInGbs\":714524610,\"timeCreated\":\"jnspydp\",\"lifecycleDetails\":\"oenkouknvudwti\",\"maintenanceWindow\":{\"preference\":\"CustomPreference\",\"months\":[{\"name\":\"April\"},{\"name\":\"March\"},{\"name\":\"November\"}],\"weeksOfMonth\":[1997522468,655680628,523665642,198508752],\"daysOfWeek\":[{\"name\":\"Sunday\"},{\"name\":\"Sunday\"},{\"name\":\"Wednesday\"},{\"name\":\"Saturday\"}],\"hoursOfDay\":[157234884],\"leadTimeInWeeks\":642461794,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":1142457061,\"isCustomActionTimeoutEnabled\":false,\"isMonthlyPatchingEnabled\":true},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":1696472102,\"estimatedNetworkSwitchesPatchingTime\":278176639,\"estimatedStorageServerPatchingTime\":599264802,\"totalEstimatedPatchingTime\":1785806943},\"customerContacts\":[{\"email\":\"zcdrqjsdpydnfyhx\"},{\"email\":\"eoejzic\"},{\"email\":\"ifsjttgzfbishcb\"}],\"provisioningState\":\"Provisioning\",\"lifecycleState\":\"MaintenanceInProgress\",\"shape\":\"eyeam\",\"ociUrl\":\"hagalpbuxwgipwh\",\"cpuCount\":390798331,\"maxCpuCount\":1456647445,\"memorySizeInGbs\":1568542705,\"maxMemoryInGbs\":69341003,\"dbNodeStorageSizeInGbs\":248274393,\"maxDbNodeStorageSizeInGbs\":2111638773,\"dataStorageSizeInTbs\":63.584757120224076,\"maxDataStorageInTbs\":69.283939369701,\"dbServerVersion\":\"pu\",\"storageServerVersion\":\"mryw\",\"activatedStorageCount\":2134987728,\"additionalStorageCount\":1117331465,\"displayName\":\"ftiyqzrnkcq\",\"lastMaintenanceRunId\":\"xlwhzlsicoh\",\"nextMaintenanceRunId\":\"qnwvlrya\",\"monthlyDbServerVersion\":\"hheunmmqhgyx\",\"monthlyStorageServerVersion\":\"onocukok\"}") - .toObject(CloudExadataInfrastructureProperties.class); - Assertions.assertEquals(2011180934, model.computeCount()); - Assertions.assertEquals(285101547, model.storageCount()); - Assertions.assertEquals(Preference.CUSTOM_PREFERENCE, model.maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.APRIL, model.maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(1997522468, model.maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SUNDAY, model.maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(157234884, model.maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(642461794, model.maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, model.maintenanceWindow().patchingMode()); - Assertions.assertEquals(1142457061, model.maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(false, model.maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(true, model.maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("zcdrqjsdpydnfyhx", model.customerContacts().get(0).email()); - Assertions.assertEquals("eyeam", model.shape()); - Assertions.assertEquals("ftiyqzrnkcq", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudExadataInfrastructureProperties model = new CloudExadataInfrastructureProperties() - .withComputeCount(2011180934) - .withStorageCount(285101547) - .withMaintenanceWindow(new MaintenanceWindow().withPreference(Preference.CUSTOM_PREFERENCE) - .withMonths(Arrays.asList(new Month().withName(MonthName.APRIL), new Month().withName(MonthName.MARCH), - new Month().withName(MonthName.NOVEMBER))) - .withWeeksOfMonth(Arrays.asList(1997522468, 655680628, 523665642, 198508752)) - .withDaysOfWeek(Arrays.asList(new DayOfWeek().withName(DayOfWeekName.SUNDAY), - new DayOfWeek().withName(DayOfWeekName.SUNDAY), new DayOfWeek().withName(DayOfWeekName.WEDNESDAY), - new DayOfWeek().withName(DayOfWeekName.SATURDAY))) - .withHoursOfDay(Arrays.asList(157234884)) - .withLeadTimeInWeeks(642461794) - .withPatchingMode(PatchingMode.NON_ROLLING) - .withCustomActionTimeoutInMins(1142457061) - .withIsCustomActionTimeoutEnabled(false) - .withIsMonthlyPatchingEnabled(true)) - .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail("zcdrqjsdpydnfyhx"), - new CustomerContact().withEmail("eoejzic"), new CustomerContact().withEmail("ifsjttgzfbishcb"))) - .withShape("eyeam") - .withDisplayName("ftiyqzrnkcq"); - model = BinaryData.fromObject(model).toObject(CloudExadataInfrastructureProperties.class); - Assertions.assertEquals(2011180934, model.computeCount()); - Assertions.assertEquals(285101547, model.storageCount()); - Assertions.assertEquals(Preference.CUSTOM_PREFERENCE, model.maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.APRIL, model.maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(1997522468, model.maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SUNDAY, model.maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(157234884, model.maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(642461794, model.maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, model.maintenanceWindow().patchingMode()); - Assertions.assertEquals(1142457061, model.maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(false, model.maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(true, model.maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("zcdrqjsdpydnfyhx", model.customerContacts().get(0).email()); - Assertions.assertEquals("eyeam", model.shape()); - Assertions.assertEquals("ftiyqzrnkcq", model.displayName()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureUpdatePropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureUpdatePropertiesTests.java deleted file mode 100644 index f73de897443b..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureUpdatePropertiesTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdateProperties; -import com.azure.resourcemanager.oracledatabase.models.CustomerContact; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow; -import com.azure.resourcemanager.oracledatabase.models.Month; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CloudExadataInfrastructureUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudExadataInfrastructureUpdateProperties model = BinaryData.fromString( - "{\"computeCount\":2069096730,\"storageCount\":407754161,\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"July\"},{\"name\":\"May\"},{\"name\":\"January\"},{\"name\":\"March\"}],\"weeksOfMonth\":[776883338,1280631673,1924816201],\"daysOfWeek\":[{\"name\":\"Saturday\"},{\"name\":\"Tuesday\"}],\"hoursOfDay\":[1872827948],\"leadTimeInWeeks\":411799174,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":295575748,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":true},\"customerContacts\":[{\"email\":\"wsobqwcsdbn\"},{\"email\":\"dcfhucqdpf\"},{\"email\":\"vglsbjjca\"}],\"displayName\":\"xbvtvudu\"}") - .toObject(CloudExadataInfrastructureUpdateProperties.class); - Assertions.assertEquals(2069096730, model.computeCount()); - Assertions.assertEquals(407754161, model.storageCount()); - Assertions.assertEquals(Preference.NO_PREFERENCE, model.maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.JULY, model.maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(776883338, model.maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SATURDAY, model.maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(1872827948, model.maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(411799174, model.maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, model.maintenanceWindow().patchingMode()); - Assertions.assertEquals(295575748, model.maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, model.maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(true, model.maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("wsobqwcsdbn", model.customerContacts().get(0).email()); - Assertions.assertEquals("xbvtvudu", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudExadataInfrastructureUpdateProperties model - = new CloudExadataInfrastructureUpdateProperties().withComputeCount(2069096730) - .withStorageCount(407754161) - .withMaintenanceWindow(new MaintenanceWindow().withPreference(Preference.NO_PREFERENCE) - .withMonths(Arrays.asList(new Month().withName(MonthName.JULY), new Month().withName(MonthName.MAY), - new Month().withName(MonthName.JANUARY), new Month().withName(MonthName.MARCH))) - .withWeeksOfMonth(Arrays.asList(776883338, 1280631673, 1924816201)) - .withDaysOfWeek(Arrays.asList(new DayOfWeek().withName(DayOfWeekName.SATURDAY), - new DayOfWeek().withName(DayOfWeekName.TUESDAY))) - .withHoursOfDay(Arrays.asList(1872827948)) - .withLeadTimeInWeeks(411799174) - .withPatchingMode(PatchingMode.NON_ROLLING) - .withCustomActionTimeoutInMins(295575748) - .withIsCustomActionTimeoutEnabled(true) - .withIsMonthlyPatchingEnabled(true)) - .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail("wsobqwcsdbn"), - new CustomerContact().withEmail("dcfhucqdpf"), new CustomerContact().withEmail("vglsbjjca"))) - .withDisplayName("xbvtvudu"); - model = BinaryData.fromObject(model).toObject(CloudExadataInfrastructureUpdateProperties.class); - Assertions.assertEquals(2069096730, model.computeCount()); - Assertions.assertEquals(407754161, model.storageCount()); - Assertions.assertEquals(Preference.NO_PREFERENCE, model.maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.JULY, model.maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(776883338, model.maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SATURDAY, model.maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(1872827948, model.maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(411799174, model.maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, model.maintenanceWindow().patchingMode()); - Assertions.assertEquals(295575748, model.maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, model.maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(true, model.maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("wsobqwcsdbn", model.customerContacts().get(0).email()); - Assertions.assertEquals("xbvtvudu", model.displayName()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureUpdateTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureUpdateTests.java deleted file mode 100644 index 27b16d41c0d6..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructureUpdateTests.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdate; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureUpdateProperties; -import com.azure.resourcemanager.oracledatabase.models.CustomerContact; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow; -import com.azure.resourcemanager.oracledatabase.models.Month; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CloudExadataInfrastructureUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudExadataInfrastructureUpdate model = BinaryData.fromString( - "{\"zones\":[\"ooaojkniodkooebw\",\"ujhemmsbvdkcrodt\",\"infwjlfltkacjve\",\"kdlfoa\"],\"tags\":{\"pulpqblylsyxk\":\"kfpagao\",\"zuempsbzkf\":\"jnsjervtiagxsd\"},\"properties\":{\"computeCount\":1586502304,\"storageCount\":946127719,\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"February\"},{\"name\":\"January\"}],\"weeksOfMonth\":[887231612],\"daysOfWeek\":[{\"name\":\"Thursday\"}],\"hoursOfDay\":[1187892327,1127292795,1636536893,2049841705],\"leadTimeInWeeks\":1867961627,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":553106392,\"isCustomActionTimeoutEnabled\":false,\"isMonthlyPatchingEnabled\":false},\"customerContacts\":[{\"email\":\"ztzp\"}],\"displayName\":\"ncckw\"}}") - .toObject(CloudExadataInfrastructureUpdate.class); - Assertions.assertEquals("ooaojkniodkooebw", model.zones().get(0)); - Assertions.assertEquals("kfpagao", model.tags().get("pulpqblylsyxk")); - Assertions.assertEquals(1586502304, model.properties().computeCount()); - Assertions.assertEquals(946127719, model.properties().storageCount()); - Assertions.assertEquals(Preference.NO_PREFERENCE, model.properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.FEBRUARY, model.properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(887231612, model.properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.THURSDAY, - model.properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(1187892327, model.properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(1867961627, model.properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.ROLLING, model.properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(553106392, model.properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(false, model.properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(false, model.properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("ztzp", model.properties().customerContacts().get(0).email()); - Assertions.assertEquals("ncckw", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudExadataInfrastructureUpdate model = new CloudExadataInfrastructureUpdate() - .withZones(Arrays.asList("ooaojkniodkooebw", "ujhemmsbvdkcrodt", "infwjlfltkacjve", "kdlfoa")) - .withTags(mapOf("pulpqblylsyxk", "kfpagao", "zuempsbzkf", "jnsjervtiagxsd")) - .withProperties(new CloudExadataInfrastructureUpdateProperties().withComputeCount(1586502304) - .withStorageCount(946127719) - .withMaintenanceWindow(new MaintenanceWindow().withPreference(Preference.NO_PREFERENCE) - .withMonths(Arrays.asList(new Month().withName(MonthName.FEBRUARY), - new Month().withName(MonthName.JANUARY))) - .withWeeksOfMonth(Arrays.asList(887231612)) - .withDaysOfWeek(Arrays.asList(new DayOfWeek().withName(DayOfWeekName.THURSDAY))) - .withHoursOfDay(Arrays.asList(1187892327, 1127292795, 1636536893, 2049841705)) - .withLeadTimeInWeeks(1867961627) - .withPatchingMode(PatchingMode.ROLLING) - .withCustomActionTimeoutInMins(553106392) - .withIsCustomActionTimeoutEnabled(false) - .withIsMonthlyPatchingEnabled(false)) - .withCustomerContacts(Arrays.asList(new CustomerContact().withEmail("ztzp"))) - .withDisplayName("ncckw")); - model = BinaryData.fromObject(model).toObject(CloudExadataInfrastructureUpdate.class); - Assertions.assertEquals("ooaojkniodkooebw", model.zones().get(0)); - Assertions.assertEquals("kfpagao", model.tags().get("pulpqblylsyxk")); - Assertions.assertEquals(1586502304, model.properties().computeCount()); - Assertions.assertEquals(946127719, model.properties().storageCount()); - Assertions.assertEquals(Preference.NO_PREFERENCE, model.properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.FEBRUARY, model.properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(887231612, model.properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.THURSDAY, - model.properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(1187892327, model.properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(1867961627, model.properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.ROLLING, model.properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(553106392, model.properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(false, model.properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(false, model.properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("ztzp", model.properties().customerContacts().get(0).email()); - Assertions.assertEquals("ncckw", model.properties().displayName()); - } - - // Use "Map.of" if available - @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/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacityMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacityMockTests.java index cc54b8311963..5c28bba86320 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacityMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacityMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructure; @@ -25,36 +25,38 @@ public final class CloudExadataInfrastructuresAddStorageCapacityMockTests { @Test public void testAddStorageCapacity() throws Exception { String responseStr - = "{\"properties\":{\"ocid\":\"ethwwnpjhlfz\",\"computeCount\":1188676468,\"storageCount\":286029516,\"totalStorageSizeInGbs\":1831008288,\"availableStorageSizeInGbs\":443480039,\"timeCreated\":\"ousnfepgfewe\",\"lifecycleDetails\":\"l\",\"maintenanceWindow\":{\"preference\":\"CustomPreference\",\"months\":[{\"name\":\"October\"},{\"name\":\"March\"}],\"weeksOfMonth\":[1693425826,1841615082,31870038],\"daysOfWeek\":[{\"name\":\"Saturday\"},{\"name\":\"Monday\"}],\"hoursOfDay\":[122728116,205471182,156651258],\"leadTimeInWeeks\":507931039,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":2111689562,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":2099566654,\"estimatedNetworkSwitchesPatchingTime\":398428257,\"estimatedStorageServerPatchingTime\":1212582847,\"totalEstimatedPatchingTime\":1356255115},\"customerContacts\":[{\"email\":\"qscjavftjuh\"},{\"email\":\"qaz\"}],\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"MaintenanceInProgress\",\"shape\":\"uwpijr\",\"ociUrl\":\"civmmg\",\"cpuCount\":434258979,\"maxCpuCount\":1851539206,\"memorySizeInGbs\":1456716709,\"maxMemoryInGbs\":781484750,\"dbNodeStorageSizeInGbs\":671950548,\"maxDbNodeStorageSizeInGbs\":1596697892,\"dataStorageSizeInTbs\":71.94014292925087,\"maxDataStorageInTbs\":68.88861707633018,\"dbServerVersion\":\"dfvpg\",\"storageServerVersion\":\"oxgsgbpfgzdjtx\",\"activatedStorageCount\":2030623139,\"additionalStorageCount\":1717283486,\"displayName\":\"q\",\"lastMaintenanceRunId\":\"aqvlgafcqusr\",\"nextMaintenanceRunId\":\"etnwsdtutnw\",\"monthlyDbServerVersion\":\"uycvuzhyrmewip\",\"monthlyStorageServerVersion\":\"ekdxuku\"},\"zones\":[\"sjjxundxgketw\"],\"location\":\"hzjhf\",\"tags\":{\"gpmuneqsxvmhfbuz\":\"vvmu\",\"ms\":\"yihsasbhudypohyu\",\"ttymsjny\":\"ynsqyrpfoobr\"},\"id\":\"qdnfwqzdz\",\"name\":\"tilaxh\",\"type\":\"fhqlyvi\"}"; + = "{\"properties\":{\"definedFileSystemConfiguration\":[{\"isBackupPartition\":false,\"isResizable\":false,\"minSizeGb\":1006418512,\"mountPoint\":\"vo\"},{\"isBackupPartition\":true,\"isResizable\":true,\"minSizeGb\":420576736,\"mountPoint\":\"m\"},{\"isBackupPartition\":true,\"isResizable\":true,\"minSizeGb\":181668941,\"mountPoint\":\"tgsfja\"},{\"isBackupPartition\":true,\"isResizable\":false,\"minSizeGb\":901001519,\"mountPoint\":\"db\"}],\"ocid\":\"odhtnsirudhzm\",\"computeCount\":1358436880,\"storageCount\":1080480185,\"totalStorageSizeInGbs\":2020313938,\"availableStorageSizeInGbs\":2059680770,\"timeCreated\":\"zrcxfailcfxwmdbo\",\"lifecycleDetails\":\"fgsftufqob\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"March\"},{\"name\":\"January\"},{\"name\":\"September\"},{\"name\":\"January\"}],\"weeksOfMonth\":[929790319],\"daysOfWeek\":[{\"name\":\"Sunday\"},{\"name\":\"Saturday\"}],\"hoursOfDay\":[438441716,882585615,1311687390,1084894026],\"leadTimeInWeeks\":1745752519,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":1308211330,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":644888013,\"estimatedNetworkSwitchesPatchingTime\":968481133,\"estimatedStorageServerPatchingTime\":1809453689,\"totalEstimatedPatchingTime\":866448877},\"customerContacts\":[{\"email\":\"vbroylaxxu\"},{\"email\":\"cdisd\"},{\"email\":\"sfjbjsvg\"}],\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"shape\":\"yvycytdclxgcckn\",\"ociUrl\":\"wmbtmvpdvjdhtt\",\"cpuCount\":1520561720,\"maxCpuCount\":1761945314,\"memorySizeInGbs\":32473122,\"maxMemoryInGbs\":1521677969,\"dbNodeStorageSizeInGbs\":854254161,\"maxDbNodeStorageSizeInGbs\":1382279039,\"dataStorageSizeInTbs\":5.73443774577207,\"maxDataStorageInTbs\":62.23079071240545,\"dbServerVersion\":\"qnsdfzpbgtgky\",\"storageServerVersion\":\"dgh\",\"activatedStorageCount\":810731058,\"additionalStorageCount\":852383444,\"displayName\":\"tl\",\"lastMaintenanceRunId\":\"ez\",\"nextMaintenanceRunId\":\"hokvbwnh\",\"monthlyDbServerVersion\":\"qlgehg\",\"monthlyStorageServerVersion\":\"ipifhpfeoajvg\",\"databaseServerType\":\"txjcsheafidlt\",\"storageServerType\":\"sr\",\"computeModel\":\"ECPU\"},\"zones\":[\"ssjhoiftxfkf\",\"egprhptil\",\"ucb\"],\"location\":\"tgdqohmcwsldriz\",\"tags\":{\"zakakankjpdn\":\"wbralllibphbqzm\",\"xprimrsop\":\"zhajoylhjlmuo\",\"stvasylwxdzaumw\":\"eecjmeis\",\"fuzboyjathwtzolb\":\"oohgu\"},\"id\":\"emwmdxmebwjs\",\"name\":\"jpahlxvea\",\"type\":\"f\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CloudExadataInfrastructure response = manager.cloudExadataInfrastructures() - .addStorageCapacity("oaimlnw", "aaomylweazu", com.azure.core.util.Context.NONE); + .addStorageCapacity("ddjib", "bxv", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hzjhf", response.location()); - Assertions.assertEquals("vvmu", response.tags().get("gpmuneqsxvmhfbuz")); - Assertions.assertEquals(1188676468, response.properties().computeCount()); - Assertions.assertEquals(286029516, response.properties().storageCount()); - Assertions.assertEquals(Preference.CUSTOM_PREFERENCE, response.properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.OCTOBER, response.properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(1693425826, response.properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SATURDAY, + Assertions.assertEquals("tgdqohmcwsldriz", response.location()); + Assertions.assertEquals("wbralllibphbqzm", response.tags().get("zakakankjpdn")); + Assertions.assertEquals(1358436880, response.properties().computeCount()); + Assertions.assertEquals(1080480185, response.properties().storageCount()); + Assertions.assertEquals(Preference.NO_PREFERENCE, response.properties().maintenanceWindow().preference()); + Assertions.assertEquals(MonthName.MARCH, response.properties().maintenanceWindow().months().get(0).name()); + Assertions.assertEquals(929790319, response.properties().maintenanceWindow().weeksOfMonth().get(0)); + Assertions.assertEquals(DayOfWeekName.SUNDAY, response.properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(122728116, response.properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(507931039, response.properties().maintenanceWindow().leadTimeInWeeks()); + Assertions.assertEquals(438441716, response.properties().maintenanceWindow().hoursOfDay().get(0)); + Assertions.assertEquals(1745752519, response.properties().maintenanceWindow().leadTimeInWeeks()); Assertions.assertEquals(PatchingMode.NON_ROLLING, response.properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(2111689562, response.properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, response.properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(false, response.properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("qscjavftjuh", response.properties().customerContacts().get(0).email()); - Assertions.assertEquals("uwpijr", response.properties().shape()); - Assertions.assertEquals("q", response.properties().displayName()); - Assertions.assertEquals("sjjxundxgketw", response.zones().get(0)); + Assertions.assertEquals(1308211330, response.properties().maintenanceWindow().customActionTimeoutInMins()); + Assertions.assertTrue(response.properties().maintenanceWindow().isCustomActionTimeoutEnabled()); + Assertions.assertFalse(response.properties().maintenanceWindow().isMonthlyPatchingEnabled()); + Assertions.assertEquals("vbroylaxxu", response.properties().customerContacts().get(0).email()); + Assertions.assertEquals("yvycytdclxgcckn", response.properties().shape()); + Assertions.assertEquals("tl", response.properties().displayName()); + Assertions.assertEquals("txjcsheafidlt", response.properties().databaseServerType()); + Assertions.assertEquals("sr", response.properties().storageServerType()); + Assertions.assertEquals("ssjhoiftxfkf", response.zones().get(0)); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresCreateOrUpdateMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresCreateOrUpdateMockTests.java deleted file mode 100644 index f357ebd678bf..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresCreateOrUpdateMockTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructure; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructureProperties; -import com.azure.resourcemanager.oracledatabase.models.CustomerContact; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow; -import com.azure.resourcemanager.oracledatabase.models.Month; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CloudExadataInfrastructuresCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"ocid\":\"awddjibab\",\"computeCount\":1620106663,\"storageCount\":631857111,\"totalStorageSizeInGbs\":177247655,\"availableStorageSizeInGbs\":1297733750,\"timeCreated\":\"exavoxt\",\"lifecycleDetails\":\"lecdmdqbw\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"March\"},{\"name\":\"January\"}],\"weeksOfMonth\":[1790951604,266464644,462489227],\"daysOfWeek\":[{\"name\":\"Sunday\"},{\"name\":\"Wednesday\"}],\"hoursOfDay\":[641653590],\"leadTimeInWeeks\":1368673691,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":809343874,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":true},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":1227726974,\"estimatedNetworkSwitchesPatchingTime\":121727162,\"estimatedStorageServerPatchingTime\":274419936,\"totalEstimatedPatchingTime\":1714425112},\"customerContacts\":[{\"email\":\"lpagzrcx\"},{\"email\":\"a\"},{\"email\":\"lc\"},{\"email\":\"xwmdboxd\"}],\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Provisioning\",\"shape\":\"ufqobrjlnac\",\"ociUrl\":\"ckknhxkizvy\",\"cpuCount\":1311687390,\"maxCpuCount\":1752930895,\"memorySizeInGbs\":349650849,\"maxMemoryInGbs\":34895139,\"dbNodeStorageSizeInGbs\":2075017284,\"maxDbNodeStorageSizeInGbs\":1023796809,\"dataStorageSizeInTbs\":12.540661628515403,\"maxDataStorageInTbs\":50.97596306427133,\"dbServerVersion\":\"kkjqnvbroylaxxu\",\"storageServerVersion\":\"disdosfjbjsvgj\",\"activatedStorageCount\":1257369093,\"additionalStorageCount\":1647149514,\"displayName\":\"vyc\",\"lastMaintenanceRunId\":\"dclxgc\",\"nextMaintenanceRunId\":\"nfnw\",\"monthlyDbServerVersion\":\"tmvpdvjdhtt\",\"monthlyStorageServerVersion\":\"efedxihchrphkm\"},\"zones\":[\"jdqnsdfzpbgt\",\"kylkdghrj\",\"uutlwxezwzhok\"],\"location\":\"wnhhtqlgehgppip\",\"tags\":{\"afidltugsres\":\"pfeoajvgcxtxjcsh\",\"wegprh\":\"kssjhoiftxfk\",\"q\":\"tillucbiqtg\",\"wsldrizetpwbr\":\"hm\"},\"id\":\"lllibph\",\"name\":\"qzmiza\",\"type\":\"a\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CloudExadataInfrastructure response = manager.cloudExadataInfrastructures() - .define("ti") - .withRegion("zddrt") - .withExistingResourceGroup("ouwivkxoyzunbixx") - .withZones(Arrays.asList("lnsrmffe", "cxcktpi", "merteeammxqiek")) - .withTags(mapOf("vrefdeesv", "ojbmxv")) - .withProperties(new CloudExadataInfrastructureProperties().withComputeCount(2125732011) - .withStorageCount(916087616) - .withMaintenanceWindow(new MaintenanceWindow().withPreference(Preference.NO_PREFERENCE) - .withMonths(Arrays.asList(new Month().withName(MonthName.NOVEMBER), - new Month().withName(MonthName.JANUARY), new Month().withName(MonthName.OCTOBER))) - .withWeeksOfMonth(Arrays.asList(483847293)) - .withDaysOfWeek(Arrays.asList(new DayOfWeek().withName(DayOfWeekName.MONDAY), - new DayOfWeek().withName(DayOfWeekName.THURSDAY))) - .withHoursOfDay(Arrays.asList(1084640594, 1572923585, 910896257)) - .withLeadTimeInWeeks(1366992874) - .withPatchingMode(PatchingMode.NON_ROLLING) - .withCustomActionTimeoutInMins(743316099) - .withIsCustomActionTimeoutEnabled(false) - .withIsMonthlyPatchingEnabled(false)) - .withCustomerContacts( - Arrays.asList(new CustomerContact().withEmail("xwh"), new CustomerContact().withEmail("ansym"), - new CustomerContact().withEmail("yqhlwigdivbkbx"), new CustomerContact().withEmail("omfaj"))) - .withShape("vdaeyyguxakjsq") - .withDisplayName("jks")) - .create(); - - Assertions.assertEquals("wnhhtqlgehgppip", response.location()); - Assertions.assertEquals("pfeoajvgcxtxjcsh", response.tags().get("afidltugsres")); - Assertions.assertEquals(1620106663, response.properties().computeCount()); - Assertions.assertEquals(631857111, response.properties().storageCount()); - Assertions.assertEquals(Preference.NO_PREFERENCE, response.properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.MARCH, response.properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(1790951604, response.properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SUNDAY, - response.properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(641653590, response.properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(1368673691, response.properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.ROLLING, response.properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(809343874, response.properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, response.properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(true, response.properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("lpagzrcx", response.properties().customerContacts().get(0).email()); - Assertions.assertEquals("ufqobrjlnac", response.properties().shape()); - Assertions.assertEquals("vyc", response.properties().displayName()); - Assertions.assertEquals("jdqnsdfzpbgt", response.zones().get(0)); - } - - // Use "Map.of" if available - @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/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresGetByResourceGroupWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 65b61716d59c..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructure; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CloudExadataInfrastructuresGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"ocid\":\"of\",\"computeCount\":1484675592,\"storageCount\":860547851,\"totalStorageSizeInGbs\":1665622594,\"availableStorageSizeInGbs\":1122373558,\"timeCreated\":\"dh\",\"lifecycleDetails\":\"plcplcwkhi\",\"maintenanceWindow\":{\"preference\":\"CustomPreference\",\"months\":[{\"name\":\"June\"},{\"name\":\"December\"},{\"name\":\"July\"},{\"name\":\"March\"}],\"weeksOfMonth\":[19838939,693588960],\"daysOfWeek\":[{\"name\":\"Tuesday\"}],\"hoursOfDay\":[703007712,994844547,1143830782,741446459],\"leadTimeInWeeks\":1635200760,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":1670061981,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":215808827,\"estimatedNetworkSwitchesPatchingTime\":1777696801,\"estimatedStorageServerPatchingTime\":1089697565,\"totalEstimatedPatchingTime\":1671078862},\"customerContacts\":[{\"email\":\"vekqvgqo\"},{\"email\":\"wifzmp\"},{\"email\":\"wyivqikf\"}],\"provisioningState\":\"Canceled\",\"lifecycleState\":\"Provisioning\",\"shape\":\"fsphuagrttikt\",\"ociUrl\":\"sqczkvyklxubyj\",\"cpuCount\":472498299,\"maxCpuCount\":716445965,\"memorySizeInGbs\":355904338,\"maxMemoryInGbs\":602518095,\"dbNodeStorageSizeInGbs\":1534498660,\"maxDbNodeStorageSizeInGbs\":982758961,\"dataStorageSizeInTbs\":81.51068470647964,\"maxDataStorageInTbs\":19.265644811753823,\"dbServerVersion\":\"a\",\"storageServerVersion\":\"etttwgdslqxihhr\",\"activatedStorageCount\":342501929,\"additionalStorageCount\":4493700,\"displayName\":\"qseypxiutcxa\",\"lastMaintenanceRunId\":\"hyrpetogebjoxs\",\"nextMaintenanceRunId\":\"vnh\",\"monthlyDbServerVersion\":\"brqnkkzjcjb\",\"monthlyStorageServerVersion\":\"gaehvvibrxjjst\"},\"zones\":[\"beitpkx\",\"tmo\",\"bklftidgfcwqmpim\",\"qxzhem\"],\"location\":\"h\",\"tags\":{\"lkb\":\"jswtwkozzwc\"},\"id\":\"wpfaj\",\"name\":\"jwltlwtjjgu\",\"type\":\"talhsnvkcdmxzr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CloudExadataInfrastructure response = manager.cloudExadataInfrastructures() - .getByResourceGroupWithResponse("own", "tgkbugrjqctojc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("h", response.location()); - Assertions.assertEquals("jswtwkozzwc", response.tags().get("lkb")); - Assertions.assertEquals(1484675592, response.properties().computeCount()); - Assertions.assertEquals(860547851, response.properties().storageCount()); - Assertions.assertEquals(Preference.CUSTOM_PREFERENCE, response.properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.JUNE, response.properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(19838939, response.properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.TUESDAY, - response.properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(703007712, response.properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(1635200760, response.properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.ROLLING, response.properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(1670061981, response.properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, response.properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(false, response.properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("vekqvgqo", response.properties().customerContacts().get(0).email()); - Assertions.assertEquals("fsphuagrttikt", response.properties().shape()); - Assertions.assertEquals("qseypxiutcxa", response.properties().displayName()); - Assertions.assertEquals("beitpkx", response.zones().get(0)); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListByResourceGroupMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListByResourceGroupMockTests.java deleted file mode 100644 index c0c17249c14f..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListByResourceGroupMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructure; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CloudExadataInfrastructuresListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"ocid\":\"uwmncs\",\"computeCount\":736005906,\"storageCount\":2120109491,\"totalStorageSizeInGbs\":1869546664,\"availableStorageSizeInGbs\":387251402,\"timeCreated\":\"ekrsgs\",\"lifecycleDetails\":\"dhuzqgnjdgk\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"July\"}],\"weeksOfMonth\":[1169693926,252891746],\"daysOfWeek\":[{\"name\":\"Tuesday\"}],\"hoursOfDay\":[144563900],\"leadTimeInWeeks\":7745005,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":1726395306,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":1986458631,\"estimatedNetworkSwitchesPatchingTime\":685064266,\"estimatedStorageServerPatchingTime\":1207165403,\"totalEstimatedPatchingTime\":670431250},\"customerContacts\":[{\"email\":\"evqagtl\"}],\"provisioningState\":\"Canceled\",\"lifecycleState\":\"Updating\",\"shape\":\"kqo\",\"ociUrl\":\"ykvgtrdcnifmz\",\"cpuCount\":1867951005,\"maxCpuCount\":212235085,\"memorySizeInGbs\":1569168955,\"maxMemoryInGbs\":1235749271,\"dbNodeStorageSizeInGbs\":44176896,\"maxDbNodeStorageSizeInGbs\":265012274,\"dataStorageSizeInTbs\":83.52714933447804,\"maxDataStorageInTbs\":23.660619597545708,\"dbServerVersion\":\"khocxvdfffwaf\",\"storageServerVersion\":\"oudaspavehhrvk\",\"activatedStorageCount\":50845900,\"additionalStorageCount\":360812763,\"displayName\":\"zudhcxg\",\"lastMaintenanceRunId\":\"oyxcdyuib\",\"nextMaintenanceRunId\":\"fdn\",\"monthlyDbServerVersion\":\"ydvfvfcjnae\",\"monthlyStorageServerVersion\":\"srvhmgorffuki\"},\"zones\":[\"vwmzhwplefaxvxil\",\"btgn\",\"nzeyqxtjj\"],\"location\":\"qlqhycavodg\",\"tags\":{\"iaa\":\"beesmieknlra\",\"agt\":\"iuagydwqfbylyrfg\"},\"id\":\"ojocqwogf\",\"name\":\"zjvusfzldmo\",\"type\":\"uxylfsbtkadpy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.cloudExadataInfrastructures().listByResourceGroup("auy", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qlqhycavodg", response.iterator().next().location()); - Assertions.assertEquals("beesmieknlra", response.iterator().next().tags().get("iaa")); - Assertions.assertEquals(736005906, response.iterator().next().properties().computeCount()); - Assertions.assertEquals(2120109491, response.iterator().next().properties().storageCount()); - Assertions.assertEquals(Preference.NO_PREFERENCE, - response.iterator().next().properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.JULY, - response.iterator().next().properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(1169693926, - response.iterator().next().properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.TUESDAY, - response.iterator().next().properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(144563900, - response.iterator().next().properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(7745005, response.iterator().next().properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.ROLLING, - response.iterator().next().properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(1726395306, - response.iterator().next().properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, - response.iterator().next().properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(false, - response.iterator().next().properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("evqagtl", response.iterator().next().properties().customerContacts().get(0).email()); - Assertions.assertEquals("kqo", response.iterator().next().properties().shape()); - Assertions.assertEquals("zudhcxg", response.iterator().next().properties().displayName()); - Assertions.assertEquals("vwmzhwplefaxvxil", response.iterator().next().zones().get(0)); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListMockTests.java deleted file mode 100644 index de044945bb26..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructure; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CloudExadataInfrastructuresListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"ocid\":\"kambtrnegvmnvuqe\",\"computeCount\":640120978,\"storageCount\":1032256402,\"totalStorageSizeInGbs\":2031178559,\"availableStorageSizeInGbs\":608775789,\"timeCreated\":\"bkkd\",\"lifecycleDetails\":\"lves\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"February\"},{\"name\":\"August\"}],\"weeksOfMonth\":[444057541,1058689711],\"daysOfWeek\":[{\"name\":\"Sunday\"},{\"name\":\"Monday\"},{\"name\":\"Friday\"}],\"hoursOfDay\":[159855339,1353258007,107848050,55990997],\"leadTimeInWeeks\":17628020,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":1984241161,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":true},\"estimatedPatchingTime\":{\"estimatedDbServerPatchingTime\":87625396,\"estimatedNetworkSwitchesPatchingTime\":1693563757,\"estimatedStorageServerPatchingTime\":1143602550,\"totalEstimatedPatchingTime\":743111845},\"customerContacts\":[{\"email\":\"jtqedcgzulwmm\"}],\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"MaintenanceInProgress\",\"shape\":\"rjvpglydzgkrvqee\",\"ociUrl\":\"oepry\",\"cpuCount\":726969242,\"maxCpuCount\":584463560,\"memorySizeInGbs\":989782858,\"maxMemoryInGbs\":20343154,\"dbNodeStorageSizeInGbs\":111539193,\"maxDbNodeStorageSizeInGbs\":2114166955,\"dataStorageSizeInTbs\":43.95224913220894,\"maxDataStorageInTbs\":44.82261422528555,\"dbServerVersion\":\"q\",\"storageServerVersion\":\"f\",\"activatedStorageCount\":97417905,\"additionalStorageCount\":1828408441,\"displayName\":\"iglaecx\",\"lastMaintenanceRunId\":\"t\",\"nextMaintenanceRunId\":\"okpvzm\",\"monthlyDbServerVersion\":\"t\",\"monthlyStorageServerVersion\":\"dgxobfircl\"},\"zones\":[\"kciayzri\"],\"location\":\"hya\",\"tags\":{\"xqvkjlmxhomdyn\":\"jlb\",\"raauzzpt\":\"dwdigumb\",\"ysdzhez\":\"a\"},\"id\":\"wva\",\"name\":\"qyuvvfonkp\",\"type\":\"hqyikvy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.cloudExadataInfrastructures().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hya", response.iterator().next().location()); - Assertions.assertEquals("jlb", response.iterator().next().tags().get("xqvkjlmxhomdyn")); - Assertions.assertEquals(640120978, response.iterator().next().properties().computeCount()); - Assertions.assertEquals(1032256402, response.iterator().next().properties().storageCount()); - Assertions.assertEquals(Preference.NO_PREFERENCE, - response.iterator().next().properties().maintenanceWindow().preference()); - Assertions.assertEquals(MonthName.FEBRUARY, - response.iterator().next().properties().maintenanceWindow().months().get(0).name()); - Assertions.assertEquals(444057541, - response.iterator().next().properties().maintenanceWindow().weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SUNDAY, - response.iterator().next().properties().maintenanceWindow().daysOfWeek().get(0).name()); - Assertions.assertEquals(159855339, - response.iterator().next().properties().maintenanceWindow().hoursOfDay().get(0)); - Assertions.assertEquals(17628020, - response.iterator().next().properties().maintenanceWindow().leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, - response.iterator().next().properties().maintenanceWindow().patchingMode()); - Assertions.assertEquals(1984241161, - response.iterator().next().properties().maintenanceWindow().customActionTimeoutInMins()); - Assertions.assertEquals(true, - response.iterator().next().properties().maintenanceWindow().isCustomActionTimeoutEnabled()); - Assertions.assertEquals(true, - response.iterator().next().properties().maintenanceWindow().isMonthlyPatchingEnabled()); - Assertions.assertEquals("jtqedcgzulwmm", - response.iterator().next().properties().customerContacts().get(0).email()); - Assertions.assertEquals("rjvpglydzgkrvqee", response.iterator().next().properties().shape()); - Assertions.assertEquals("iglaecx", response.iterator().next().properties().displayName()); - Assertions.assertEquals("kciayzri", response.iterator().next().zones().get(0)); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesWithResponseMockTests.java index e43febddcecd..f606b120caec 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesWithResponseMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesWithResponseMockTests.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressProperties; +import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.List; @@ -23,25 +23,25 @@ public final class CloudVmClustersListPrivateIpAddressesWithResponseMockTests { @Test public void testListPrivateIpAddressesWithResponse() throws Exception { String responseStr - = "[{\"displayName\":\"cgegydcwbo\",\"hostnameLabel\":\"jumvqqolihrraio\",\"ocid\":\"aubrjtloq\",\"ipAddress\":\"fuojrngif\",\"subnetId\":\"rzpasccbiuimzdly\"},{\"displayName\":\"dfqwmkyoq\",\"hostnameLabel\":\"fdvruz\",\"ocid\":\"lzo\",\"ipAddress\":\"hpc\",\"subnetId\":\"fnmdxotn\"},{\"displayName\":\"fdgugeyzi\",\"hostnameLabel\":\"grkyuizabsnmfpph\",\"ocid\":\"jee\",\"ipAddress\":\"yhyhsgzfczb\",\"subnetId\":\"omfgbeglqgleohib\"},{\"displayName\":\"tnluankrr\",\"hostnameLabel\":\"xeeebtijvacvbmqz\",\"ocid\":\"qqxlajr\",\"ipAddress\":\"wxacevehj\",\"subnetId\":\"uyxoaf\"}]"; + = "[{\"displayName\":\"iq\",\"hostnameLabel\":\"smexiitdf\",\"ocid\":\"xtyasiibmiyb\",\"ipAddress\":\"nustgnljh\",\"subnetId\":\"mgixhcmavmqfou\"},{\"displayName\":\"or\",\"hostnameLabel\":\"cgyypro\",\"ocid\":\"wy\",\"ipAddress\":\"undmbx\",\"subnetId\":\"ugcmjkavlgorb\"}]"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); List response = manager.cloudVmClusters() - .listPrivateIpAddressesWithResponse("kcdqzhlct", "dunqnd", - new PrivateIpAddressesFilter().withSubnetId("fpch").withVnicId("qbnj"), + .listPrivateIpAddressesWithResponse("aeylinm", "gv", + new PrivateIpAddressesFilter().withSubnetId("irpghriypoqeyh").withVnicId("qhykprlpyzn"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cgegydcwbo", response.get(0).displayName()); - Assertions.assertEquals("jumvqqolihrraio", response.get(0).hostnameLabel()); - Assertions.assertEquals("aubrjtloq", response.get(0).ocid()); - Assertions.assertEquals("fuojrngif", response.get(0).ipAddress()); - Assertions.assertEquals("rzpasccbiuimzdly", response.get(0).subnetId()); + Assertions.assertEquals("iq", response.get(0).displayName()); + Assertions.assertEquals("smexiitdf", response.get(0).hostnameLabel()); + Assertions.assertEquals("xtyasiibmiyb", response.get(0).ocid()); + Assertions.assertEquals("nustgnljh", response.get(0).ipAddress()); + Assertions.assertEquals("mgixhcmavmqfou", response.get(0).subnetId()); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ConnectionStringTypeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ConnectionStringTypeTests.java deleted file mode 100644 index c07e81e9f14e..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ConnectionStringTypeTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.AllConnectionStringType; -import com.azure.resourcemanager.oracledatabase.models.ConnectionStringType; -import com.azure.resourcemanager.oracledatabase.models.ConsumerGroup; -import com.azure.resourcemanager.oracledatabase.models.HostFormatType; -import com.azure.resourcemanager.oracledatabase.models.ProfileType; -import com.azure.resourcemanager.oracledatabase.models.ProtocolType; -import com.azure.resourcemanager.oracledatabase.models.SessionModeType; -import com.azure.resourcemanager.oracledatabase.models.SyntaxFormatType; -import com.azure.resourcemanager.oracledatabase.models.TlsAuthenticationType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConnectionStringTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectionStringType model = BinaryData.fromString( - "{\"allConnectionStrings\":{\"high\":\"zyde\",\"low\":\"jwyahuxinpmqnja\",\"medium\":\"ixjsprozvcputeg\"},\"dedicated\":\"wmfdatscmdvpjhul\",\"high\":\"uvm\",\"low\":\"ozkrwfndiodjpslw\",\"medium\":\"dpvwryoqpsoaccta\",\"profiles\":[{\"consumerGroup\":\"Medium\",\"displayName\":\"lahbcryff\",\"hostFormat\":\"Fqdn\",\"isRegional\":false,\"protocol\":\"TCP\",\"sessionMode\":\"Redirect\",\"syntaxFormat\":\"Ezconnect\",\"tlsAuthentication\":\"Mutual\",\"value\":\"paojakhmsbzjh\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"evdphlxaol\",\"hostFormat\":\"Ip\",\"isRegional\":false,\"protocol\":\"TCPS\",\"sessionMode\":\"Redirect\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"pfzfsinzgvfc\"}]}") - .toObject(ConnectionStringType.class); - Assertions.assertEquals("zyde", model.allConnectionStrings().high()); - Assertions.assertEquals("jwyahuxinpmqnja", model.allConnectionStrings().low()); - Assertions.assertEquals("ixjsprozvcputeg", model.allConnectionStrings().medium()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.dedicated()); - Assertions.assertEquals("uvm", model.high()); - Assertions.assertEquals("ozkrwfndiodjpslw", model.low()); - Assertions.assertEquals("dpvwryoqpsoaccta", model.medium()); - Assertions.assertEquals(ConsumerGroup.MEDIUM, model.profiles().get(0).consumerGroup()); - Assertions.assertEquals("lahbcryff", model.profiles().get(0).displayName()); - Assertions.assertEquals(HostFormatType.FQDN, model.profiles().get(0).hostFormat()); - Assertions.assertEquals(false, model.profiles().get(0).isRegional()); - Assertions.assertEquals(ProtocolType.TCP, model.profiles().get(0).protocol()); - Assertions.assertEquals(SessionModeType.REDIRECT, model.profiles().get(0).sessionMode()); - Assertions.assertEquals(SyntaxFormatType.EZCONNECT, model.profiles().get(0).syntaxFormat()); - Assertions.assertEquals(TlsAuthenticationType.MUTUAL, model.profiles().get(0).tlsAuthentication()); - Assertions.assertEquals("paojakhmsbzjh", model.profiles().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectionStringType model = new ConnectionStringType() - .withAllConnectionStrings( - new AllConnectionStringType().withHigh("zyde").withLow("jwyahuxinpmqnja").withMedium("ixjsprozvcputeg")) - .withDedicated("wmfdatscmdvpjhul") - .withHigh("uvm") - .withLow("ozkrwfndiodjpslw") - .withMedium("dpvwryoqpsoaccta") - .withProfiles(Arrays.asList( - new ProfileType().withConsumerGroup(ConsumerGroup.MEDIUM) - .withDisplayName("lahbcryff") - .withHostFormat(HostFormatType.FQDN) - .withIsRegional(false) - .withProtocol(ProtocolType.TCP) - .withSessionMode(SessionModeType.REDIRECT) - .withSyntaxFormat(SyntaxFormatType.EZCONNECT) - .withTlsAuthentication(TlsAuthenticationType.MUTUAL) - .withValue("paojakhmsbzjh"), - new ProfileType().withConsumerGroup(ConsumerGroup.MEDIUM) - .withDisplayName("evdphlxaol") - .withHostFormat(HostFormatType.IP) - .withIsRegional(false) - .withProtocol(ProtocolType.TCPS) - .withSessionMode(SessionModeType.REDIRECT) - .withSyntaxFormat(SyntaxFormatType.LONG) - .withTlsAuthentication(TlsAuthenticationType.SERVER) - .withValue("pfzfsinzgvfc"))); - model = BinaryData.fromObject(model).toObject(ConnectionStringType.class); - Assertions.assertEquals("zyde", model.allConnectionStrings().high()); - Assertions.assertEquals("jwyahuxinpmqnja", model.allConnectionStrings().low()); - Assertions.assertEquals("ixjsprozvcputeg", model.allConnectionStrings().medium()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.dedicated()); - Assertions.assertEquals("uvm", model.high()); - Assertions.assertEquals("ozkrwfndiodjpslw", model.low()); - Assertions.assertEquals("dpvwryoqpsoaccta", model.medium()); - Assertions.assertEquals(ConsumerGroup.MEDIUM, model.profiles().get(0).consumerGroup()); - Assertions.assertEquals("lahbcryff", model.profiles().get(0).displayName()); - Assertions.assertEquals(HostFormatType.FQDN, model.profiles().get(0).hostFormat()); - Assertions.assertEquals(false, model.profiles().get(0).isRegional()); - Assertions.assertEquals(ProtocolType.TCP, model.profiles().get(0).protocol()); - Assertions.assertEquals(SessionModeType.REDIRECT, model.profiles().get(0).sessionMode()); - Assertions.assertEquals(SyntaxFormatType.EZCONNECT, model.profiles().get(0).syntaxFormat()); - Assertions.assertEquals(TlsAuthenticationType.MUTUAL, model.profiles().get(0).tlsAuthentication()); - Assertions.assertEquals("paojakhmsbzjh", model.profiles().get(0).value()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ConnectionUrlTypeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ConnectionUrlTypeTests.java deleted file mode 100644 index 765d5fce2ab2..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ConnectionUrlTypeTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.ConnectionUrlType; -import org.junit.jupiter.api.Assertions; - -public final class ConnectionUrlTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectionUrlType model = BinaryData.fromString( - "{\"apexUrl\":\"ybb\",\"databaseTransformsUrl\":\"odepoogin\",\"graphStudioUrl\":\"amiheognarxz\",\"machineLearningNotebookUrl\":\"heotusiv\",\"mongoDbUrl\":\"v\",\"ordsUrl\":\"iqihn\",\"sqlDevWebUrl\":\"ngbwjz\"}") - .toObject(ConnectionUrlType.class); - Assertions.assertEquals("ybb", model.apexUrl()); - Assertions.assertEquals("odepoogin", model.databaseTransformsUrl()); - Assertions.assertEquals("amiheognarxz", model.graphStudioUrl()); - Assertions.assertEquals("heotusiv", model.machineLearningNotebookUrl()); - Assertions.assertEquals("v", model.mongoDbUrl()); - Assertions.assertEquals("iqihn", model.ordsUrl()); - Assertions.assertEquals("ngbwjz", model.sqlDevWebUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectionUrlType model = new ConnectionUrlType().withApexUrl("ybb") - .withDatabaseTransformsUrl("odepoogin") - .withGraphStudioUrl("amiheognarxz") - .withMachineLearningNotebookUrl("heotusiv") - .withMongoDbUrl("v") - .withOrdsUrl("iqihn") - .withSqlDevWebUrl("ngbwjz"); - model = BinaryData.fromObject(model).toObject(ConnectionUrlType.class); - Assertions.assertEquals("ybb", model.apexUrl()); - Assertions.assertEquals("odepoogin", model.databaseTransformsUrl()); - Assertions.assertEquals("amiheognarxz", model.graphStudioUrl()); - Assertions.assertEquals("heotusiv", model.machineLearningNotebookUrl()); - Assertions.assertEquals("v", model.mongoDbUrl()); - Assertions.assertEquals("iqihn", model.ordsUrl()); - Assertions.assertEquals("ngbwjz", model.sqlDevWebUrl()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CustomerContactTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CustomerContactTests.java deleted file mode 100644 index ecd77f7f66aa..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CustomerContactTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.CustomerContact; -import org.junit.jupiter.api.Assertions; - -public final class CustomerContactTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomerContact model = BinaryData.fromString("{\"email\":\"uhivyqniw\"}").toObject(CustomerContact.class); - Assertions.assertEquals("uhivyqniw", model.email()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomerContact model = new CustomerContact().withEmail("uhivyqniw"); - model = BinaryData.fromObject(model).toObject(CustomerContact.class); - Assertions.assertEquals("uhivyqniw", model.email()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DataCollectionOptionsTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DataCollectionOptionsTests.java deleted file mode 100644 index a9b13fc03685..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DataCollectionOptionsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions; -import org.junit.jupiter.api.Assertions; - -public final class DataCollectionOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataCollectionOptions model = BinaryData.fromString( - "{\"isDiagnosticsEventsEnabled\":true,\"isHealthMonitoringEnabled\":false,\"isIncidentLogsEnabled\":true}") - .toObject(DataCollectionOptions.class); - Assertions.assertEquals(true, model.isDiagnosticsEventsEnabled()); - Assertions.assertEquals(false, model.isHealthMonitoringEnabled()); - Assertions.assertEquals(true, model.isIncidentLogsEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataCollectionOptions model = new DataCollectionOptions().withIsDiagnosticsEventsEnabled(true) - .withIsHealthMonitoringEnabled(false) - .withIsIncidentLogsEnabled(true); - model = BinaryData.fromObject(model).toObject(DataCollectionOptions.class); - Assertions.assertEquals(true, model.isDiagnosticsEventsEnabled()); - Assertions.assertEquals(false, model.isHealthMonitoringEnabled()); - Assertions.assertEquals(true, model.isIncidentLogsEnabled()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DayOfWeekTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DayOfWeekTests.java deleted file mode 100644 index f17262b2bee1..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DayOfWeekTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import org.junit.jupiter.api.Assertions; - -public final class DayOfWeekTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DayOfWeek model = BinaryData.fromString("{\"name\":\"Thursday\"}").toObject(DayOfWeek.class); - Assertions.assertEquals(DayOfWeekName.THURSDAY, model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DayOfWeek model = new DayOfWeek().withName(DayOfWeekName.THURSDAY); - model = BinaryData.fromObject(model).toObject(DayOfWeek.class); - Assertions.assertEquals(DayOfWeekName.THURSDAY, model.name()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DayOfWeekUpdateTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DayOfWeekUpdateTests.java deleted file mode 100644 index b54bbd91dee7..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DayOfWeekUpdateTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekUpdate; -import org.junit.jupiter.api.Assertions; - -public final class DayOfWeekUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DayOfWeekUpdate model = BinaryData.fromString("{\"name\":\"Friday\"}").toObject(DayOfWeekUpdate.class); - Assertions.assertEquals(DayOfWeekName.FRIDAY, model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DayOfWeekUpdate model = new DayOfWeekUpdate().withName(DayOfWeekName.FRIDAY); - model = BinaryData.fromObject(model).toObject(DayOfWeekUpdate.class); - Assertions.assertEquals(DayOfWeekName.FRIDAY, model.name()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbIormConfigTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbIormConfigTests.java deleted file mode 100644 index f290140e1260..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbIormConfigTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbIormConfig; -import org.junit.jupiter.api.Assertions; - -public final class DbIormConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbIormConfig model - = BinaryData.fromString("{\"dbName\":\"kde\",\"flashCacheLimit\":\"pvlopwiyighxpkd\",\"share\":1060544654}") - .toObject(DbIormConfig.class); - Assertions.assertEquals("kde", model.dbName()); - Assertions.assertEquals("pvlopwiyighxpkd", model.flashCacheLimit()); - Assertions.assertEquals(1060544654, model.share()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbIormConfig model - = new DbIormConfig().withDbName("kde").withFlashCacheLimit("pvlopwiyighxpkd").withShare(1060544654); - model = BinaryData.fromObject(model).toObject(DbIormConfig.class); - Assertions.assertEquals("kde", model.dbName()); - Assertions.assertEquals("pvlopwiyighxpkd", model.flashCacheLimit()); - Assertions.assertEquals(1060544654, model.share()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeActionTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeActionTests.java deleted file mode 100644 index eb510358d5b7..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeActionTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; -import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; -import org.junit.jupiter.api.Assertions; - -public final class DbNodeActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbNodeAction model = BinaryData.fromString("{\"action\":\"Stop\"}").toObject(DbNodeAction.class); - Assertions.assertEquals(DbNodeActionEnum.STOP, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbNodeAction model = new DbNodeAction().withAction(DbNodeActionEnum.STOP); - model = BinaryData.fromObject(model).toObject(DbNodeAction.class); - Assertions.assertEquals(DbNodeActionEnum.STOP, model.action()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeInnerTests.java deleted file mode 100644 index a675a895b119..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.DbNodeInner; -import com.azure.resourcemanager.oracledatabase.models.DbNodeProperties; - -public final class DbNodeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbNodeInner model = BinaryData.fromString( - "{\"properties\":{\"ocid\":\"nfqn\",\"additionalDetails\":\"ypsxjvfoim\",\"backupIpId\":\"slirciz\",\"backupVnic2Id\":\"vydfceacvlhvygdy\",\"backupVnicId\":\"umrtwnawjsl\",\"cpuCoreCount\":1538951172,\"dbNodeStorageSizeInGbs\":1632414232,\"dbServerId\":\"gcyztsfmznbae\",\"dbSystemId\":\"hchqnrnrpx\",\"faultDomain\":\"uwrykqgaifmvikl\",\"hostIpId\":\"dvk\",\"hostname\":\"ejd\",\"lifecycleState\":\"Stopping\",\"lifecycleDetails\":\"vdsrhnjiv\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":1966018535,\"softwareStorageSizeInGb\":61062537,\"timeCreated\":\"2021-10-03T14:22:02Z\",\"timeMaintenanceWindowEnd\":\"2021-09-22T09:05:45Z\",\"timeMaintenanceWindowStart\":\"2020-12-23T09:28:04Z\",\"vnic2Id\":\"dftuljltduce\",\"vnicId\":\"tmczuomejwcwwqi\",\"provisioningState\":\"Failed\"},\"id\":\"sx\",\"name\":\"ojmsvpkjprvkwc\",\"type\":\"zqljyxgtczh\"}") - .toObject(DbNodeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbNodeInner model = new DbNodeInner().withProperties(new DbNodeProperties()); - model = BinaryData.fromObject(model).toObject(DbNodeInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeListResultTests.java deleted file mode 100644 index c8dc9dd588b4..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodeListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbNodeListResult; -import org.junit.jupiter.api.Assertions; - -public final class DbNodeListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbNodeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ocid\":\"pyostronzmyhgfi\",\"additionalDetails\":\"sxkm\",\"backupIpId\":\"a\",\"backupVnic2Id\":\"rrjreafxtsgu\",\"backupVnicId\":\"jglikkxwslolb\",\"cpuCoreCount\":1224144822,\"dbNodeStorageSizeInGbs\":845097361,\"dbServerId\":\"m\",\"dbSystemId\":\"elfk\",\"faultDomain\":\"plcrpwjxeznoig\",\"hostIpId\":\"njwmwkpnbsazejj\",\"hostname\":\"kagfhsxtt\",\"lifecycleState\":\"Stopping\",\"lifecycleDetails\":\"xnfaazpxdtnk\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":190576653,\"softwareStorageSizeInGb\":135595246,\"timeCreated\":\"2020-12-21T21:02:08Z\",\"timeMaintenanceWindowEnd\":\"2021-06-14T14:36:08Z\",\"timeMaintenanceWindowStart\":\"2021-07-12T10:16:15Z\",\"vnic2Id\":\"pyouaibrebqaays\",\"vnicId\":\"ixqtn\",\"provisioningState\":\"Failed\"},\"id\":\"zlwfffiakp\",\"name\":\"pqqmted\",\"type\":\"tmmjihyeozph\"},{\"properties\":{\"ocid\":\"uyqncygupkvipmd\",\"additionalDetails\":\"wx\",\"backupIpId\":\"pevzhfst\",\"backupVnic2Id\":\"xhojuj\",\"backupVnicId\":\"pelmcuvhixbjxyf\",\"cpuCoreCount\":519110670,\"dbNodeStorageSizeInGbs\":156258046,\"dbServerId\":\"ool\",\"dbSystemId\":\"tpkiwkkbnujry\",\"faultDomain\":\"tylbfpncurdoiw\",\"hostIpId\":\"thtywub\",\"hostname\":\"bihwqknfdnt\",\"lifecycleState\":\"Failed\",\"lifecycleDetails\":\"rdgoihxumw\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":1097443126,\"softwareStorageSizeInGb\":498677295,\"timeCreated\":\"2021-05-20T02:25:29Z\",\"timeMaintenanceWindowEnd\":\"2021-02-01T20:04:58Z\",\"timeMaintenanceWindowStart\":\"2021-06-25T00:10:43Z\",\"vnic2Id\":\"wggytsbwtovvt\",\"vnicId\":\"einqf\",\"provisioningState\":\"Canceled\"},\"id\":\"qknp\",\"name\":\"rgnepttwqmsniffc\",\"type\":\"mqnrojlpijnkr\"},{\"properties\":{\"ocid\":\"ddhcratizzr\",\"additionalDetails\":\"asxifto\",\"backupIpId\":\"yzhftwesgogczh\",\"backupVnic2Id\":\"nxkrlgnyhmossxkk\",\"backupVnicId\":\"h\",\"cpuCoreCount\":325722678,\"dbNodeStorageSizeInGbs\":712320662,\"dbServerId\":\"bdhqxvcxgf\",\"dbSystemId\":\"dsofbshrns\",\"faultDomain\":\"uswdv\",\"hostIpId\":\"ybycnunvj\",\"hostname\":\"tkfa\",\"lifecycleState\":\"Available\",\"lifecycleDetails\":\"qg\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":828801062,\"softwareStorageSizeInGb\":1775941190,\"timeCreated\":\"2021-02-05T08:12:45Z\",\"timeMaintenanceWindowEnd\":\"2021-09-11T06:06:10Z\",\"timeMaintenanceWindowStart\":\"2021-06-22T14:25:15Z\",\"vnic2Id\":\"jntpsewgioilqu\",\"vnicId\":\"ydxtqm\",\"provisioningState\":\"Canceled\"},\"id\":\"orgguf\",\"name\":\"yaomtb\",\"type\":\"hhavgrvkffovjz\"},{\"properties\":{\"ocid\":\"bibgjmfxumv\",\"additionalDetails\":\"luyovwxnbkfezzx\",\"backupIpId\":\"yhwzdgiruj\",\"backupVnic2Id\":\"bomvzzbtdcqv\",\"backupVnicId\":\"iyujviylwdshfs\",\"cpuCoreCount\":2141139443,\"dbNodeStorageSizeInGbs\":482373530,\"dbServerId\":\"efr\",\"dbSystemId\":\"sgaojfmwncot\",\"faultDomain\":\"fhir\",\"hostIpId\":\"ymoxoftpipiwyczu\",\"hostname\":\"a\",\"lifecycleState\":\"Provisioning\",\"lifecycleDetails\":\"lihhyuspskasdvlm\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":1752218041,\"softwareStorageSizeInGb\":1265801831,\"timeCreated\":\"2021-04-20T13:27:45Z\",\"timeMaintenanceWindowEnd\":\"2021-05-28T22:35:34Z\",\"timeMaintenanceWindowStart\":\"2021-04-02T21:01:47Z\",\"vnic2Id\":\"rsre\",\"vnicId\":\"vxurisjnhnytxifq\",\"provisioningState\":\"Failed\"},\"id\":\"mrhublwpc\",\"name\":\"sutrgjup\",\"type\":\"uutpwoqhih\"}],\"nextLink\":\"qg\"}") - .toObject(DbNodeListResult.class); - Assertions.assertEquals("qg", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodePropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodePropertiesTests.java deleted file mode 100644 index d803720ab81c..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodePropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbNodeProperties; - -public final class DbNodePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbNodeProperties model = BinaryData.fromString( - "{\"ocid\":\"dbsdshm\",\"additionalDetails\":\"maehvbbxurip\",\"backupIpId\":\"fnhtbaxkgxyw\",\"backupVnic2Id\":\"kpyklyhp\",\"backupVnicId\":\"odpvruudlgzib\",\"cpuCoreCount\":1621588970,\"dbNodeStorageSizeInGbs\":777690092,\"dbServerId\":\"ktst\",\"dbSystemId\":\"xeclzedqbcvhzlhp\",\"faultDomain\":\"dqkdlwwqfbu\",\"hostIpId\":\"kxtrq\",\"hostname\":\"smlmbtxhwgfwsrta\",\"lifecycleState\":\"Stopped\",\"lifecycleDetails\":\"zbrhubskhudyg\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":2141806180,\"softwareStorageSizeInGb\":2146938073,\"timeCreated\":\"2021-07-05T15:49:24Z\",\"timeMaintenanceWindowEnd\":\"2021-07-12T13:05:01Z\",\"timeMaintenanceWindowStart\":\"2021-03-17T22:00:43Z\",\"vnic2Id\":\"rfmluiqtq\",\"vnicId\":\"avyvnqqyba\",\"provisioningState\":\"Succeeded\"}") - .toObject(DbNodeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbNodeProperties model = new DbNodeProperties(); - model = BinaryData.fromObject(model).toObject(DbNodeProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionMockTests.java index ec81caa408d6..9873d982fe28 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionMockTests.java @@ -1,20 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.DbNode; import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; +import com.azure.resourcemanager.oracledatabase.models.DbNodeMaintenanceType; +import com.azure.resourcemanager.oracledatabase.models.DbNodeProvisioningState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -22,18 +25,42 @@ public final class DbNodesActionMockTests { @Test public void testAction() throws Exception { String responseStr - = "{\"properties\":{\"ocid\":\"hgwydyynfsv\",\"additionalDetails\":\"gbv\",\"backupIpId\":\"anarfdlpukhpyrne\",\"backupVnic2Id\":\"jcpeogkhnmg\",\"backupVnicId\":\"ouxddbhfhpfpazj\",\"cpuCoreCount\":1207242533,\"dbNodeStorageSizeInGbs\":1156977348,\"dbServerId\":\"hpdulon\",\"dbSystemId\":\"cnpqwteht\",\"faultDomain\":\"vrh\",\"hostIpId\":\"jyoogwxh\",\"hostname\":\"duugwbsre\",\"lifecycleState\":\"Failed\",\"lifecycleDetails\":\"kfuarenlv\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":1867886432,\"softwareStorageSizeInGb\":1998431294,\"timeCreated\":\"2021-02-05T00:41:51Z\",\"timeMaintenanceWindowEnd\":\"2021-09-08T16:13:33Z\",\"timeMaintenanceWindowStart\":\"2021-07-03T20:59:21Z\",\"vnic2Id\":\"f\",\"vnicId\":\"ev\",\"provisioningState\":\"Succeeded\"},\"id\":\"lcqxypokk\",\"name\":\"minqcym\",\"type\":\"zng\"}"; + = "{\"properties\":{\"ocid\":\"jutifdwfmvigorqj\",\"additionalDetails\":\"tzh\",\"backupIpId\":\"glka\",\"backupVnic2Id\":\"onqjujeickpzvcpo\",\"backupVnicId\":\"xelnwc\",\"cpuCoreCount\":1288508818,\"dbNodeStorageSizeInGbs\":130887115,\"dbServerId\":\"ex\",\"dbSystemId\":\"mlfmkqs\",\"faultDomain\":\"zuawxtzxpuamwa\",\"hostIpId\":\"xrvxcushsphai\",\"hostname\":\"xyasflvgsgzw\",\"lifecycleState\":\"Terminated\",\"lifecycleDetails\":\"koih\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":874789657,\"softwareStorageSizeInGb\":1233115603,\"timeCreated\":\"2021-04-12T17:52:43Z\",\"timeMaintenanceWindowEnd\":\"2021-02-08T01:15:15Z\",\"timeMaintenanceWindowStart\":\"2021-03-04T19:37:05Z\",\"vnic2Id\":\"ymzotqyryuzcbmq\",\"vnicId\":\"vxmvw\",\"provisioningState\":\"Succeeded\"},\"id\":\"yxonsupe\",\"name\":\"jlzqnhc\",\"type\":\"sqltnzo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DbNode response = manager.dbNodes() - .action("byrplrohkpig", "fusuckzmkwklsno", "axmqeqal", - new DbNodeAction().withAction(DbNodeActionEnum.RESET), com.azure.core.util.Context.NONE); + .action("xrizkzobgop", "lhslnelxieixyn", "lxecwcrojphslh", + new DbNodeAction().withAction(DbNodeActionEnum.STOP), com.azure.core.util.Context.NONE); + Assertions.assertEquals("jutifdwfmvigorqj", response.properties().ocid()); + Assertions.assertEquals("tzh", response.properties().additionalDetails()); + Assertions.assertEquals("glka", response.properties().backupIpId()); + Assertions.assertEquals("onqjujeickpzvcpo", response.properties().backupVnic2Id()); + Assertions.assertEquals("xelnwc", response.properties().backupVnicId()); + Assertions.assertEquals(1288508818, response.properties().cpuCoreCount()); + Assertions.assertEquals(130887115, response.properties().dbNodeStorageSizeInGbs()); + Assertions.assertEquals("ex", response.properties().dbServerId()); + Assertions.assertEquals("mlfmkqs", response.properties().dbSystemId()); + Assertions.assertEquals("zuawxtzxpuamwa", response.properties().faultDomain()); + Assertions.assertEquals("xrvxcushsphai", response.properties().hostIpId()); + Assertions.assertEquals("xyasflvgsgzw", response.properties().hostname()); + Assertions.assertEquals(DbNodeProvisioningState.TERMINATED, response.properties().lifecycleState()); + Assertions.assertEquals("koih", response.properties().lifecycleDetails()); + Assertions.assertEquals(DbNodeMaintenanceType.VMDB_REBOOT_MIGRATION, response.properties().maintenanceType()); + Assertions.assertEquals(874789657, response.properties().memorySizeInGbs()); + Assertions.assertEquals(1233115603, response.properties().softwareStorageSizeInGb()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-12T17:52:43Z"), response.properties().timeCreated()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T01:15:15Z"), + response.properties().timeMaintenanceWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T19:37:05Z"), + response.properties().timeMaintenanceWindowStart()); + Assertions.assertEquals("ymzotqyryuzcbmq", response.properties().vnic2Id()); + Assertions.assertEquals("vxmvw", response.properties().vnicId()); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesGetWithResponseMockTests.java deleted file mode 100644 index 8e3107f7fa3f..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.DbNode; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DbNodesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"ocid\":\"tkbu\",\"additionalDetails\":\"ogsf\",\"backupIpId\":\"ayiansharujtji\",\"backupVnic2Id\":\"fzyjqt\",\"backupVnicId\":\"wkpqhjpenuygbq\",\"cpuCoreCount\":800808953,\"dbNodeStorageSizeInGbs\":1833474976,\"dbServerId\":\"wv\",\"dbSystemId\":\"vcdlg\",\"faultDomain\":\"ucmfdj\",\"hostIpId\":\"laxpunj\",\"hostname\":\"kczvvita\",\"lifecycleState\":\"Stopped\",\"lifecycleDetails\":\"fcsserxhtvsox\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":1944109467,\"softwareStorageSizeInGb\":166425776,\"timeCreated\":\"2021-02-27T10:59:18Z\",\"timeMaintenanceWindowEnd\":\"2021-04-26T17:18:37Z\",\"timeMaintenanceWindowStart\":\"2021-09-18T03:06:41Z\",\"vnic2Id\":\"ruuuybnch\",\"vnicId\":\"zizoyuely\",\"provisioningState\":\"Succeeded\"},\"id\":\"nb\",\"name\":\"qyggagfl\",\"type\":\"lgmtrwahzjmucf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DbNode response = manager.dbNodes() - .getWithResponse("gtuwkff", "jk", "sysidfvclglxnf", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterMockTests.java index c1a3ce93ad62..ebed88562ee9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterMockTests.java @@ -1,19 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.DbNode; +import com.azure.resourcemanager.oracledatabase.models.DbNodeMaintenanceType; +import com.azure.resourcemanager.oracledatabase.models.DbNodeProvisioningState; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -21,17 +24,44 @@ public final class DbNodesListByCloudVmClusterMockTests { @Test public void testListByCloudVmCluster() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ocid\":\"wfepbnwgfmx\",\"additionalDetails\":\"cgbjbgdlfgt\",\"backupIpId\":\"snaquf\",\"backupVnic2Id\":\"bctqhamzjrwd\",\"backupVnicId\":\"zeqyjleziun\",\"cpuCoreCount\":822376850,\"dbNodeStorageSizeInGbs\":105350426,\"dbServerId\":\"ntkwcegy\",\"dbSystemId\":\"lbnseqac\",\"faultDomain\":\"vpilg\",\"hostIpId\":\"oq\",\"hostname\":\"gmditgueiookjbs\",\"lifecycleState\":\"Available\",\"lifecycleDetails\":\"dt\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":1267925694,\"softwareStorageSizeInGb\":1329198912,\"timeCreated\":\"2021-08-29T23:35:12Z\",\"timeMaintenanceWindowEnd\":\"2021-01-30T09:51:14Z\",\"timeMaintenanceWindowStart\":\"2021-04-06T22:02:45Z\",\"vnic2Id\":\"bnfxofvc\",\"vnicId\":\"gdirazf\",\"provisioningState\":\"Canceled\"},\"id\":\"w\",\"name\":\"bmdujtmvcopexc\",\"type\":\"jurbuhhlkyqltqsr\"}]}"; + = "{\"value\":[{\"properties\":{\"ocid\":\"o\",\"additionalDetails\":\"udcdabtqwpwyawb\",\"backupIpId\":\"sqbuc\",\"backupVnic2Id\":\"gkyexaoguy\",\"backupVnicId\":\"p\",\"cpuCoreCount\":178808534,\"dbNodeStorageSizeInGbs\":1061352715,\"dbServerId\":\"ltxijjumfqwazln\",\"dbSystemId\":\"nm\",\"faultDomain\":\"ngz\",\"hostIpId\":\"qxtbjwgnyf\",\"hostname\":\"fzsvtuikzh\",\"lifecycleState\":\"Updating\",\"lifecycleDetails\":\"glcfhmlrqryxyn\",\"maintenanceType\":\"VmdbRebootMigration\",\"memorySizeInGbs\":1242311262,\"softwareStorageSizeInGb\":1655994607,\"timeCreated\":\"2021-03-13T11:56:36Z\",\"timeMaintenanceWindowEnd\":\"2021-07-07T00:29:31Z\",\"timeMaintenanceWindowStart\":\"2020-12-31T18:39:01Z\",\"vnic2Id\":\"ptgoeiybbabp\",\"vnicId\":\"hv\",\"provisioningState\":\"Succeeded\"},\"id\":\"vntjlrigjk\",\"name\":\"kyrioovzid\",\"type\":\"xwaabzmifrygznmm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.dbNodes().listByCloudVmCluster("o", "gebx", com.azure.core.util.Context.NONE); + = manager.dbNodes().listByCloudVmCluster("ferr", "wexjkmfxapjwogq", com.azure.core.util.Context.NONE); + Assertions.assertEquals("o", response.iterator().next().properties().ocid()); + Assertions.assertEquals("udcdabtqwpwyawb", response.iterator().next().properties().additionalDetails()); + Assertions.assertEquals("sqbuc", response.iterator().next().properties().backupIpId()); + Assertions.assertEquals("gkyexaoguy", response.iterator().next().properties().backupVnic2Id()); + Assertions.assertEquals("p", response.iterator().next().properties().backupVnicId()); + Assertions.assertEquals(178808534, response.iterator().next().properties().cpuCoreCount()); + Assertions.assertEquals(1061352715, response.iterator().next().properties().dbNodeStorageSizeInGbs()); + Assertions.assertEquals("ltxijjumfqwazln", response.iterator().next().properties().dbServerId()); + Assertions.assertEquals("nm", response.iterator().next().properties().dbSystemId()); + Assertions.assertEquals("ngz", response.iterator().next().properties().faultDomain()); + Assertions.assertEquals("qxtbjwgnyf", response.iterator().next().properties().hostIpId()); + Assertions.assertEquals("fzsvtuikzh", response.iterator().next().properties().hostname()); + Assertions.assertEquals(DbNodeProvisioningState.UPDATING, + response.iterator().next().properties().lifecycleState()); + Assertions.assertEquals("glcfhmlrqryxyn", response.iterator().next().properties().lifecycleDetails()); + Assertions.assertEquals(DbNodeMaintenanceType.VMDB_REBOOT_MIGRATION, + response.iterator().next().properties().maintenanceType()); + Assertions.assertEquals(1242311262, response.iterator().next().properties().memorySizeInGbs()); + Assertions.assertEquals(1655994607, response.iterator().next().properties().softwareStorageSizeInGb()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-13T11:56:36Z"), + response.iterator().next().properties().timeCreated()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-07T00:29:31Z"), + response.iterator().next().properties().timeMaintenanceWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-31T18:39:01Z"), + response.iterator().next().properties().timeMaintenanceWindowStart()); + Assertions.assertEquals("ptgoeiybbabp", response.iterator().next().properties().vnic2Id()); + Assertions.assertEquals("hv", response.iterator().next().properties().vnicId()); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerInnerTests.java deleted file mode 100644 index ff0178e9542f..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.DbServerInner; -import com.azure.resourcemanager.oracledatabase.models.DbServerProperties; - -public final class DbServerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbServerInner model = BinaryData.fromString( - "{\"properties\":{\"ocid\":\"bt\",\"displayName\":\"flsjc\",\"compartmentId\":\"szfjvfbgofelja\",\"exadataInfrastructureId\":\"qmqhldvriii\",\"cpuCoreCount\":1756672367,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":664044730,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":\"2021-12-10T23:56:18Z\",\"timePatchingStarted\":\"2021-04-04T08:27:15Z\"},\"maxMemoryInGbs\":477043409,\"dbNodeStorageSizeInGbs\":1376433367,\"vmClusterIds\":[\"ueluqhhahhxvrhmz\",\"wpjgwws\",\"ughftqsx\",\"qxujxukndxd\"],\"dbNodeIds\":[\"jguufzdm\",\"yqtfihwh\",\"otzi\",\"gamv\"],\"lifecycleDetails\":\"ho\",\"lifecycleState\":\"Available\",\"maxCpuCount\":1534302042,\"autonomousVmClusterIds\":[\"hqamvdkf\",\"ynwcvtbv\",\"ayhmtnvyqiatkz\",\"pcnp\"],\"autonomousVirtualMachineIds\":[\"jaesgvvsccya\",\"g\",\"qfhwyg\"],\"maxDbNodeStorageInGbs\":376601626,\"memorySizeInGbs\":307379599,\"shape\":\"fxusemdwzr\",\"timeCreated\":\"2021-04-25T19:47:04Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"cqdpsqxqvpsvuoym\",\"name\":\"ccelve\",\"type\":\"rypqlmfeo\"}") - .toObject(DbServerInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbServerInner model = new DbServerInner().withProperties(new DbServerProperties()); - model = BinaryData.fromObject(model).toObject(DbServerInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerListResultTests.java deleted file mode 100644 index ca189fbe3463..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbServerListResult; -import org.junit.jupiter.api.Assertions; - -public final class DbServerListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbServerListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ocid\":\"rmrlxqtvcof\",\"displayName\":\"f\",\"compartmentId\":\"kgjubgdknnqvsazn\",\"exadataInfrastructureId\":\"tor\",\"cpuCoreCount\":761865502,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":63235261,\"patchingStatus\":\"MaintenanceInProgress\",\"timePatchingEnded\":\"2021-05-15T08:27:32Z\",\"timePatchingStarted\":\"2021-03-28T14:55:38Z\"},\"maxMemoryInGbs\":698533794,\"dbNodeStorageSizeInGbs\":1064161892,\"vmClusterIds\":[\"etaebu\",\"u\"],\"dbNodeIds\":[\"ovsm\",\"l\",\"wabm\",\"oefki\"],\"lifecycleDetails\":\"vtpuqujmqlgk\",\"lifecycleState\":\"Deleting\",\"maxCpuCount\":1252448159,\"autonomousVmClusterIds\":[\"ongbjcnt\",\"jitcjedftwwaez\"],\"autonomousVirtualMachineIds\":[\"v\",\"c\",\"zfoqouicybxar\",\"gszufoxciqopid\"],\"maxDbNodeStorageInGbs\":1543353321,\"memorySizeInGbs\":1108967269,\"shape\":\"dhkha\",\"timeCreated\":\"2021-06-05T04:56:19Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"bon\",\"name\":\"wntoegokdwbwh\",\"type\":\"szzcmrvexztv\"},{\"properties\":{\"ocid\":\"gsfraoyzkoow\",\"displayName\":\"mnguxawqaldsyu\",\"compartmentId\":\"imerqfobwyznk\",\"exadataInfrastructureId\":\"kutwpf\",\"cpuCoreCount\":237488555,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":71172193,\"patchingStatus\":\"Complete\",\"timePatchingEnded\":\"2021-10-19T10:33:06Z\",\"timePatchingStarted\":\"2021-01-13T07:02:52Z\"},\"maxMemoryInGbs\":1293750730,\"dbNodeStorageSizeInGbs\":2086518628,\"vmClusterIds\":[\"kgtdlmkkze\",\"dlhewp\",\"sdsttwvog\",\"bbejdcngqqm\"],\"dbNodeIds\":[\"ufgmjzrwrdg\",\"twaenuuzko\"],\"lifecycleDetails\":\"minrfdw\",\"lifecycleState\":\"Unavailable\",\"maxCpuCount\":1542145375,\"autonomousVmClusterIds\":[\"u\",\"efozbhdms\",\"l\",\"zqhof\"],\"autonomousVirtualMachineIds\":[\"ae\",\"u\",\"ah\",\"icslfaoq\"],\"maxDbNodeStorageInGbs\":1792279483,\"memorySizeInGbs\":580732645,\"shape\":\"halns\",\"timeCreated\":\"2021-10-08T04:07:45Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"hka\",\"name\":\"vwitqscyw\",\"type\":\"ggwoluhczb\"},{\"properties\":{\"ocid\":\"hairsbrgzdwms\",\"displayName\":\"ypqwdxggiccc\",\"compartmentId\":\"qhuexm\",\"exadataInfrastructureId\":\"tlstvlzywem\",\"cpuCoreCount\":218184123,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":1008650845,\"patchingStatus\":\"Complete\",\"timePatchingEnded\":\"2020-12-26T03:14:52Z\",\"timePatchingStarted\":\"2021-03-10T02:09:12Z\"},\"maxMemoryInGbs\":2121256273,\"dbNodeStorageSizeInGbs\":1137275627,\"vmClusterIds\":[\"gytguslfead\",\"ygqukyhejh\",\"isxgfp\",\"lolp\"],\"dbNodeIds\":[\"srp\",\"vu\"],\"lifecycleDetails\":\"raehtwdwrft\",\"lifecycleState\":\"Unavailable\",\"maxCpuCount\":1720208183,\"autonomousVmClusterIds\":[\"dl\"],\"autonomousVirtualMachineIds\":[\"hfwpracstwit\",\"khevxccedc\",\"nmdyodnwzxl\",\"jc\"],\"maxDbNodeStorageInGbs\":573145067,\"memorySizeInGbs\":139377731,\"shape\":\"ugcxnavvwxq\",\"timeCreated\":\"2021-08-20T03:09:37Z\",\"provisioningState\":\"Failed\"},\"id\":\"y\",\"name\":\"wxwlmdjrkvfgb\",\"type\":\"fvpdbo\"},{\"properties\":{\"ocid\":\"izsjqlhkrr\",\"displayName\":\"deibqip\",\"compartmentId\":\"ghvxndzwmkrefa\",\"exadataInfrastructureId\":\"jorwkqnyhgbij\",\"cpuCoreCount\":1741167059,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":2036493170,\"patchingStatus\":\"MaintenanceInProgress\",\"timePatchingEnded\":\"2021-08-16T20:44:49Z\",\"timePatchingStarted\":\"2021-01-09T22:47:33Z\"},\"maxMemoryInGbs\":804108375,\"dbNodeStorageSizeInGbs\":1037462008,\"vmClusterIds\":[\"wfsdjpvkvpbj\",\"bkzbzkd\",\"ncj\",\"budurgkakmo\"],\"dbNodeIds\":[\"jjklff\",\"mouwqlgzrfzeey\"],\"lifecycleDetails\":\"izikayuhq\",\"lifecycleState\":\"MaintenanceInProgress\",\"maxCpuCount\":1647706635,\"autonomousVmClusterIds\":[\"bqwrvtldgm\",\"pgvmpipaslthaqfx\",\"smwutwbdsrezpd\"],\"autonomousVirtualMachineIds\":[\"euyowqkd\",\"ytisibir\"],\"maxDbNodeStorageInGbs\":1229797985,\"memorySizeInGbs\":1063300853,\"shape\":\"zimejzanlfzx\",\"timeCreated\":\"2021-06-15T11:53:02Z\",\"provisioningState\":\"Canceled\"},\"id\":\"zonokixrjqci\",\"name\":\"gzpfrla\",\"type\":\"szrnwo\"}],\"nextLink\":\"ndfpwpj\"}") - .toObject(DbServerListResult.class); - Assertions.assertEquals("ndfpwpj", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerPatchingDetailsTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerPatchingDetailsTests.java deleted file mode 100644 index 250a3a233999..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerPatchingDetailsTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbServerPatchingDetails; - -public final class DbServerPatchingDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbServerPatchingDetails model = BinaryData.fromString( - "{\"estimatedPatchDuration\":46928565,\"patchingStatus\":\"Complete\",\"timePatchingEnded\":\"2021-03-15T03:06:41Z\",\"timePatchingStarted\":\"2021-06-08T06:14:34Z\"}") - .toObject(DbServerPatchingDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbServerPatchingDetails model = new DbServerPatchingDetails(); - model = BinaryData.fromObject(model).toObject(DbServerPatchingDetails.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerPropertiesTests.java deleted file mode 100644 index 3214fd46facb..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServerPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbServerProperties; - -public final class DbServerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbServerProperties model = BinaryData.fromString( - "{\"ocid\":\"rqwky\",\"displayName\":\"ob\",\"compartmentId\":\"gxedkow\",\"exadataInfrastructureId\":\"bqpc\",\"cpuCoreCount\":1318988279,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":1217910065,\"patchingStatus\":\"Complete\",\"timePatchingEnded\":\"2021-03-10T23:40:05Z\",\"timePatchingStarted\":\"2021-11-03T02:22:23Z\"},\"maxMemoryInGbs\":922836414,\"dbNodeStorageSizeInGbs\":1444149350,\"vmClusterIds\":[\"ekftnkhtj\"],\"dbNodeIds\":[\"ngwfqatm\"],\"lifecycleDetails\":\"htmdvy\",\"lifecycleState\":\"Creating\",\"maxCpuCount\":1851759881,\"autonomousVmClusterIds\":[\"zywkb\",\"rryuzhlhkjo\",\"rvqqaatj\"],\"autonomousVirtualMachineIds\":[\"vgoup\"],\"maxDbNodeStorageInGbs\":1624473251,\"memorySizeInGbs\":781426249,\"shape\":\"ggjioolvr\",\"timeCreated\":\"2021-01-31T00:57:49Z\",\"provisioningState\":\"Succeeded\"}") - .toObject(DbServerProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbServerProperties model = new DbServerProperties(); - model = BinaryData.fromObject(model).toObject(DbServerProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServersGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServersGetWithResponseMockTests.java deleted file mode 100644 index 83e402323b24..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServersGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.DbServer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DbServersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"ocid\":\"slwkojpl\",\"displayName\":\"dnpdwrpqaf\",\"compartmentId\":\"ug\",\"exadataInfrastructureId\":\"n\",\"cpuCoreCount\":1704013235,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":726955046,\"patchingStatus\":\"Complete\",\"timePatchingEnded\":\"2021-06-28T06:22:35Z\",\"timePatchingStarted\":\"2021-08-10T19:55:02Z\"},\"maxMemoryInGbs\":1099892409,\"dbNodeStorageSizeInGbs\":1575776706,\"vmClusterIds\":[\"ixr\"],\"dbNodeIds\":[\"uyturml\"],\"lifecycleDetails\":\"owolbaui\",\"lifecycleState\":\"Creating\",\"maxCpuCount\":713536788,\"autonomousVmClusterIds\":[\"zonwpngajinnixj\",\"wrtmjfjmy\",\"cxlzhcoxovnekh\",\"nlusfnrd\"],\"autonomousVirtualMachineIds\":[\"txrdcqtjvi\",\"ttgepuslvyjtcv\",\"wkasiziesf\",\"ughtuqfecjxeygtu\"],\"maxDbNodeStorageInGbs\":643622638,\"memorySizeInGbs\":1670662701,\"shape\":\"uewmrswnjlxuzrhw\",\"timeCreated\":\"2021-07-10T15:20:26Z\",\"provisioningState\":\"Canceled\"},\"id\":\"aqehg\",\"name\":\"dohzjq\",\"type\":\"tu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DbServer response = manager.dbServers() - .getWithResponse("uahokq", "obkauxofsh", "phwpnulaiywzej", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureMockTests.java index 9449f03ad17d..ae4a810eeaf2 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.DbServer; @@ -21,17 +21,17 @@ public final class DbServersListByCloudExadataInfrastructureMockTests { @Test public void testListByCloudExadataInfrastructure() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ocid\":\"ozipqwjedmurrxx\",\"displayName\":\"wpktvqylkmqpzoyh\",\"compartmentId\":\"bcg\",\"exadataInfrastructureId\":\"cloxo\",\"cpuCoreCount\":477398510,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":1567586671,\"patchingStatus\":\"MaintenanceInProgress\",\"timePatchingEnded\":\"2021-03-04T16:18:21Z\",\"timePatchingStarted\":\"2021-09-02T19:32:53Z\"},\"maxMemoryInGbs\":1159366069,\"dbNodeStorageSizeInGbs\":2022448357,\"vmClusterIds\":[\"cbahhpzpofoiy\",\"w\"],\"dbNodeIds\":[\"lkmkkholvdndvi\",\"uogphuartvtiuky\"],\"lifecycleDetails\":\"chnmna\",\"lifecycleState\":\"Unavailable\",\"maxCpuCount\":1789997323,\"autonomousVmClusterIds\":[\"jqirwrw\",\"ooxf\",\"i\"],\"autonomousVirtualMachineIds\":[\"wrsnewmozqvbu\",\"qmamhsycxhxzga\"],\"maxDbNodeStorageInGbs\":75419046,\"memorySizeInGbs\":545466012,\"shape\":\"idvmfqhppubo\",\"timeCreated\":\"2021-04-23T03:49:20Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"g\",\"name\":\"mtdherngb\",\"type\":\"c\"}]}"; + = "{\"value\":[{\"properties\":{\"ocid\":\"pndzaapmudqmeq\",\"displayName\":\"gp\",\"compartmentId\":\"udqwyxebeybpmzz\",\"exadataInfrastructureId\":\"tffyaqit\",\"cpuCoreCount\":1526292887,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":915873133,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":\"2021-04-12T16:42:18Z\",\"timePatchingStarted\":\"2021-10-28T08:21:33Z\"},\"maxMemoryInGbs\":1816331305,\"dbNodeStorageSizeInGbs\":2047907639,\"vmClusterIds\":[\"rxpdlcgqlsi\",\"mjqfrddgamquhio\",\"rsjuivfcdisyir\"],\"dbNodeIds\":[\"hcz\",\"xrxzbujrtr\",\"qvwre\",\"khgn\"],\"lifecycleDetails\":\"zonzlrpiqywnc\",\"lifecycleState\":\"MaintenanceInProgress\",\"maxCpuCount\":162010613,\"autonomousVmClusterIds\":[\"fizehtdhgbjk\",\"reljeamur\",\"zmlovuanash\"],\"autonomousVirtualMachineIds\":[\"pmjerbdkelvidiz\",\"zsdbccxjmon\"],\"maxDbNodeStorageInGbs\":1268563330,\"memorySizeInGbs\":164017855,\"shape\":\"cypuuwwlt\",\"timeCreated\":\"2021-11-20T18:00Z\",\"provisioningState\":\"Succeeded\",\"computeModel\":\"OCPU\"},\"id\":\"nkeifz\",\"name\":\"hmkdasvfl\",\"type\":\"hbxcu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dbServers() - .listByCloudExadataInfrastructure("neiknpg", "xgjiuqh", com.azure.core.util.Context.NONE); + .listByCloudExadataInfrastructure("xnmwmqtibxyijddt", "qcttadijaeukmrsi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapeInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapeInnerTests.java deleted file mode 100644 index ed2239ad9531..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapeInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.DbSystemShapeInner; -import com.azure.resourcemanager.oracledatabase.models.DbSystemShapeProperties; - -public final class DbSystemShapeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbSystemShapeInner model = BinaryData.fromString( - "{\"properties\":{\"shapeFamily\":\"uaejxdultsk\",\"availableCoreCount\":618241707,\"minimumCoreCount\":31117438,\"runtimeMinimumCoreCount\":1777523774,\"coreCountIncrement\":1391640173,\"minStorageCount\":794147493,\"maxStorageCount\":583849936,\"availableDataStoragePerServerInTbs\":41.73994723431085,\"availableMemoryPerNodeInGbs\":311434030,\"availableDbNodePerNodeInGbs\":1290652027,\"minCoreCountPerNode\":102600378,\"availableMemoryInGbs\":1718146302,\"minMemoryPerNodeInGbs\":820009390,\"availableDbNodeStorageInGbs\":205303620,\"minDbNodeStoragePerNodeInGbs\":373368118,\"availableDataStorageInTbs\":519560547,\"minDataStorageInTbs\":522774709,\"minimumNodeCount\":1856979158,\"maximumNodeCount\":1422945070,\"availableCoreCountPerNode\":1252528512},\"id\":\"boekqvkel\",\"name\":\"smv\",\"type\":\"xwyjsflhhc\"}") - .toObject(DbSystemShapeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbSystemShapeInner model = new DbSystemShapeInner().withProperties(new DbSystemShapeProperties()); - model = BinaryData.fromObject(model).toObject(DbSystemShapeInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapeListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapeListResultTests.java deleted file mode 100644 index affa663b98e6..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapeListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbSystemShapeListResult; -import org.junit.jupiter.api.Assertions; - -public final class DbSystemShapeListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbSystemShapeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"shapeFamily\":\"t\",\"availableCoreCount\":1491290789,\"minimumCoreCount\":777481009,\"runtimeMinimumCoreCount\":1258750458,\"coreCountIncrement\":1397437100,\"minStorageCount\":1232796575,\"maxStorageCount\":1519275761,\"availableDataStoragePerServerInTbs\":54.5079147632145,\"availableMemoryPerNodeInGbs\":1214313613,\"availableDbNodePerNodeInGbs\":1999029226,\"minCoreCountPerNode\":350152394,\"availableMemoryInGbs\":1115460475,\"minMemoryPerNodeInGbs\":580617744,\"availableDbNodeStorageInGbs\":1773507503,\"minDbNodeStoragePerNodeInGbs\":957944639,\"availableDataStorageInTbs\":1672254683,\"minDataStorageInTbs\":2086388671,\"minimumNodeCount\":351214213,\"maximumNodeCount\":2051758056,\"availableCoreCountPerNode\":1378087535},\"id\":\"bp\",\"name\":\"xqpsrknftguv\",\"type\":\"iuhprwmdyvxqta\"},{\"properties\":{\"shapeFamily\":\"ww\",\"availableCoreCount\":1692678524,\"minimumCoreCount\":1731999756,\"runtimeMinimumCoreCount\":1603221085,\"coreCountIncrement\":591654502,\"minStorageCount\":1070859381,\"maxStorageCount\":75631080,\"availableDataStoragePerServerInTbs\":81.21344104639293,\"availableMemoryPerNodeInGbs\":934632065,\"availableDbNodePerNodeInGbs\":988905675,\"minCoreCountPerNode\":2121055666,\"availableMemoryInGbs\":841332893,\"minMemoryPerNodeInGbs\":1391032405,\"availableDbNodeStorageInGbs\":1995543121,\"minDbNodeStoragePerNodeInGbs\":488274582,\"availableDataStorageInTbs\":673503494,\"minDataStorageInTbs\":2048055130,\"minimumNodeCount\":1125430045,\"maximumNodeCount\":1715507551,\"availableCoreCountPerNode\":1436102139},\"id\":\"zcjrvxdjzlmwlx\",\"name\":\"vu\",\"type\":\"fhzovawjvzunluth\"}],\"nextLink\":\"prnxipeil\"}") - .toObject(DbSystemShapeListResult.class); - Assertions.assertEquals("prnxipeil", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapePropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapePropertiesTests.java deleted file mode 100644 index 2e0c5736b0c3..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapePropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbSystemShapeProperties; - -public final class DbSystemShapePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DbSystemShapeProperties model = BinaryData.fromString( - "{\"shapeFamily\":\"lnjixisxya\",\"availableCoreCount\":1486510526,\"minimumCoreCount\":347364157,\"runtimeMinimumCoreCount\":1772436776,\"coreCountIncrement\":1260853084,\"minStorageCount\":2113030944,\"maxStorageCount\":2033382031,\"availableDataStoragePerServerInTbs\":91.76297293138525,\"availableMemoryPerNodeInGbs\":983085062,\"availableDbNodePerNodeInGbs\":1211885049,\"minCoreCountPerNode\":1066317539,\"availableMemoryInGbs\":643892740,\"minMemoryPerNodeInGbs\":712721872,\"availableDbNodeStorageInGbs\":462425094,\"minDbNodeStoragePerNodeInGbs\":417791826,\"availableDataStorageInTbs\":644635434,\"minDataStorageInTbs\":1975568377,\"minimumNodeCount\":1201064167,\"maximumNodeCount\":681203122,\"availableCoreCountPerNode\":245214837}") - .toObject(DbSystemShapeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DbSystemShapeProperties model = new DbSystemShapeProperties(); - model = BinaryData.fromObject(model).toObject(DbSystemShapeProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesGetWithResponseMockTests.java deleted file mode 100644 index c9ea93692669..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.DbSystemShape; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DbSystemShapesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"shapeFamily\":\"puamwabzxr\",\"availableCoreCount\":833077123,\"minimumCoreCount\":38828648,\"runtimeMinimumCoreCount\":1690394983,\"coreCountIncrement\":1307782506,\"minStorageCount\":35510152,\"maxStorageCount\":1111352078,\"availableDataStoragePerServerInTbs\":70.60563316529131,\"availableMemoryPerNodeInGbs\":666736445,\"availableDbNodePerNodeInGbs\":1805110370,\"minCoreCountPerNode\":1652128908,\"availableMemoryInGbs\":1789512101,\"minMemoryPerNodeInGbs\":2030396621,\"availableDbNodeStorageInGbs\":836787788,\"minDbNodeStoragePerNodeInGbs\":298842617,\"availableDataStorageInTbs\":2041222733,\"minDataStorageInTbs\":1347441076,\"minimumNodeCount\":639113448,\"maximumNodeCount\":1453718102,\"availableCoreCountPerNode\":696339926},\"id\":\"jhlnymzotqyryu\",\"name\":\"cbm\",\"type\":\"qvx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DbSystemShape response = manager.dbSystemShapes() - .getWithResponse("mlfmkqs", "azuawx", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationMockTests.java index 25313ffaf17b..966cfe279f41 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationMockTests.java @@ -1,19 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; +import com.azure.resourcemanager.oracledatabase.models.ComputeModel; import com.azure.resourcemanager.oracledatabase.models.DbSystemShape; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -21,17 +23,42 @@ public final class DbSystemShapesListByLocationMockTests { @Test public void testListByLocation() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"shapeFamily\":\"u\",\"availableCoreCount\":1033844337,\"minimumCoreCount\":904578774,\"runtimeMinimumCoreCount\":636393326,\"coreCountIncrement\":1801427646,\"minStorageCount\":599043237,\"maxStorageCount\":342779147,\"availableDataStoragePerServerInTbs\":97.73447564067305,\"availableMemoryPerNodeInGbs\":400681699,\"availableDbNodePerNodeInGbs\":1175106778,\"minCoreCountPerNode\":864075629,\"availableMemoryInGbs\":2001173638,\"minMemoryPerNodeInGbs\":1981328937,\"availableDbNodeStorageInGbs\":1991738571,\"minDbNodeStoragePerNodeInGbs\":1272146098,\"availableDataStorageInTbs\":1776698371,\"minDataStorageInTbs\":1352761194,\"minimumNodeCount\":1513896325,\"maximumNodeCount\":1557012856,\"availableCoreCountPerNode\":1956173646},\"id\":\"p\",\"name\":\"pmxelnwcltyje\",\"type\":\"ex\"}]}"; + = "{\"value\":[{\"properties\":{\"shapeFamily\":\"aylp\",\"shapeName\":\"rsqqwztcm\",\"availableCoreCount\":544384144,\"minimumCoreCount\":899185817,\"runtimeMinimumCoreCount\":96806467,\"coreCountIncrement\":425084059,\"minStorageCount\":719164524,\"maxStorageCount\":307394034,\"availableDataStoragePerServerInTbs\":67.57833265628484,\"availableMemoryPerNodeInGbs\":410402456,\"availableDbNodePerNodeInGbs\":747482669,\"minCoreCountPerNode\":1559049034,\"availableMemoryInGbs\":1859736200,\"minMemoryPerNodeInGbs\":207202962,\"availableDbNodeStorageInGbs\":1342941735,\"minDbNodeStoragePerNodeInGbs\":1297569440,\"availableDataStorageInTbs\":660736772,\"minDataStorageInTbs\":2021763833,\"minimumNodeCount\":1992665604,\"maximumNodeCount\":127913719,\"availableCoreCountPerNode\":919245965,\"computeModel\":\"ECPU\",\"areServerTypesSupported\":true,\"displayName\":\"gywwpgjxs\"},\"id\":\"tf\",\"name\":\"jgicgaao\",\"type\":\"pttaqutd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.dbSystemShapes().listByLocation("ojphslhc", com.azure.core.util.Context.NONE); + = manager.dbSystemShapes().listByLocation("fwyfwlwxjwet", "psihcla", com.azure.core.util.Context.NONE); + Assertions.assertEquals("aylp", response.iterator().next().properties().shapeFamily()); + Assertions.assertEquals("rsqqwztcm", response.iterator().next().properties().shapeName()); + Assertions.assertEquals(544384144, response.iterator().next().properties().availableCoreCount()); + Assertions.assertEquals(899185817, response.iterator().next().properties().minimumCoreCount()); + Assertions.assertEquals(96806467, response.iterator().next().properties().runtimeMinimumCoreCount()); + Assertions.assertEquals(425084059, response.iterator().next().properties().coreCountIncrement()); + Assertions.assertEquals(719164524, response.iterator().next().properties().minStorageCount()); + Assertions.assertEquals(307394034, response.iterator().next().properties().maxStorageCount()); + Assertions.assertEquals(67.57833265628484D, + response.iterator().next().properties().availableDataStoragePerServerInTbs()); + Assertions.assertEquals(410402456, response.iterator().next().properties().availableMemoryPerNodeInGbs()); + Assertions.assertEquals(747482669, response.iterator().next().properties().availableDbNodePerNodeInGbs()); + Assertions.assertEquals(1559049034, response.iterator().next().properties().minCoreCountPerNode()); + Assertions.assertEquals(1859736200, response.iterator().next().properties().availableMemoryInGbs()); + Assertions.assertEquals(207202962, response.iterator().next().properties().minMemoryPerNodeInGbs()); + Assertions.assertEquals(1342941735, response.iterator().next().properties().availableDbNodeStorageInGbs()); + Assertions.assertEquals(1297569440, response.iterator().next().properties().minDbNodeStoragePerNodeInGbs()); + Assertions.assertEquals(660736772, response.iterator().next().properties().availableDataStorageInTbs()); + Assertions.assertEquals(2021763833, response.iterator().next().properties().minDataStorageInTbs()); + Assertions.assertEquals(1992665604, response.iterator().next().properties().minimumNodeCount()); + Assertions.assertEquals(127913719, response.iterator().next().properties().maximumNodeCount()); + Assertions.assertEquals(919245965, response.iterator().next().properties().availableCoreCountPerNode()); + Assertions.assertEquals(ComputeModel.ECPU, response.iterator().next().properties().computeModel()); + Assertions.assertTrue(response.iterator().next().properties().areServerTypesSupported()); + Assertions.assertEquals("gywwpgjxs", response.iterator().next().properties().displayName()); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewInnerTests.java deleted file mode 100644 index fb4f0646d4ee..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.DnsPrivateViewInner; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateViewProperties; - -public final class DnsPrivateViewInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsPrivateViewInner model = BinaryData.fromString( - "{\"properties\":{\"ocid\":\"n\",\"displayName\":\"ewgdrjervn\",\"isProtected\":false,\"lifecycleState\":\"Deleting\",\"self\":\"hin\",\"timeCreated\":\"2021-07-07T21:20Z\",\"timeUpdated\":\"2021-07-26T04:46:18Z\",\"provisioningState\":\"Failed\"},\"id\":\"hnzdndslgnayqi\",\"name\":\"ynduha\",\"type\":\"hqlkthumaqo\"}") - .toObject(DnsPrivateViewInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsPrivateViewInner model = new DnsPrivateViewInner().withProperties(new DnsPrivateViewProperties()); - model = BinaryData.fromObject(model).toObject(DnsPrivateViewInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewListResultTests.java deleted file mode 100644 index 64794b19f09a..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateViewListResult; -import org.junit.jupiter.api.Assertions; - -public final class DnsPrivateViewListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsPrivateViewListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ocid\":\"ulppggdtpnapnyir\",\"displayName\":\"uhpigvp\",\"isProtected\":false,\"lifecycleState\":\"Deleted\",\"self\":\"itxmedjvcslynqww\",\"timeCreated\":\"2021-09-17T17:00:46Z\",\"timeUpdated\":\"2021-06-21T03:07:03Z\",\"provisioningState\":\"Failed\"},\"id\":\"ktrmgucnapkt\",\"name\":\"oellwp\",\"type\":\"fdygpfqbuaceopz\"},{\"properties\":{\"ocid\":\"hhuao\",\"displayName\":\"pcqeqx\",\"isProtected\":false,\"lifecycleState\":\"Deleting\",\"self\":\"zxctobgb\",\"timeCreated\":\"2021-08-02T23:16:03Z\",\"timeUpdated\":\"2021-01-09T02:06:20Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"stmgrcfbunrmfqjh\",\"name\":\"kxbpvj\",\"type\":\"mjh\"},{\"properties\":{\"ocid\":\"yngudivk\",\"displayName\":\"swbxqz\",\"isProtected\":false,\"lifecycleState\":\"Deleting\",\"self\":\"uvjfdxxive\",\"timeCreated\":\"2021-08-28T01:45:57Z\",\"timeUpdated\":\"2021-02-03T22:58:32Z\",\"provisioningState\":\"Failed\"},\"id\":\"doqmcbxvwvxys\",\"name\":\"qbhsfxobl\",\"type\":\"tkblmpewww\"},{\"properties\":{\"ocid\":\"rvrnsvshqjohxc\",\"displayName\":\"bfovasrruvwbhsq\",\"isProtected\":true,\"lifecycleState\":\"Deleting\",\"self\":\"jbi\",\"timeCreated\":\"2021-07-08T11:15:33Z\",\"timeUpdated\":\"2021-09-14T01:07:05Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"fbjfdtwssotftpvj\",\"name\":\"bexilzznfqqnv\",\"type\":\"pmqtaru\"}],\"nextLink\":\"jmkcjhwqytj\"}") - .toObject(DnsPrivateViewListResult.class); - Assertions.assertEquals("jmkcjhwqytj", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewPropertiesTests.java deleted file mode 100644 index 0783a67ffbc4..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateViewProperties; - -public final class DnsPrivateViewPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsPrivateViewProperties model = BinaryData.fromString( - "{\"ocid\":\"gycdu\",\"displayName\":\"r\",\"isProtected\":true,\"lifecycleState\":\"Active\",\"self\":\"vaolpsslqlf\",\"timeCreated\":\"2021-06-04T22:42Z\",\"timeUpdated\":\"2021-07-12T23:59:17Z\",\"provisioningState\":\"Canceled\"}") - .toObject(DnsPrivateViewProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsPrivateViewProperties model = new DnsPrivateViewProperties(); - model = BinaryData.fromObject(model).toObject(DnsPrivateViewProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsGetWithResponseMockTests.java deleted file mode 100644 index 0cf6f9faedd1..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateView; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsPrivateViewsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"ocid\":\"ihebwtsw\",\"displayName\":\"uwfmduragegizvc\",\"isProtected\":false,\"lifecycleState\":\"Deleted\",\"self\":\"djub\",\"timeCreated\":\"2021-08-20T01:19:46Z\",\"timeUpdated\":\"2021-06-04T17:20:40Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"kbsazgak\",\"name\":\"acy\",\"type\":\"cmjdmspof\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DnsPrivateView response = manager.dnsPrivateViews() - .getWithResponse("pofvwb", "blembnkbwvqvxkd", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsListByLocationMockTests.java deleted file mode 100644 index 1af888865c67..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateViewsListByLocationMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateView; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsPrivateViewsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"ocid\":\"yxonsupe\",\"displayName\":\"lzqnhcvs\",\"isProtected\":true,\"lifecycleState\":\"Deleted\",\"self\":\"ibg\",\"timeCreated\":\"2021-02-11T13:30:21Z\",\"timeUpdated\":\"2021-03-11T11:00:33Z\",\"provisioningState\":\"Canceled\"},\"id\":\"onmpqoxwdof\",\"name\":\"bxiqxeiiqbimht\",\"type\":\"wwinhehf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.dnsPrivateViews().listByLocation("vwf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZoneInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZoneInnerTests.java deleted file mode 100644 index 0a638dd8aa33..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZoneInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.DnsPrivateZoneInner; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateZoneProperties; - -public final class DnsPrivateZoneInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsPrivateZoneInner model = BinaryData.fromString( - "{\"properties\":{\"ocid\":\"u\",\"isProtected\":false,\"lifecycleState\":\"Updating\",\"self\":\"ttdumorppxebmnzb\",\"serial\":1717455223,\"version\":\"pglkf\",\"viewId\":\"hdneuelfph\",\"zoneType\":\"Secondary\",\"timeCreated\":\"2021-11-22T01:42:51Z\",\"provisioningState\":\"Failed\"},\"id\":\"ikdowwquuvx\",\"name\":\"xclvit\",\"type\":\"hqzonosggbhcoh\"}") - .toObject(DnsPrivateZoneInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsPrivateZoneInner model = new DnsPrivateZoneInner().withProperties(new DnsPrivateZoneProperties()); - model = BinaryData.fromObject(model).toObject(DnsPrivateZoneInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZoneListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZoneListResultTests.java deleted file mode 100644 index 1daa7ea3f387..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZoneListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateZoneListResult; -import org.junit.jupiter.api.Assertions; - -public final class DnsPrivateZoneListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsPrivateZoneListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ocid\":\"swiydmcwyhzdx\",\"isProtected\":true,\"lifecycleState\":\"Active\",\"self\":\"mnvdfzn\",\"serial\":451636387,\"version\":\"dvxzbncblylpst\",\"viewId\":\"hh\",\"zoneType\":\"Secondary\",\"timeCreated\":\"2021-04-01T15:36:07Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"erscdntne\",\"name\":\"fiwjmygtdssls\",\"type\":\"tmweriofzpyq\"},{\"properties\":{\"ocid\":\"wab\",\"isProtected\":true,\"lifecycleState\":\"Deleting\",\"self\":\"szhedplvw\",\"serial\":523277944,\"version\":\"mwmbes\",\"viewId\":\"nkww\",\"zoneType\":\"Secondary\",\"timeCreated\":\"2021-05-13T14:02:05Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"ogaok\",\"name\":\"nzmnsikvm\",\"type\":\"qzeqqkdltfzxm\"},{\"properties\":{\"ocid\":\"hgure\",\"isProtected\":true,\"lifecycleState\":\"Active\",\"self\":\"dagxtibqd\",\"serial\":1020209011,\"version\":\"akbogqxndlkzgxh\",\"viewId\":\"iplbpodxunkbebxm\",\"zoneType\":\"Primary\",\"timeCreated\":\"2021-12-05T13:10:34Z\",\"provisioningState\":\"Canceled\"},\"id\":\"rbqtkoie\",\"name\":\"seotgqrllt\",\"type\":\"u\"}],\"nextLink\":\"auwzizxbmpgc\"}") - .toObject(DnsPrivateZoneListResult.class); - Assertions.assertEquals("auwzizxbmpgc", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonePropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonePropertiesTests.java deleted file mode 100644 index 2de9edeb1063..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonePropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateZoneProperties; - -public final class DnsPrivateZonePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DnsPrivateZoneProperties model = BinaryData.fromString( - "{\"ocid\":\"dsjnka\",\"isProtected\":true,\"lifecycleState\":\"Updating\",\"self\":\"swacffgdkzz\",\"serial\":1258640156,\"version\":\"vhqcrail\",\"viewId\":\"n\",\"zoneType\":\"Secondary\",\"timeCreated\":\"2021-10-20T12:14:16Z\",\"provisioningState\":\"Canceled\"}") - .toObject(DnsPrivateZoneProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DnsPrivateZoneProperties model = new DnsPrivateZoneProperties(); - model = BinaryData.fromObject(model).toObject(DnsPrivateZoneProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesGetWithResponseMockTests.java deleted file mode 100644 index c85b65554589..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateZone; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsPrivateZonesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"ocid\":\"aylp\",\"isProtected\":false,\"lifecycleState\":\"Deleted\",\"self\":\"ztcmwq\",\"serial\":1039431205,\"version\":\"xwaxfewzjkj\",\"viewId\":\"fdeqvhpsyl\",\"zoneType\":\"Primary\",\"timeCreated\":\"2021-03-18T21:28:39Z\",\"provisioningState\":\"Failed\"},\"id\":\"mbmxzjrgywwpgj\",\"name\":\"snptfujgicgaao\",\"type\":\"pttaqutd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DnsPrivateZone response = manager.dnsPrivateZones() - .getWithResponse("fwyfwlwxjwet", "psihcla", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/EstimatedPatchingTimeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/EstimatedPatchingTimeTests.java deleted file mode 100644 index f1506ccba63b..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/EstimatedPatchingTimeTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.EstimatedPatchingTime; - -public final class EstimatedPatchingTimeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EstimatedPatchingTime model = BinaryData.fromString( - "{\"estimatedDbServerPatchingTime\":1492267323,\"estimatedNetworkSwitchesPatchingTime\":920557084,\"estimatedStorageServerPatchingTime\":223779123,\"totalEstimatedPatchingTime\":1058497011}") - .toObject(EstimatedPatchingTime.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedPatchingTime model = new EstimatedPatchingTime(); - model = BinaryData.fromObject(model).toObject(EstimatedPatchingTime.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExadataIormConfigTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExadataIormConfigTests.java deleted file mode 100644 index 8a9949b36738..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExadataIormConfigTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DbIormConfig; -import com.azure.resourcemanager.oracledatabase.models.ExadataIormConfig; -import com.azure.resourcemanager.oracledatabase.models.IormLifecycleState; -import com.azure.resourcemanager.oracledatabase.models.Objective; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExadataIormConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExadataIormConfig model = BinaryData.fromString( - "{\"dbPlans\":[{\"dbName\":\"bzpfzab\",\"flashCacheLimit\":\"cuh\",\"share\":1070511980},{\"dbName\":\"tyq\",\"flashCacheLimit\":\"lbbovplw\",\"share\":869574502},{\"dbName\":\"gy\",\"flashCacheLimit\":\"uosvmkfssxqukk\",\"share\":89011603}],\"lifecycleDetails\":\"mg\",\"lifecycleState\":\"Updating\",\"objective\":\"LowLatency\"}") - .toObject(ExadataIormConfig.class); - Assertions.assertEquals("bzpfzab", model.dbPlans().get(0).dbName()); - Assertions.assertEquals("cuh", model.dbPlans().get(0).flashCacheLimit()); - Assertions.assertEquals(1070511980, model.dbPlans().get(0).share()); - Assertions.assertEquals("mg", model.lifecycleDetails()); - Assertions.assertEquals(IormLifecycleState.UPDATING, model.lifecycleState()); - Assertions.assertEquals(Objective.LOW_LATENCY, model.objective()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExadataIormConfig model = new ExadataIormConfig() - .withDbPlans( - Arrays.asList(new DbIormConfig().withDbName("bzpfzab").withFlashCacheLimit("cuh").withShare(1070511980), - new DbIormConfig().withDbName("tyq").withFlashCacheLimit("lbbovplw").withShare(869574502), - new DbIormConfig().withDbName("gy").withFlashCacheLimit("uosvmkfssxqukk").withShare(89011603))) - .withLifecycleDetails("mg") - .withLifecycleState(IormLifecycleState.UPDATING) - .withObjective(Objective.LOW_LATENCY); - model = BinaryData.fromObject(model).toObject(ExadataIormConfig.class); - Assertions.assertEquals("bzpfzab", model.dbPlans().get(0).dbName()); - Assertions.assertEquals("cuh", model.dbPlans().get(0).flashCacheLimit()); - Assertions.assertEquals(1070511980, model.dbPlans().get(0).share()); - Assertions.assertEquals("mg", model.lifecycleDetails()); - Assertions.assertEquals(IormLifecycleState.UPDATING, model.lifecycleState()); - Assertions.assertEquals(Objective.LOW_LATENCY, model.objective()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesActionMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesActionMockTests.java new file mode 100644 index 000000000000..705e4a473a6e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesActionMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; +import com.azure.resourcemanager.oracledatabase.models.AzureResourceProvisioningState; +import com.azure.resourcemanager.oracledatabase.models.DbActionResponse; +import com.azure.resourcemanager.oracledatabase.models.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExascaleDbNodesActionMockTests { + @Test + public void testAction() throws Exception { + String responseStr = "{\"provisioningState\":\"Provisioning\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + OracleDatabaseManager manager = OracleDatabaseManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + DbActionResponse response = manager.exascaleDbNodes() + .action("qgvriibakcla", "jfrnxousxauzlwv", "gmwohqfzizvu", + new DbNodeAction().withAction(DbNodeActionEnum.RESET), com.azure.core.util.Context.NONE); + + Assertions.assertEquals(AzureResourceProvisioningState.PROVISIONING, response.provisioningState()); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesListByParentMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesListByParentMockTests.java new file mode 100644 index 000000000000..ddaec09cac73 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesListByParentMockTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; +import com.azure.resourcemanager.oracledatabase.models.DbNodeProvisioningState; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNode; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExascaleDbNodesListByParentMockTests { + @Test + public void testListByParent() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"ocid\":\"qmhhaowj\",\"additionalDetails\":\"zvuporqzdfuydz\",\"cpuCoreCount\":1315004545,\"dbNodeStorageSizeInGbs\":2093879286,\"faultDomain\":\"nq\",\"hostname\":\"qpswokmvkhlggdhb\",\"lifecycleState\":\"Available\",\"maintenanceType\":\"kzsz\",\"memorySizeInGbs\":1246630549,\"softwareStorageSizeInGb\":1115368168,\"timeMaintenanceWindowEnd\":\"2021-02-07T23:21:28Z\",\"timeMaintenanceWindowStart\":\"2021-01-03T15:00:11Z\",\"totalCpuCoreCount\":893154355},\"id\":\"fpgpicrmnzhrgm\",\"name\":\"gjsxv\",\"type\":\"qcbfrmbodths\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + OracleDatabaseManager manager = OracleDatabaseManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.exascaleDbNodes().listByParent("idibgqjxgpn", "hgovfgp", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("qmhhaowj", response.iterator().next().properties().ocid()); + Assertions.assertEquals("zvuporqzdfuydz", response.iterator().next().properties().additionalDetails()); + Assertions.assertEquals(1315004545, response.iterator().next().properties().cpuCoreCount()); + Assertions.assertEquals(2093879286, response.iterator().next().properties().dbNodeStorageSizeInGbs()); + Assertions.assertEquals("nq", response.iterator().next().properties().faultDomain()); + Assertions.assertEquals("qpswokmvkhlggdhb", response.iterator().next().properties().hostname()); + Assertions.assertEquals(DbNodeProvisioningState.AVAILABLE, + response.iterator().next().properties().lifecycleState()); + Assertions.assertEquals("kzsz", response.iterator().next().properties().maintenanceType()); + Assertions.assertEquals(1246630549, response.iterator().next().properties().memorySizeInGbs()); + Assertions.assertEquals(1115368168, response.iterator().next().properties().softwareStorageSizeInGb()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-07T23:21:28Z"), + response.iterator().next().properties().timeMaintenanceWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-03T15:00:11Z"), + response.iterator().next().properties().timeMaintenanceWindowStart()); + Assertions.assertEquals(893154355, response.iterator().next().properties().totalCpuCoreCount()); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsCreateMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsCreateMockTests.java new file mode 100644 index 000000000000..894c7191be2d --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsCreateMockTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageInputDetails; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVaultProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExascaleDbStorageVaultsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"additionalFlashCacheInPercent\":1782066464,\"description\":\"hjpenuygbq\",\"displayName\":\"qqekewvnqvcdlgu\",\"highCapacityDatabaseStorageInput\":{\"totalSizeInGbs\":1458855216},\"highCapacityDatabaseStorage\":{\"availableSizeInGbs\":233622712,\"totalSizeInGbs\":1412442415},\"timeZone\":\"nlaxpunjqikcz\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Failed\",\"lifecycleDetails\":\"gx\",\"vmClusterCount\":1933401870,\"ocid\":\"serxht\",\"ociUrl\":\"oxhlw\"},\"zones\":[\"j\",\"qrsxyp\",\"uuuybnchrsziz\"],\"location\":\"uelyetndn\",\"tags\":{\"wahzjmucftbyr\":\"yggagflnlgmt\",\"fusuckzmkwklsno\":\"lrohkpig\"},\"id\":\"axmqeqal\",\"name\":\"hjnhgwydyynfsvk\",\"type\":\"gbv\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + OracleDatabaseManager manager = OracleDatabaseManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ExascaleDbStorageVault response = manager.exascaleDbStorageVaults() + .define("ueio") + .withRegion("ijtk") + .withExistingResourceGroup("uooqjagmdit") + .withTags(mapOf("haru", "qogsfikayian")) + .withProperties(new ExascaleDbStorageVaultProperties().withAdditionalFlashCacheInPercent(1749280590) + .withDescription("ahrtdtpdelqacslm") + .withDisplayName("toebnf") + .withHighCapacityDatabaseStorageInput(new ExascaleDbStorageInputDetails().withTotalSizeInGbs(49810118)) + .withTimeZone("dirazf")) + .withZones(Arrays.asList("ktsysidfvclglxn")) + .create(); + + Assertions.assertEquals("uelyetndn", response.location()); + Assertions.assertEquals("yggagflnlgmt", response.tags().get("wahzjmucftbyr")); + Assertions.assertEquals(1782066464, response.properties().additionalFlashCacheInPercent()); + Assertions.assertEquals("hjpenuygbq", response.properties().description()); + Assertions.assertEquals("qqekewvnqvcdlgu", response.properties().displayName()); + Assertions.assertEquals(1458855216, response.properties().highCapacityDatabaseStorageInput().totalSizeInGbs()); + Assertions.assertEquals("nlaxpunjqikcz", response.properties().timeZone()); + Assertions.assertEquals("j", response.zones().get(0)); + } + + // Use "Map.of" if available + @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/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsGetByResourceGroupWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 000000000000..fe7b5e6815ae --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExascaleDbStorageVaultsGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"additionalFlashCacheInPercent\":456926110,\"description\":\"cfotangcfhnykzcu\",\"displayName\":\"swvxwlmzqwmv\",\"highCapacityDatabaseStorageInput\":{\"totalSizeInGbs\":1608101442},\"highCapacityDatabaseStorage\":{\"availableSizeInGbs\":1833785766,\"totalSizeInGbs\":321240578},\"timeZone\":\"uqudtcvclxyn\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"lifecycleDetails\":\"abuiy\",\"vmClusterCount\":214346592,\"ocid\":\"zphdugneiknp\",\"ociUrl\":\"xgjiuqh\"},\"zones\":[\"ozipqwjedmurrxx\",\"ewpktvqy\"],\"location\":\"mqpzoyhlfbcgw\",\"tags\":{\"jipnwj\":\"oxoebqi\",\"zpofoiyjwpfilk\":\"ujqlafcbahh\",\"ogphuartvtiu\":\"kkholvdndvia\"},\"id\":\"yefchnm\",\"name\":\"ahmnxhkxjqirw\",\"type\":\"weooxffifhxwrs\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + OracleDatabaseManager manager = OracleDatabaseManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ExascaleDbStorageVault response = manager.exascaleDbStorageVaults() + .getByResourceGroupWithResponse("jsvthnwpzteko", "mribiat", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("mqpzoyhlfbcgw", response.location()); + Assertions.assertEquals("oxoebqi", response.tags().get("jipnwj")); + Assertions.assertEquals(456926110, response.properties().additionalFlashCacheInPercent()); + Assertions.assertEquals("cfotangcfhnykzcu", response.properties().description()); + Assertions.assertEquals("swvxwlmzqwmv", response.properties().displayName()); + Assertions.assertEquals(1608101442, response.properties().highCapacityDatabaseStorageInput().totalSizeInGbs()); + Assertions.assertEquals("uqudtcvclxyn", response.properties().timeZone()); + Assertions.assertEquals("ozipqwjedmurrxx", response.zones().get(0)); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListByResourceGroupMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListByResourceGroupMockTests.java new file mode 100644 index 000000000000..989cedd5b604 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListByResourceGroupMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExascaleDbStorageVaultsListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"additionalFlashCacheInPercent\":1359553105,\"description\":\"hsycxhxzgaz\",\"displayName\":\"taboidvmf\",\"highCapacityDatabaseStorageInput\":{\"totalSizeInGbs\":1970077416},\"highCapacityDatabaseStorage\":{\"availableSizeInGbs\":926086414,\"totalSizeInGbs\":1895248762},\"timeZone\":\"sepdfgk\",\"provisioningState\":\"Canceled\",\"lifecycleState\":\"Available\",\"lifecycleDetails\":\"ngb\",\"vmClusterCount\":151823445,\"ocid\":\"ahokqtobkauxofsh\",\"ociUrl\":\"hwpnulaiywzejywh\"},\"zones\":[\"koj\",\"llndnpd\",\"rpqaf\"],\"location\":\"ug\",\"tags\":{\"ypococtfjgtixr\":\"fhyete\"},\"id\":\"vzuyturmlmu\",\"name\":\"wolba\",\"type\":\"iropionszon\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + OracleDatabaseManager manager = OracleDatabaseManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.exascaleDbStorageVaults().listByResourceGroup("ewmozqvbu", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ug", response.iterator().next().location()); + Assertions.assertEquals("fhyete", response.iterator().next().tags().get("ypococtfjgtixr")); + Assertions.assertEquals(1359553105, response.iterator().next().properties().additionalFlashCacheInPercent()); + Assertions.assertEquals("hsycxhxzgaz", response.iterator().next().properties().description()); + Assertions.assertEquals("taboidvmf", response.iterator().next().properties().displayName()); + Assertions.assertEquals(1970077416, + response.iterator().next().properties().highCapacityDatabaseStorageInput().totalSizeInGbs()); + Assertions.assertEquals("sepdfgk", response.iterator().next().properties().timeZone()); + Assertions.assertEquals("koj", response.iterator().next().zones().get(0)); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListMockTests.java new file mode 100644 index 000000000000..2051e77dc698 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbStorageVault; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ExascaleDbStorageVaultsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"additionalFlashCacheInPercent\":1738803510,\"description\":\"jinnix\",\"displayName\":\"awrtmjfjmyccxlz\",\"highCapacityDatabaseStorageInput\":{\"totalSizeInGbs\":1400866339},\"highCapacityDatabaseStorage\":{\"availableSizeInGbs\":963389591,\"totalSizeInGbs\":1682316966},\"timeZone\":\"khenlus\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Terminating\",\"lifecycleDetails\":\"xtxrdcqtjvidt\",\"vmClusterCount\":695049640,\"ocid\":\"uslvyjtcvuwkasi\",\"ociUrl\":\"esfuught\"},\"zones\":[\"ecjxe\",\"gtuhxuicbu\",\"wmrswnjlxuzrh\"],\"location\":\"usxjbaqehg\",\"tags\":{\"xncnwfe\":\"hzjqatucoige\",\"cgbjbgdlfgt\":\"bnwgfmxj\",\"naquflq\":\"y\",\"zeqyjleziun\":\"ctqhamzjrwdk\"},\"id\":\"xdfzantkw\",\"name\":\"eg\",\"type\":\"amlbnseqacjjvpil\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + OracleDatabaseManager manager = OracleDatabaseManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.exascaleDbStorageVaults().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("usxjbaqehg", response.iterator().next().location()); + Assertions.assertEquals("hzjqatucoige", response.iterator().next().tags().get("xncnwfe")); + Assertions.assertEquals(1738803510, response.iterator().next().properties().additionalFlashCacheInPercent()); + Assertions.assertEquals("jinnix", response.iterator().next().properties().description()); + Assertions.assertEquals("awrtmjfjmyccxlz", response.iterator().next().properties().displayName()); + Assertions.assertEquals(1400866339, + response.iterator().next().properties().highCapacityDatabaseStorageInput().totalSizeInGbs()); + Assertions.assertEquals("khenlus", response.iterator().next().properties().timeZone()); + Assertions.assertEquals("ecjxe", response.iterator().next().zones().get(0)); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsGetWithResponseMockTests.java similarity index 54% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsGetWithResponseMockTests.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsGetWithResponseMockTests.java index 38eeb24dae70..74c99061d0a6 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsGetWithResponseMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsGetWithResponseMockTests.java @@ -1,36 +1,36 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseNationalCharacterSet; +import com.azure.resourcemanager.oracledatabase.models.FlexComponent; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AutonomousDatabaseNationalCharacterSetsGetWithResponseMockTests { +public final class FlexComponentsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"characterSet\":\"sdaultxij\"},\"id\":\"mfqwa\",\"name\":\"lnqnmcjn\",\"type\":\"zqdqxt\"}"; + = "{\"properties\":{\"minimumCoreCount\":1738094377,\"availableCoreCount\":2007499127,\"availableDbStorageInGbs\":980930736,\"runtimeMinimumCoreCount\":1178868371,\"shape\":\"hi\",\"availableMemoryInGbs\":1164057360,\"availableLocalStorageInGbs\":1478665162,\"computeModel\":\"shiy\",\"hardwareType\":\"COMPUTE\",\"descriptionSummary\":\"lfcldu\"},\"id\":\"birdsvuwcobiegs\",\"name\":\"mninwjizcilng\",\"type\":\"gshejjtbxqmulux\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - AutonomousDatabaseNationalCharacterSet response = manager.autonomousDatabaseNationalCharacterSets() - .getWithResponse("yexaoguy", "i", com.azure.core.util.Context.NONE) + FlexComponent response = manager.flexComponents() + .getWithResponse("wemxswvruunzz", "gehkfkimrtixokff", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsListByParentMockTests.java similarity index 51% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesListByLocationMockTests.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsListByParentMockTests.java index 89cce4de5c12..164a7704e29c 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesListByLocationMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsListByParentMockTests.java @@ -1,37 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.DnsPrivateZone; +import com.azure.resourcemanager.oracledatabase.models.FlexComponent; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class DnsPrivateZonesListByLocationMockTests { +public final class FlexComponentsListByParentMockTests { @Test - public void testListByLocation() throws Exception { + public void testListByParent() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ocid\":\"ylnio\",\"isProtected\":false,\"lifecycleState\":\"Deleting\",\"self\":\"jed\",\"serial\":1946171356,\"version\":\"vnlvxbcuiiznktwf\",\"viewId\":\"snvpdibmi\",\"zoneType\":\"Primary\",\"timeCreated\":\"2021-01-17T12:38:03Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"iwbuqny\",\"name\":\"phzfylsgcrp\",\"type\":\"bcunezzceze\"}]}"; + = "{\"value\":[{\"properties\":{\"minimumCoreCount\":1183905957,\"availableCoreCount\":961906425,\"availableDbStorageInGbs\":29183092,\"runtimeMinimumCoreCount\":251907430,\"shape\":\"amikzebrqbsm\",\"availableMemoryInGbs\":1700673148,\"availableLocalStorageInGbs\":273840468,\"computeModel\":\"fuhok\",\"hardwareType\":\"CELL\",\"descriptionSummary\":\"whvhczznvfb\"},\"id\":\"jsxjwwix\",\"name\":\"vumwmxqh\",\"type\":\"dvnoamldsehaohdj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.dnsPrivateZones().listByLocation("pv", com.azure.core.util.Context.NONE); + PagedIterable response = manager.flexComponents() + .listByParent("xqzv", SystemShapes.EXADATA_X11M, com.azure.core.util.Context.NONE); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsGetWithResponseMockTests.java similarity index 56% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsGetWithResponseMockTests.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsGetWithResponseMockTests.java index 832bd73f9988..584203ccdf02 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsGetWithResponseMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsGetWithResponseMockTests.java @@ -1,37 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCharacterSet; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersion; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -public final class AutonomousDatabaseCharacterSetsGetWithResponseMockTests { +public final class GiMinorVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"characterSet\":\"lewjwiuubwef\"},\"id\":\"fapaqtfer\",\"name\":\"q\",\"type\":\"ex\"}"; + = "{\"properties\":{\"version\":\"twfans\",\"gridImageOcid\":\"pdibmikostbzbki\"},\"id\":\"uqn\",\"name\":\"ophzfylsgcrp\",\"type\":\"bcunezzceze\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - AutonomousDatabaseCharacterSet response = manager.autonomousDatabaseCharacterSets() - .getWithResponse("pcpil", "hahzvechndbnwi", com.azure.core.util.Context.NONE) + GiMinorVersion response = manager.giMinorVersions() + .getWithResponse("rylniofrzg", "zjedmstkvnlv", "bcuiiz", com.azure.core.util.Context.NONE) .getValue(); + Assertions.assertEquals("twfans", response.properties().version()); + Assertions.assertEquals("pdibmikostbzbki", response.properties().gridImageOcid()); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsListByParentMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsListByParentMockTests.java new file mode 100644 index 000000000000..a4a43c174eb3 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsListByParentMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersion; +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class GiMinorVersionsListByParentMockTests { + @Test + public void testListByParent() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"version\":\"swbzuwfmdurage\",\"gridImageOcid\":\"zvcjfelisdjubggb\"},\"id\":\"gkxkbsazgakg\",\"name\":\"cyrcmjdmspo\",\"type\":\"apvu\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + OracleDatabaseManager manager = OracleDatabaseManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.giMinorVersions() + .listByParent("bcblemb", "kbwvqvxkdiv", ShapeFamily.EXADATA, "heb", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("swbzuwfmdurage", response.iterator().next().properties().version()); + Assertions.assertEquals("zvcjfelisdjubggb", response.iterator().next().properties().gridImageOcid()); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionInnerTests.java deleted file mode 100644 index 2b94a669763a..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.GiVersionInner; -import com.azure.resourcemanager.oracledatabase.models.GiVersionProperties; - -public final class GiVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GiVersionInner model = BinaryData.fromString( - "{\"properties\":{\"version\":\"dfvue\"},\"id\":\"wsbpfvm\",\"name\":\"yhrfouyftaakcpw\",\"type\":\"yzvqt\"}") - .toObject(GiVersionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GiVersionInner model = new GiVersionInner().withProperties(new GiVersionProperties()); - model = BinaryData.fromObject(model).toObject(GiVersionInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionListResultTests.java deleted file mode 100644 index 90d72027dd2c..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.GiVersionListResult; -import org.junit.jupiter.api.Assertions; - -public final class GiVersionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GiVersionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"version\":\"hdlxyjrxsagafcn\"},\"id\":\"gwq\",\"name\":\"pnedgf\",\"type\":\"cvkcvqvpkeqdcv\"},{\"properties\":{\"version\":\"vo\"},\"id\":\"sotbob\",\"name\":\"dopcjwvnh\",\"type\":\"ld\"},{\"properties\":{\"version\":\"xcxrsl\"},\"id\":\"utwu\",\"name\":\"egrpkhj\",\"type\":\"niyqslui\"}],\"nextLink\":\"dggkzzlvmbmpa\"}") - .toObject(GiVersionListResult.class); - Assertions.assertEquals("dggkzzlvmbmpa", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionPropertiesTests.java deleted file mode 100644 index 54da77b30810..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionPropertiesTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.GiVersionProperties; - -public final class GiVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GiVersionProperties model = BinaryData.fromString("{\"version\":\"ubex\"}").toObject(GiVersionProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GiVersionProperties model = new GiVersionProperties(); - model = BinaryData.fromObject(model).toObject(GiVersionProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsGetWithResponseMockTests.java deleted file mode 100644 index 9552f4fd6ffe..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.GiVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GiVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"version\":\"wcobie\"},\"id\":\"tmninw\",\"name\":\"izcil\",\"type\":\"ghgshejjtbxqmu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - GiVersion response = manager.giVersions() - .getWithResponse("i", "xgvelfclduccbird", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationMockTests.java index fec4b792bf54..081630bad412 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationMockTests.java @@ -1,19 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.GiVersion; +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -21,17 +23,18 @@ public final class GiVersionsListByLocationMockTests { @Test public void testListByLocation() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"hkfkimrtixokf\"},\"id\":\"yinljqe\",\"name\":\"qwhix\",\"type\":\"onsts\"}]}"; + = "{\"value\":[{\"properties\":{\"version\":\"iqbi\"},\"id\":\"tmwwi\",\"name\":\"h\",\"type\":\"hfqpofv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.giVersions().listByLocation("wemxswvruunzz", com.azure.core.util.Context.NONE); + PagedIterable response = manager.giVersions() + .listByLocation("bgsxgnxfyqonmpq", SystemShapes.EXA_DB_XS, "wdofdbxiqx", com.azure.core.util.Context.NONE); + Assertions.assertEquals("iqbi", response.iterator().next().properties().version()); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/LongTermBackUpScheduleDetailsTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/LongTermBackUpScheduleDetailsTests.java deleted file mode 100644 index e280d1887b3e..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/LongTermBackUpScheduleDetailsTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.LongTermBackUpScheduleDetails; -import com.azure.resourcemanager.oracledatabase.models.RepeatCadenceType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class LongTermBackUpScheduleDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LongTermBackUpScheduleDetails model = BinaryData.fromString( - "{\"repeatCadence\":\"Yearly\",\"timeOfBackup\":\"2021-11-04T09:44:48Z\",\"retentionPeriodInDays\":2097936694,\"isDisabled\":true}") - .toObject(LongTermBackUpScheduleDetails.class); - Assertions.assertEquals(RepeatCadenceType.YEARLY, model.repeatCadence()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T09:44:48Z"), model.timeOfBackup()); - Assertions.assertEquals(2097936694, model.retentionPeriodInDays()); - Assertions.assertEquals(true, model.isDisabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LongTermBackUpScheduleDetails model - = new LongTermBackUpScheduleDetails().withRepeatCadence(RepeatCadenceType.YEARLY) - .withTimeOfBackup(OffsetDateTime.parse("2021-11-04T09:44:48Z")) - .withRetentionPeriodInDays(2097936694) - .withIsDisabled(true); - model = BinaryData.fromObject(model).toObject(LongTermBackUpScheduleDetails.class); - Assertions.assertEquals(RepeatCadenceType.YEARLY, model.repeatCadence()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T09:44:48Z"), model.timeOfBackup()); - Assertions.assertEquals(2097936694, model.retentionPeriodInDays()); - Assertions.assertEquals(true, model.isDisabled()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/MaintenanceWindowTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/MaintenanceWindowTests.java deleted file mode 100644 index 6eb56f5208cd..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/MaintenanceWindowTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.MaintenanceWindow; -import com.azure.resourcemanager.oracledatabase.models.Month; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import com.azure.resourcemanager.oracledatabase.models.PatchingMode; -import com.azure.resourcemanager.oracledatabase.models.Preference; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindow model = BinaryData.fromString( - "{\"preference\":\"NoPreference\",\"months\":[{\"name\":\"September\"},{\"name\":\"July\"},{\"name\":\"January\"},{\"name\":\"October\"}],\"weeksOfMonth\":[447504444,1340074682],\"daysOfWeek\":[{\"name\":\"Sunday\"},{\"name\":\"Wednesday\"},{\"name\":\"Thursday\"}],\"hoursOfDay\":[1039817033,1004577663,1511983432,1769488182],\"leadTimeInWeeks\":2041289920,\"patchingMode\":\"NonRolling\",\"customActionTimeoutInMins\":292038248,\"isCustomActionTimeoutEnabled\":true,\"isMonthlyPatchingEnabled\":false}") - .toObject(MaintenanceWindow.class); - Assertions.assertEquals(Preference.NO_PREFERENCE, model.preference()); - Assertions.assertEquals(MonthName.SEPTEMBER, model.months().get(0).name()); - Assertions.assertEquals(447504444, model.weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SUNDAY, model.daysOfWeek().get(0).name()); - Assertions.assertEquals(1039817033, model.hoursOfDay().get(0)); - Assertions.assertEquals(2041289920, model.leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, model.patchingMode()); - Assertions.assertEquals(292038248, model.customActionTimeoutInMins()); - Assertions.assertEquals(true, model.isCustomActionTimeoutEnabled()); - Assertions.assertEquals(false, model.isMonthlyPatchingEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindow model = new MaintenanceWindow().withPreference(Preference.NO_PREFERENCE) - .withMonths(Arrays.asList(new Month().withName(MonthName.SEPTEMBER), new Month().withName(MonthName.JULY), - new Month().withName(MonthName.JANUARY), new Month().withName(MonthName.OCTOBER))) - .withWeeksOfMonth(Arrays.asList(447504444, 1340074682)) - .withDaysOfWeek(Arrays.asList(new DayOfWeek().withName(DayOfWeekName.SUNDAY), - new DayOfWeek().withName(DayOfWeekName.WEDNESDAY), new DayOfWeek().withName(DayOfWeekName.THURSDAY))) - .withHoursOfDay(Arrays.asList(1039817033, 1004577663, 1511983432, 1769488182)) - .withLeadTimeInWeeks(2041289920) - .withPatchingMode(PatchingMode.NON_ROLLING) - .withCustomActionTimeoutInMins(292038248) - .withIsCustomActionTimeoutEnabled(true) - .withIsMonthlyPatchingEnabled(false); - model = BinaryData.fromObject(model).toObject(MaintenanceWindow.class); - Assertions.assertEquals(Preference.NO_PREFERENCE, model.preference()); - Assertions.assertEquals(MonthName.SEPTEMBER, model.months().get(0).name()); - Assertions.assertEquals(447504444, model.weeksOfMonth().get(0)); - Assertions.assertEquals(DayOfWeekName.SUNDAY, model.daysOfWeek().get(0).name()); - Assertions.assertEquals(1039817033, model.hoursOfDay().get(0)); - Assertions.assertEquals(2041289920, model.leadTimeInWeeks()); - Assertions.assertEquals(PatchingMode.NON_ROLLING, model.patchingMode()); - Assertions.assertEquals(292038248, model.customActionTimeoutInMins()); - Assertions.assertEquals(true, model.isCustomActionTimeoutEnabled()); - Assertions.assertEquals(false, model.isMonthlyPatchingEnabled()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/MonthTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/MonthTests.java deleted file mode 100644 index 428f9eb79406..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/MonthTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.Month; -import com.azure.resourcemanager.oracledatabase.models.MonthName; -import org.junit.jupiter.api.Assertions; - -public final class MonthTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Month model = BinaryData.fromString("{\"name\":\"July\"}").toObject(Month.class); - Assertions.assertEquals(MonthName.JULY, model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Month model = new Month().withName(MonthName.JULY); - model = BinaryData.fromObject(model).toObject(Month.class); - Assertions.assertEquals(MonthName.JULY, model.name()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/NsgCidrTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/NsgCidrTests.java deleted file mode 100644 index d457a212fdcb..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/NsgCidrTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.NsgCidr; -import com.azure.resourcemanager.oracledatabase.models.PortRange; -import org.junit.jupiter.api.Assertions; - -public final class NsgCidrTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NsgCidr model = BinaryData - .fromString("{\"source\":\"wz\",\"destinationPortRange\":{\"min\":670634549,\"max\":593552862}}") - .toObject(NsgCidr.class); - Assertions.assertEquals("wz", model.source()); - Assertions.assertEquals(670634549, model.destinationPortRange().min()); - Assertions.assertEquals(593552862, model.destinationPortRange().max()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NsgCidr model = new NsgCidr().withSource("wz") - .withDestinationPortRange(new PortRange().withMin(670634549).withMax(593552862)); - model = BinaryData.fromObject(model).toObject(NsgCidr.class); - Assertions.assertEquals("wz", model.source()); - Assertions.assertEquals(670634549, model.destinationPortRange().min()); - Assertions.assertEquals(593552862, model.destinationPortRange().max()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationDisplayTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationDisplayTests.java deleted file mode 100644 index f653ac95fa03..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationDisplayTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .toObject(OperationDisplay.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationInnerTests.java deleted file mode 100644 index ccc769bc51f1..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.OperationInner; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationListResultTests.java deleted file mode 100644 index fd2b459eef1c..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationListResultTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListMockTests.java index e82e71b117fe..4d819334454d 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.Operation; @@ -21,14 +21,14 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"udtjuewbc\",\"isDataAction\":false,\"display\":{\"provider\":\"whcjyxcc\",\"resource\":\"vpayakkudzpx\",\"operation\":\"jplmagstcy\",\"description\":\"pfkyrkdbdgiogsj\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"erteeammxqiekk\",\"isDataAction\":true,\"display\":{\"provider\":\"tkgdojbmxva\",\"resource\":\"efdeesve\",\"operation\":\"ijpxtx\",\"description\":\"wprtu\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksMockTests.java index 62efec19e807..fda46a5091a9 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.ActivationLinks; @@ -20,14 +20,14 @@ public final class OracleSubscriptionsListActivationLinksMockTests { @Test public void testListActivationLinks() throws Exception { String responseStr - = "{\"newCloudAccountActivationLink\":\"lgouwtlmjj\",\"existingCloudAccountActivationLink\":\"ojqtobaxk\"}"; + = "{\"newCloudAccountActivationLink\":\"ehol\",\"existingCloudAccountActivationLink\":\"jwiuubwefqsfapaq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ActivationLinks response = manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsMockTests.java index 4f3a5f97c9d5..318e31c46773 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.CloudAccountDetails; @@ -19,14 +19,14 @@ public final class OracleSubscriptionsListCloudAccountDetailsMockTests { @Test public void testListCloudAccountDetails() throws Exception { - String responseStr = "{\"cloudAccountName\":\"ytunlbfjkwr\",\"cloudAccountHomeRegion\":\"nkqbhsyrq\"}"; + String responseStr = "{\"cloudAccountName\":\"zvd\",\"cloudAccountHomeRegion\":\"zdix\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CloudAccountDetails response = manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsMockTests.java index df12b2983d61..c596bc717cad 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.SaasSubscriptionDetails; @@ -20,14 +20,14 @@ public final class OracleSubscriptionsListSaasSubscriptionDetailsMockTests { @Test public void testListSaasSubscriptionDetails() throws Exception { String responseStr - = "{\"id\":\"jqhden\",\"subscriptionName\":\"ulkpakd\",\"timeCreated\":\"2021-06-10T21:14:50Z\",\"offerId\":\"jnnawtqa\",\"planId\":\"xuckpggqoweyir\",\"saasSubscriptionStatus\":\"lisn\",\"publisherId\":\"fl\",\"purchaserEmailId\":\"mpizru\",\"purchaserTenantId\":\"pqxpx\",\"termUnit\":\"fcngjsa\",\"isAutoRenew\":false,\"isFreeTrial\":true}"; + = "{\"id\":\"q\",\"subscriptionName\":\"odawopqhewjptmcg\",\"timeCreated\":\"2021-04-24T18:57:19Z\",\"offerId\":\"t\",\"planId\":\"lnd\",\"saasSubscriptionStatus\":\"tutmzl\",\"publisherId\":\"ojlvfhrbbpneqvc\",\"purchaserEmailId\":\"yyurmochpprprsnm\",\"purchaserTenantId\":\"ayzejnhlbkpbz\",\"termUnit\":\"piljhahzvech\",\"isAutoRenew\":true,\"isFreeTrial\":true}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SaasSubscriptionDetails response = manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PeerDbDetailsTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PeerDbDetailsTests.java deleted file mode 100644 index aa6e6bab121a..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PeerDbDetailsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; -import org.junit.jupiter.api.Assertions; - -public final class PeerDbDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PeerDbDetails model = BinaryData.fromString("{\"peerDbId\":\"squyfxrxxlep\"}").toObject(PeerDbDetails.class); - Assertions.assertEquals("squyfxrxxlep", model.peerDbId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PeerDbDetails model = new PeerDbDetails().withPeerDbId("squyfxrxxlep"); - model = BinaryData.fromObject(model).toObject(PeerDbDetails.class); - Assertions.assertEquals("squyfxrxxlep", model.peerDbId()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PortRangeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PortRangeTests.java deleted file mode 100644 index 90e0a811c073..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PortRangeTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.PortRange; -import org.junit.jupiter.api.Assertions; - -public final class PortRangeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PortRange model = BinaryData.fromString("{\"min\":551724215,\"max\":806707414}").toObject(PortRange.class); - Assertions.assertEquals(551724215, model.min()); - Assertions.assertEquals(806707414, model.max()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PortRange model = new PortRange().withMin(551724215).withMax(806707414); - model = BinaryData.fromObject(model).toObject(PortRange.class); - Assertions.assertEquals(551724215, model.min()); - Assertions.assertEquals(806707414, model.max()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PrivateIpAddressPropertiesInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PrivateIpAddressPropertiesInnerTests.java deleted file mode 100644 index 94637b38a3bd..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PrivateIpAddressPropertiesInnerTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.PrivateIpAddressPropertiesInner; -import org.junit.jupiter.api.Assertions; - -public final class PrivateIpAddressPropertiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateIpAddressPropertiesInner model = BinaryData.fromString( - "{\"displayName\":\"cbhernntiewdj\",\"hostnameLabel\":\"vbquwr\",\"ocid\":\"ehwagoh\",\"ipAddress\":\"uffkmrqemvvh\",\"subnetId\":\"xtdr\"}") - .toObject(PrivateIpAddressPropertiesInner.class); - Assertions.assertEquals("cbhernntiewdj", model.displayName()); - Assertions.assertEquals("vbquwr", model.hostnameLabel()); - Assertions.assertEquals("ehwagoh", model.ocid()); - Assertions.assertEquals("uffkmrqemvvh", model.ipAddress()); - Assertions.assertEquals("xtdr", model.subnetId()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PrivateIpAddressesFilterTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PrivateIpAddressesFilterTests.java deleted file mode 100644 index dcad1f6e5be9..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/PrivateIpAddressesFilterTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; -import org.junit.jupiter.api.Assertions; - -public final class PrivateIpAddressesFilterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateIpAddressesFilter model = BinaryData.fromString("{\"subnetId\":\"ayjkqa\",\"vnicId\":\"qgzsles\"}") - .toObject(PrivateIpAddressesFilter.class); - Assertions.assertEquals("ayjkqa", model.subnetId()); - Assertions.assertEquals("qgzsles", model.vnicId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateIpAddressesFilter model = new PrivateIpAddressesFilter().withSubnetId("ayjkqa").withVnicId("qgzsles"); - model = BinaryData.fromObject(model).toObject(PrivateIpAddressesFilter.class); - Assertions.assertEquals("ayjkqa", model.subnetId()); - Assertions.assertEquals("qgzsles", model.vnicId()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ProfileTypeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ProfileTypeTests.java deleted file mode 100644 index d3bd232ed245..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ProfileTypeTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.ConsumerGroup; -import com.azure.resourcemanager.oracledatabase.models.HostFormatType; -import com.azure.resourcemanager.oracledatabase.models.ProfileType; -import com.azure.resourcemanager.oracledatabase.models.ProtocolType; -import com.azure.resourcemanager.oracledatabase.models.SessionModeType; -import com.azure.resourcemanager.oracledatabase.models.SyntaxFormatType; -import com.azure.resourcemanager.oracledatabase.models.TlsAuthenticationType; -import org.junit.jupiter.api.Assertions; - -public final class ProfileTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProfileType model = BinaryData.fromString( - "{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"fpjkjlxofp\",\"hostFormat\":\"Ip\",\"isRegional\":false,\"protocol\":\"TCPS\",\"sessionMode\":\"Redirect\",\"syntaxFormat\":\"Ezconnect\",\"tlsAuthentication\":\"Server\",\"value\":\"ininmay\"}") - .toObject(ProfileType.class); - Assertions.assertEquals(ConsumerGroup.TPURGENT, model.consumerGroup()); - Assertions.assertEquals("fpjkjlxofp", model.displayName()); - Assertions.assertEquals(HostFormatType.IP, model.hostFormat()); - Assertions.assertEquals(false, model.isRegional()); - Assertions.assertEquals(ProtocolType.TCPS, model.protocol()); - Assertions.assertEquals(SessionModeType.REDIRECT, model.sessionMode()); - Assertions.assertEquals(SyntaxFormatType.EZCONNECT, model.syntaxFormat()); - Assertions.assertEquals(TlsAuthenticationType.SERVER, model.tlsAuthentication()); - Assertions.assertEquals("ininmay", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProfileType model = new ProfileType().withConsumerGroup(ConsumerGroup.TPURGENT) - .withDisplayName("fpjkjlxofp") - .withHostFormat(HostFormatType.IP) - .withIsRegional(false) - .withProtocol(ProtocolType.TCPS) - .withSessionMode(SessionModeType.REDIRECT) - .withSyntaxFormat(SyntaxFormatType.EZCONNECT) - .withTlsAuthentication(TlsAuthenticationType.SERVER) - .withValue("ininmay"); - model = BinaryData.fromObject(model).toObject(ProfileType.class); - Assertions.assertEquals(ConsumerGroup.TPURGENT, model.consumerGroup()); - Assertions.assertEquals("fpjkjlxofp", model.displayName()); - Assertions.assertEquals(HostFormatType.IP, model.hostFormat()); - Assertions.assertEquals(false, model.isRegional()); - Assertions.assertEquals(ProtocolType.TCPS, model.protocol()); - Assertions.assertEquals(SessionModeType.REDIRECT, model.sessionMode()); - Assertions.assertEquals(SyntaxFormatType.EZCONNECT, model.syntaxFormat()); - Assertions.assertEquals(TlsAuthenticationType.SERVER, model.tlsAuthentication()); - Assertions.assertEquals("ininmay", model.value()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/RestoreAutonomousDatabaseDetailsTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/RestoreAutonomousDatabaseDetailsTests.java deleted file mode 100644 index 7923e5ce8fd9..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/RestoreAutonomousDatabaseDetailsTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.RestoreAutonomousDatabaseDetails; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class RestoreAutonomousDatabaseDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestoreAutonomousDatabaseDetails model = BinaryData.fromString("{\"timestamp\":\"2021-07-15T02:51:17Z\"}") - .toObject(RestoreAutonomousDatabaseDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-15T02:51:17Z"), model.timestamp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestoreAutonomousDatabaseDetails model - = new RestoreAutonomousDatabaseDetails().withTimestamp(OffsetDateTime.parse("2021-07-15T02:51:17Z")); - model = BinaryData.fromObject(model).toObject(RestoreAutonomousDatabaseDetails.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-15T02:51:17Z"), model.timestamp()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SaasSubscriptionDetailsInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SaasSubscriptionDetailsInnerTests.java deleted file mode 100644 index 63428e797fa3..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SaasSubscriptionDetailsInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.SaasSubscriptionDetailsInner; - -public final class SaasSubscriptionDetailsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SaasSubscriptionDetailsInner model = BinaryData.fromString( - "{\"id\":\"abikns\",\"subscriptionName\":\"gj\",\"timeCreated\":\"2021-10-23T19:23:01Z\",\"offerId\":\"dtlwwrlkd\",\"planId\":\"ncvokotllxdyhg\",\"saasSubscriptionStatus\":\"ocogj\",\"publisherId\":\"dtbnnha\",\"purchaserEmailId\":\"ocrkvcikh\",\"purchaserTenantId\":\"p\",\"termUnit\":\"qgxqquezikyw\",\"isAutoRenew\":false,\"isFreeTrial\":true}") - .toObject(SaasSubscriptionDetailsInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ScheduledOperationsTypeTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ScheduledOperationsTypeTests.java deleted file mode 100644 index cb23f9018468..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ScheduledOperationsTypeTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeek; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.ScheduledOperationsType; -import org.junit.jupiter.api.Assertions; - -public final class ScheduledOperationsTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduledOperationsType model = BinaryData.fromString( - "{\"dayOfWeek\":{\"name\":\"Thursday\"},\"scheduledStartTime\":\"j\",\"scheduledStopTime\":\"ryhtnapczwlokjy\"}") - .toObject(ScheduledOperationsType.class); - Assertions.assertEquals(DayOfWeekName.THURSDAY, model.dayOfWeek().name()); - Assertions.assertEquals("j", model.scheduledStartTime()); - Assertions.assertEquals("ryhtnapczwlokjy", model.scheduledStopTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduledOperationsType model - = new ScheduledOperationsType().withDayOfWeek(new DayOfWeek().withName(DayOfWeekName.THURSDAY)) - .withScheduledStartTime("j") - .withScheduledStopTime("ryhtnapczwlokjy"); - model = BinaryData.fromObject(model).toObject(ScheduledOperationsType.class); - Assertions.assertEquals(DayOfWeekName.THURSDAY, model.dayOfWeek().name()); - Assertions.assertEquals("j", model.scheduledStartTime()); - Assertions.assertEquals("ryhtnapczwlokjy", model.scheduledStopTime()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ScheduledOperationsTypeUpdateTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ScheduledOperationsTypeUpdateTests.java deleted file mode 100644 index 58e1d98ed9f1..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/ScheduledOperationsTypeUpdateTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekName; -import com.azure.resourcemanager.oracledatabase.models.DayOfWeekUpdate; -import com.azure.resourcemanager.oracledatabase.models.ScheduledOperationsTypeUpdate; -import org.junit.jupiter.api.Assertions; - -public final class ScheduledOperationsTypeUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduledOperationsTypeUpdate model = BinaryData.fromString( - "{\"dayOfWeek\":{\"name\":\"Saturday\"},\"scheduledStartTime\":\"ealmfmtdaaygdvwv\",\"scheduledStopTime\":\"iohgwxrtfud\"}") - .toObject(ScheduledOperationsTypeUpdate.class); - Assertions.assertEquals(DayOfWeekName.SATURDAY, model.dayOfWeek().name()); - Assertions.assertEquals("ealmfmtdaaygdvwv", model.scheduledStartTime()); - Assertions.assertEquals("iohgwxrtfud", model.scheduledStopTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduledOperationsTypeUpdate model - = new ScheduledOperationsTypeUpdate().withDayOfWeek(new DayOfWeekUpdate().withName(DayOfWeekName.SATURDAY)) - .withScheduledStartTime("ealmfmtdaaygdvwv") - .withScheduledStopTime("iohgwxrtfud"); - model = BinaryData.fromObject(model).toObject(ScheduledOperationsTypeUpdate.class); - Assertions.assertEquals(DayOfWeekName.SATURDAY, model.dayOfWeek().name()); - Assertions.assertEquals("ealmfmtdaaygdvwv", model.scheduledStartTime()); - Assertions.assertEquals("iohgwxrtfud", model.scheduledStopTime()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionInnerTests.java deleted file mode 100644 index 2dd1147134f6..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.SystemVersionInner; -import com.azure.resourcemanager.oracledatabase.models.SystemVersionProperties; - -public final class SystemVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemVersionInner model = BinaryData.fromString( - "{\"properties\":{\"systemVersion\":\"mkcxozapvh\"},\"id\":\"xprglyatddc\",\"name\":\"cbcuejrjxgciqi\",\"type\":\"rhos\"}") - .toObject(SystemVersionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemVersionInner model = new SystemVersionInner().withProperties(new SystemVersionProperties()); - model = BinaryData.fromObject(model).toObject(SystemVersionInner.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionListResultTests.java deleted file mode 100644 index 721e9623d9f6..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.SystemVersionListResult; -import org.junit.jupiter.api.Assertions; - -public final class SystemVersionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemVersionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"systemVersion\":\"smond\"},\"id\":\"quxvypomgkop\",\"name\":\"whojvp\",\"type\":\"jqg\"}],\"nextLink\":\"smocmbq\"}") - .toObject(SystemVersionListResult.class); - Assertions.assertEquals("smocmbq", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionPropertiesTests.java deleted file mode 100644 index 0aca43eaeae6..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.SystemVersionProperties; - -public final class SystemVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemVersionProperties model - = BinaryData.fromString("{\"systemVersion\":\"dqrhzoymib\"}").toObject(SystemVersionProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemVersionProperties model = new SystemVersionProperties(); - model = BinaryData.fromObject(model).toObject(SystemVersionProperties.class); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsGetWithResponseMockTests.java deleted file mode 100644 index 8f78bee9f6fe..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsGetWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.SystemVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"systemVersion\":\"hndvnoamldsehao\"},\"id\":\"jhhflzokxcoxpel\",\"name\":\"jetagltsxoatft\",\"type\":\"zpnpbswv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SystemVersion response = manager.systemVersions() - .getWithResponse("ycjsx", "wwixzvumw", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsListByLocationMockTests.java deleted file mode 100644 index 375d83c78bf7..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/SystemVersionsListByLocationMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.SystemVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SystemVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"systemVersion\":\"ucrwnami\"},\"id\":\"ebrqbsmswziqgfuh\",\"name\":\"kzruswh\",\"type\":\"hczznvf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.systemVersions().listByLocation("uxlxqzvners", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressInnerTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressInnerTests.java deleted file mode 100644 index 364dd1dde6a1..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.fluent.models.VirtualNetworkAddressInner; -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProperties; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkAddressInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkAddressInner model = BinaryData.fromString( - "{\"properties\":{\"ipAddress\":\"bpimlqoljxkcgxxl\",\"vmOcid\":\"ffgcvizqz\",\"ocid\":\"l\",\"domain\":\"lyoupfgfbkju\",\"lifecycleDetails\":\"yhgk\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Terminated\",\"timeAssigned\":\"2021-10-13T02:52:40Z\"},\"id\":\"zfttsttktlahb\",\"name\":\"actxtgzukxitm\",\"type\":\"qtgqqqxhrnxr\"}") - .toObject(VirtualNetworkAddressInner.class); - Assertions.assertEquals("bpimlqoljxkcgxxl", model.properties().ipAddress()); - Assertions.assertEquals("ffgcvizqz", model.properties().vmOcid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkAddressInner model = new VirtualNetworkAddressInner().withProperties( - new VirtualNetworkAddressProperties().withIpAddress("bpimlqoljxkcgxxl").withVmOcid("ffgcvizqz")); - model = BinaryData.fromObject(model).toObject(VirtualNetworkAddressInner.class); - Assertions.assertEquals("bpimlqoljxkcgxxl", model.properties().ipAddress()); - Assertions.assertEquals("ffgcvizqz", model.properties().vmOcid()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressListResultTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressListResultTests.java deleted file mode 100644 index ddaaf406a5e2..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressListResultTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressListResult; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkAddressListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkAddressListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"ipAddress\":\"acoebj\",\"vmOcid\":\"wzcjznmwcpmgua\",\"ocid\":\"raufactkahzova\",\"domain\":\"ziuxxpshnee\",\"lifecycleDetails\":\"lfg\",\"provisioningState\":\"Failed\",\"lifecycleState\":\"Terminated\",\"timeAssigned\":\"2021-07-12T23:03:26Z\"},\"id\":\"lenrd\",\"name\":\"utujba\",\"type\":\"pjuohminyfl\"},{\"properties\":{\"ipAddress\":\"wmd\",\"vmOcid\":\"wpklvxw\",\"ocid\":\"gdxpg\",\"domain\":\"chisze\",\"lifecycleDetails\":\"nb\",\"provisioningState\":\"Failed\",\"lifecycleState\":\"Provisioning\",\"timeAssigned\":\"2021-06-04T19:59:32Z\"},\"id\":\"daxconfozauorsuk\",\"name\":\"kwbqplhlvnuu\",\"type\":\"pzlrphw\"},{\"properties\":{\"ipAddress\":\"l\",\"vmOcid\":\"eyuqdunvmnnrwr\",\"ocid\":\"ork\",\"domain\":\"lywjhh\",\"lifecycleDetails\":\"nhxmsi\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Provisioning\",\"timeAssigned\":\"2021-11-09T14:46:05Z\"},\"id\":\"ggdufiqndieu\",\"name\":\"ao\",\"type\":\"jchvcyy\"},{\"properties\":{\"ipAddress\":\"gdotcubiipuipwo\",\"vmOcid\":\"nmacj\",\"ocid\":\"nizshqvcim\",\"domain\":\"vfgmblrrilby\",\"lifecycleDetails\":\"xsmiccwrwfscjf\",\"provisioningState\":\"Failed\",\"lifecycleState\":\"Failed\",\"timeAssigned\":\"2021-01-29T04:31:10Z\"},\"id\":\"i\",\"name\":\"dvoqyt\",\"type\":\"byowbblgyavutp\"}],\"nextLink\":\"joxoism\"}") - .toObject(VirtualNetworkAddressListResult.class); - Assertions.assertEquals("acoebj", model.value().get(0).properties().ipAddress()); - Assertions.assertEquals("wzcjznmwcpmgua", model.value().get(0).properties().vmOcid()); - Assertions.assertEquals("joxoism", model.nextLink()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressPropertiesTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressPropertiesTests.java deleted file mode 100644 index 475743aba581..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProperties; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkAddressPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkAddressProperties model = BinaryData.fromString( - "{\"ipAddress\":\"pjui\",\"vmOcid\":\"vokqdzfv\",\"ocid\":\"ivjlfrqttbajlka\",\"domain\":\"wxyiopidkqq\",\"lifecycleDetails\":\"uvscxkdmligov\",\"provisioningState\":\"Provisioning\",\"lifecycleState\":\"Provisioning\",\"timeAssigned\":\"2021-12-03T21:08:29Z\"}") - .toObject(VirtualNetworkAddressProperties.class); - Assertions.assertEquals("pjui", model.ipAddress()); - Assertions.assertEquals("vokqdzfv", model.vmOcid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkAddressProperties model - = new VirtualNetworkAddressProperties().withIpAddress("pjui").withVmOcid("vokqdzfv"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkAddressProperties.class); - Assertions.assertEquals("pjui", model.ipAddress()); - Assertions.assertEquals("vokqdzfv", model.vmOcid()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesCreateOrUpdateMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesCreateOrUpdateMockTests.java deleted file mode 100644 index 342a5a496ce2..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddress; -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualNetworkAddressesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"ipAddress\":\"beolh\",\"vmOcid\":\"lvbmxuqibsxtkcu\",\"ocid\":\"b\",\"domain\":\"arfsi\",\"lifecycleDetails\":\"lkjxnqpvwgf\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Failed\",\"timeAssigned\":\"2021-06-25T15:03:20Z\"},\"id\":\"zmdk\",\"name\":\"aoaf\",\"type\":\"luqvoxmycjimryv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualNetworkAddress response = manager.virtualNetworkAddresses() - .define("fsv") - .withExistingCloudVmCluster("phaimmoi", "oqboshbragapyyr") - .withProperties(new VirtualNetworkAddressProperties().withIpAddress("vbopfppdbwnu").withVmOcid("ahxku")) - .create(); - - Assertions.assertEquals("beolh", response.properties().ipAddress()); - Assertions.assertEquals("lvbmxuqibsxtkcu", response.properties().vmOcid()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesGetWithResponseMockTests.java deleted file mode 100644 index 3ca41772cfd3..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesGetWithResponseMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.oracledatabase.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; -import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddress; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualNetworkAddressesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"ipAddress\":\"zxlioh\",\"vmOcid\":\"dd\",\"ocid\":\"gxqbawpcb\",\"domain\":\"zqcyknap\",\"lifecycleDetails\":\"fyuicdh\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Terminating\",\"timeAssigned\":\"2021-12-02T18:24:12Z\"},\"id\":\"bdvibidmhmwffpl\",\"name\":\"muvapc\",\"type\":\"ccrrvweyoxoyyu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - OracleDatabaseManager manager = OracleDatabaseManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualNetworkAddress response = manager.virtualNetworkAddresses() - .getWithResponse("lobdxna", "pmkmlmvevfx", "op", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zxlioh", response.properties().ipAddress()); - Assertions.assertEquals("dd", response.properties().vmOcid()); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterMockTests.java index 0b9d19ed9e5e..114bae5d04a0 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterMockTests.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.oracledatabase.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.oracledatabase.OracleDatabaseManager; import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddress; @@ -22,19 +22,19 @@ public final class VirtualNetworkAddressesListByCloudVmClusterMockTests { @Test public void testListByCloudVmCluster() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"ipAddress\":\"bchaqd\",\"vmOcid\":\"qecrqctmxx\",\"ocid\":\"ddm\",\"domain\":\"huytxzvtzn\",\"lifecycleDetails\":\"xbannovvoxc\",\"provisioningState\":\"Failed\",\"lifecycleState\":\"Provisioning\",\"timeAssigned\":\"2020-12-31T13:23:28Z\"},\"id\":\"vroevytlyo\",\"name\":\"rrrouuxvnsa\",\"type\":\"bcrymodizrx\"}]}"; + = "{\"value\":[{\"properties\":{\"ipAddress\":\"pvpbdbzqgqqiheds\",\"vmOcid\":\"wthmkyib\",\"ocid\":\"sihsgqcwdhohsd\",\"domain\":\"cdzsu\",\"lifecycleDetails\":\"ohdxbzlmcmu\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Provisioning\",\"timeAssigned\":\"2021-11-30T13:30:35Z\"},\"id\":\"v\",\"name\":\"qqxeyskon\",\"type\":\"zinkfkbgbzbowxeq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); OracleDatabaseManager manager = OracleDatabaseManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.virtualNetworkAddresses().listByCloudVmCluster("bdxxe", "unin", com.azure.core.util.Context.NONE); + PagedIterable response = manager.virtualNetworkAddresses() + .listByCloudVmCluster("ftpmdtzfjltfv", "zcyjtot", com.azure.core.util.Context.NONE); - Assertions.assertEquals("bchaqd", response.iterator().next().properties().ipAddress()); - Assertions.assertEquals("qecrqctmxx", response.iterator().next().properties().vmOcid()); + Assertions.assertEquals("pvpbdbzqgqqiheds", response.iterator().next().properties().ipAddress()); + Assertions.assertEquals("wthmkyib", response.iterator().next().properties().vmOcid()); } } diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/tsp-location.yaml b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/tsp-location.yaml new file mode 100644 index 000000000000..2a23c65b277b --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/tsp-location.yaml @@ -0,0 +1,5 @@ +directory: specification/oracle/Oracle.Database.Management +commit: fe609f3dbed84f0e8c18dfd88f39be1468719515 +repo: Azure/azure-rest-api-specs +additionalDirectories: +- specification/oracle/Oracle.Database.Management/models