diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md index a06f079f8052..d049fa1bb2f4 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/CHANGELOG.md @@ -1,14 +1,458 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-04-14) -### Features Added +- Azure Resource Manager OracleDatabase client library for Java. This package contains Microsoft Azure SDK for OracleDatabase Management SDK. Package tag package-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.AutonomousDatabaseBackupUpdateProperties` was removed + +#### `models.DbNodes` was modified + +* `listByCloudVmCluster(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listByCloudVmCluster(java.lang.String,java.lang.String)` was removed + +#### `models.DbSystemShapeProperties` was modified + +* `java.lang.Integer availableCoreCount()` -> `int availableCoreCount()` + +#### `models.DbServers` was modified + +* `listByCloudExadataInfrastructure(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listByCloudExadataInfrastructure(java.lang.String,java.lang.String)` was removed + +#### `models.VirtualNetworkAddresses` was modified + +* `listByCloudVmCluster(java.lang.String,java.lang.String)` was removed +* `listByCloudVmCluster(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.AutonomousDatabaseBackupUpdate` was modified + +* `withProperties(models.AutonomousDatabaseBackupUpdateProperties)` was removed +* `models.AutonomousDatabaseBackupUpdateProperties properties()` -> `models.AutonomousDatabaseBackupProperties properties()` + +#### `models.DbSystemShapes` was modified + +* `listByLocation(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.AutonomousDatabaseCloneProperties` was modified + +* `memoryPerOracleComputeUnitInGbs()` was removed +* `provisionableCpus()` was removed +* `supportedRegionsToCloneTo()` was removed +* `actualUsedDataStorageSizeInTbs()` was removed +* `privateEndpoint()` was removed +* `provisioningState()` was removed +* `timeCreated()` was removed +* `ociUrl()` was removed +* `timeMaintenanceEnd()` was removed +* `nextLongTermBackupTimestamp()` was removed +* `failedDataRecoveryInSeconds()` was removed +* `isRemoteDataGuardEnabled()` was removed +* `connectionStrings()` was removed +* `inMemoryAreaInGbs()` was removed +* `ocid()` was removed +* `usedDataStorageSizeInGbs()` was removed +* `serviceConsoleUrl()` was removed +* `connectionUrls()` was removed +* `lifecycleDetails()` was removed +* `peerDbIds()` was removed +* `allocatedStorageSizeInTbs()` was removed +* `timeDataGuardRoleChanged()` was removed +* `apexDetails()` was removed +* `timeOfLastSwitchover()` was removed +* `lifecycleState()` was removed +* `timeOfLastRefreshPoint()` was removed +* `availableUpgradeVersions()` was removed +* `timeLocalDataGuardEnabled()` was removed +* `isPreview()` was removed +* `localDisasterRecoveryType()` was removed +* `localStandbyDb()` was removed +* `timeOfLastRefresh()` was removed +* `dataSafeStatus()` was removed +* `timeDeletionOfFreeAutonomousDatabase()` was removed +* `operationsInsightsStatus()` was removed +* `sqlWebDeveloperUrl()` was removed +* `timeOfLastFailover()` was removed +* `usedDataStorageSizeInTbs()` was removed +* `timeMaintenanceBegin()` was removed +* `timeReclamationOfFreeAutonomousDatabase()` was removed + +#### `models.AutonomousDatabaseBackups` was modified + +* `listByAutonomousDatabase(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `listByAutonomousDatabase(java.lang.String,java.lang.String)` was removed + +#### `models.DnsPrivateZoneProperties` was modified + +* `java.lang.Integer serial()` -> `int serial()` +* `java.lang.Boolean isProtected()` -> `boolean isProtected()` + +#### `models.GiVersions` was modified + +* `listByLocation(java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.AutonomousDatabaseProperties` was modified + +* `operationsInsightsStatus()` was removed +* `inMemoryAreaInGbs()` was removed +* `isRemoteDataGuardEnabled()` was removed +* `lifecycleDetails()` was removed +* `actualUsedDataStorageSizeInTbs()` was removed +* `timeDataGuardRoleChanged()` was removed +* `localStandbyDb()` was removed +* `serviceConsoleUrl()` was removed +* `timeReclamationOfFreeAutonomousDatabase()` was removed +* `timeOfLastRefresh()` was removed +* `sqlWebDeveloperUrl()` was removed +* `availableUpgradeVersions()` was removed +* `lifecycleState()` was removed +* `dataSafeStatus()` was removed +* `timeCreated()` was removed +* `connectionUrls()` was removed +* `provisioningState()` was removed +* `localDisasterRecoveryType()` was removed +* `timeMaintenanceEnd()` was removed +* `usedDataStorageSizeInGbs()` was removed +* `isPreview()` was removed +* `privateEndpoint()` was removed +* `timeDeletionOfFreeAutonomousDatabase()` was removed +* `allocatedStorageSizeInTbs()` was removed +* `peerDbIds()` was removed +* `provisionableCpus()` was removed +* `memoryPerOracleComputeUnitInGbs()` was removed +* `nextLongTermBackupTimestamp()` was removed +* `usedDataStorageSizeInTbs()` was removed +* `supportedRegionsToCloneTo()` was removed +* `connectionStrings()` was removed +* `timeOfLastRefreshPoint()` was removed +* `timeOfLastSwitchover()` was removed +* `ocid()` was removed +* `ociUrl()` was removed +* `timeMaintenanceBegin()` was removed +* `timeOfLastFailover()` was removed +* `failedDataRecoveryInSeconds()` was removed +* `apexDetails()` was removed +* `timeLocalDataGuardEnabled()` was removed + +#### `models.DnsPrivateViewProperties` was modified + +* `java.lang.Boolean isProtected()` -> `boolean isProtected()` + +#### `models.AutonomousDatabaseBackup$Update` was modified + +* `withProperties(models.AutonomousDatabaseBackupUpdateProperties)` was removed + +### Features Added + +* `models.DefinedFileSystemConfiguration` was added + +* `models.ExadbVmClusterProperties` was added + +* `models.ExascaleDbStorageVaultListResult` was added + +* `models.GridImageType` was added + +* `models.ExascaleDbStorageVault` was added + +* `models.DbNodeDetails` was added + +* `models.ExascaleDbStorageVault$UpdateStages` was added + +* `models.FlexComponent` was added + +* `models.FlexComponentListResult` was added + +* `models.ExascaleDbStorageVaults` was added + +* `models.ExascaleDbStorageDetails` was added + +* `models.ExadbVmClusters` was added + +* `models.AutonomousDatabaseCrossRegionDisasterRecoveryProperties` 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 + +* `models.ExadbVmClusterUpdateProperties` was added + +* `models.ExadbVmClusterListResult` was added + +* `models.ExadbVmCluster` was added + +* `models.ExadbVmCluster$UpdateStages` was added + +* `models.GiMinorVersions` was added + +* `models.GiMinorVersionListResult` was added + +* `models.ExascaleDbStorageVault$DefinitionStages` was added + +* `models.ExadbVmCluster$Definition` was added + +* `models.FileSystemConfigurationDetails` was added + +* `models.ExascaleDbNodeProperties` was added + +* `models.SystemShapes` was added + +* `models.AddSubscriptionOperationState` was added + +* `models.ExadbVmClusterLifecycleState` was added + +* `models.ExadbVmCluster$DefinitionStages` was added + +* `models.FlexComponentProperties` was added + +* `models.ExascaleDbNodes` was added + +* `models.HardwareType` was added + +* `models.ExascaleDbStorageVault$Definition` was added + +* `models.GiMinorVersionProperties` was added + +* `models.ExadbVmClusterStorageDetails` was added + +* `models.ExascaleDbStorageVaultProperties` was added + +* `models.ExascaleDbStorageVaultTagsUpdate` was added + +* `models.DbActionResponse` was added + +* `models.ExascaleDbStorageInputDetails` was added + +* `models.GiMinorVersion` was added + +* `models.ExascaleDbStorageVault$Update` was added + +* `models.ExascaleDbNode` was added + +* `models.ExascaleDbNodeListResult` was added + +* `models.ExadbVmCluster$Update` was added + +#### `models.DbNodeProperties` was modified + +* `withVnic2Id(java.lang.String)` was added +* `withVnicId(java.lang.String)` was added +* `withFaultDomain(java.lang.String)` was added +* `withAdditionalDetails(java.lang.String)` was added +* `withDbServerId(java.lang.String)` was added +* `withDbSystemId(java.lang.String)` was added +* `withSoftwareStorageSizeInGb(java.lang.Integer)` was added +* `withHostIpId(java.lang.String)` was added +* `withMaintenanceType(models.DbNodeMaintenanceType)` was added +* `withOcid(java.lang.String)` was added +* `withLifecycleDetails(java.lang.String)` was added +* `withLifecycleState(models.DbNodeProvisioningState)` was added +* `withTimeMaintenanceWindowEnd(java.time.OffsetDateTime)` was added +* `withMemorySizeInGbs(java.lang.Integer)` was added +* `withDbNodeStorageSizeInGbs(java.lang.Integer)` was added +* `withBackupIpId(java.lang.String)` was added +* `withBackupVnicId(java.lang.String)` was added +* `withCpuCoreCount(java.lang.Integer)` was added +* `withBackupVnic2Id(java.lang.String)` was added +* `withHostname(java.lang.String)` was added +* `withTimeCreated(java.time.OffsetDateTime)` was added +* `withTimeMaintenanceWindowStart(java.time.OffsetDateTime)` was added + +#### `models.CloudVmClusterProperties` was modified + +* `withFileSystemConfigurationDetails(java.util.List)` was added +* `fileSystemConfigurationDetails()` was added +* `computeModel()` 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.SystemVersionProperties` was modified + +* `withSystemVersion(java.lang.String)` was added + +#### `models.DbNodes` was modified + +* `listByParent(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByParent(java.lang.String,java.lang.String)` was added + +#### `models.PeerDbDetails` was modified + +* `peerDbOcid()` was added +* `withPeerDbLocation(java.lang.String)` was added +* `peerDbLocation()` was added +* `withPeerDbOcid(java.lang.String)` was added + +#### `models.DbSystemShapeProperties` was modified + +* `withAreServerTypesSupported(java.lang.Boolean)` was added +* `withAvailableCoreCountPerNode(java.lang.Integer)` was added +* `withCoreCountIncrement(java.lang.Integer)` was added +* `displayName()` was added +* `withAvailableDbNodePerNodeInGbs(java.lang.Integer)` was added +* `withAvailableDbNodeStorageInGbs(java.lang.Integer)` was added +* `withAvailableCoreCount(int)` was added +* `withAvailableDataStorageInTbs(java.lang.Integer)` was added +* `withDisplayName(java.lang.String)` was added +* `withMinDataStorageInTbs(java.lang.Integer)` was added +* `withShapeName(java.lang.String)` was added +* `areServerTypesSupported()` was added +* `withComputeModel(models.ComputeModel)` was added +* `withAvailableMemoryInGbs(java.lang.Integer)` was added +* `withMaximumNodeCount(java.lang.Integer)` was added +* `computeModel()` was added +* `withMinCoreCountPerNode(java.lang.Integer)` was added +* `withMaxStorageCount(java.lang.Integer)` was added +* `withMinDbNodeStoragePerNodeInGbs(java.lang.Integer)` was added +* `withShapeFamily(java.lang.String)` was added +* `withRuntimeMinimumCoreCount(java.lang.Integer)` was added +* `withMinimumCoreCount(java.lang.Integer)` was added +* `withMinMemoryPerNodeInGbs(java.lang.Integer)` was added +* `withMinStorageCount(java.lang.Integer)` was added +* `withAvailableMemoryPerNodeInGbs(java.lang.Integer)` was added +* `shapeName()` was added +* `withMinimumNodeCount(java.lang.Integer)` was added +* `withAvailableDataStoragePerServerInTbs(java.lang.Double)` was added + +#### `models.DbServers` was modified + +* `listByParent(java.lang.String,java.lang.String)` was added +* `listByParent(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.AutonomousDatabase` was modified + +* `changeDisasterRecoveryConfiguration(models.DisasterRecoveryConfigurationDetails,com.azure.core.util.Context)` was added +* `changeDisasterRecoveryConfiguration(models.DisasterRecoveryConfigurationDetails)` was added + +#### `models.VirtualNetworkAddresses` was modified + +* `listByParent(java.lang.String,java.lang.String)` was added +* `listByParent(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.AutonomousDatabaseBackupUpdate` was modified + +* `systemData()` was added +* `type()` was added +* `name()` was added +* `withProperties(models.AutonomousDatabaseBackupProperties)` was added +* `id()` was added + +#### `models.DbSystemShapes` was modified + +* `listByLocation(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.AutonomousDatabaseBackups` was modified + +* `listByParent(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByParent(java.lang.String,java.lang.String)` was added + +#### `models.DnsPrivateZoneProperties` was modified + +* `withIsProtected(boolean)` was added +* `withZoneType(models.ZoneType)` was added +* `withSelf(java.lang.String)` was added +* `withTimeCreated(java.time.OffsetDateTime)` was added +* `withVersion(java.lang.String)` was added +* `withViewId(java.lang.String)` was added +* `withOcid(java.lang.String)` was added +* `withLifecycleState(models.DnsPrivateZonesLifecycleState)` was added +* `withSerial(int)` 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 + +* `exascaleDbStorageVaults()` was added +* `exadbVmClusters()` was added +* `flexComponents()` was added +* `giMinorVersions()` was added +* `exascaleDbNodes()` was added + +#### `models.OracleSubscriptionProperties` was modified + +* `azureSubscriptionIds()` was added +* `lastOperationStatusDetail()` was added +* `addSubscriptionOperationState()` was added + +#### `models.CloudExadataInfrastructureProperties` was modified + +* `databaseServerType()` was added +* `definedFileSystemConfiguration()` was added +* `withStorageServerType(java.lang.String)` was added +* `computeModel()` was added +* `storageServerType()` was added +* `withDatabaseServerType(java.lang.String)` was added + +#### `models.AutonomousDbVersionProperties` was modified + +* `withIsDefaultForFree(java.lang.Boolean)` was added +* `withIsDefaultForPaid(java.lang.Boolean)` was added +* `withIsPaidEnabled(java.lang.Boolean)` was added +* `withVersion(java.lang.String)` was added +* `withDbWorkload(models.WorkloadType)` was added +* `withIsFreeTierEnabled(java.lang.Boolean)` 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.AutonomousDatabaseCharacterSetProperties` was modified + +* `withCharacterSet(java.lang.String)` was added + +#### `models.AutonomousDatabaseNationalCharacterSetProperties` was modified + +* `withCharacterSet(java.lang.String)` was added + +#### `models.AutonomousDatabaseBaseProperties` was modified + +* `remoteDisasterRecoveryConfiguration()` was added +* `timeDisasterRecoveryRoleChanged()` was added + +#### `models.DnsPrivateViewProperties` was modified + +* `withOcid(java.lang.String)` was added +* `withIsProtected(boolean)` was added +* `withSelf(java.lang.String)` was added +* `withDisplayName(java.lang.String)` was added +* `withTimeCreated(java.time.OffsetDateTime)` was added +* `withLifecycleState(models.DnsPrivateViewsLifecycleState)` was added +* `withTimeUpdated(java.time.OffsetDateTime)` was added + +#### `models.CloudVmClusterUpdateProperties` was modified + +* `fileSystemConfigurationDetails()` was added +* `withFileSystemConfigurationDetails(java.util.List)` was added + +#### `models.AutonomousDatabaseBackup$Update` was modified + +* `withProperties(models.AutonomousDatabaseBackupProperties)` was added + +#### `models.GiVersionProperties` was modified -### Other Changes +* `withVersion(java.lang.String)` 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..9f17fc4bc07e 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/README.md +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/README.md @@ -2,7 +2,7 @@ Azure Resource Manager OracleDatabase 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 OracleDatabase Management SDK. Package tag package-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 @@ -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..d2e35d983feb 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/SAMPLE.md @@ -6,7 +6,7 @@ - [CreateOrUpdate](#autonomousdatabasebackups_createorupdate) - [Delete](#autonomousdatabasebackups_delete) - [Get](#autonomousdatabasebackups_get) -- [ListByAutonomousDatabase](#autonomousdatabasebackups_listbyautonomousdatabase) +- [ListByParent](#autonomousdatabasebackups_listbyparent) - [Update](#autonomousdatabasebackups_update) ## AutonomousDatabaseCharacterSets @@ -26,6 +26,7 @@ ## AutonomousDatabases +- [ChangeDisasterRecoveryConfiguration](#autonomousdatabases_changedisasterrecoveryconfiguration) - [CreateOrUpdate](#autonomousdatabases_createorupdate) - [Delete](#autonomousdatabases_delete) - [Failover](#autonomousdatabases_failover) @@ -64,12 +65,12 @@ - [Action](#dbnodes_action) - [Get](#dbnodes_get) -- [ListByCloudVmCluster](#dbnodes_listbycloudvmcluster) +- [ListByParent](#dbnodes_listbyparent) ## DbServers - [Get](#dbservers_get) -- [ListByCloudExadataInfrastructure](#dbservers_listbycloudexadatainfrastructure) +- [ListByParent](#dbservers_listbyparent) ## DbSystemShapes @@ -86,6 +87,41 @@ - [Get](#dnsprivatezones_get) - [ListByLocation](#dnsprivatezones_listbylocation) +## ExadbVmClusters + +- [CreateOrUpdate](#exadbvmclusters_createorupdate) +- [Delete](#exadbvmclusters_delete) +- [GetByResourceGroup](#exadbvmclusters_getbyresourcegroup) +- [List](#exadbvmclusters_list) +- [ListByResourceGroup](#exadbvmclusters_listbyresourcegroup) +- [RemoveVms](#exadbvmclusters_removevms) +- [Update](#exadbvmclusters_update) + +## ExascaleDbNodes + +- [Action](#exascaledbnodes_action) +- [Get](#exascaledbnodes_get) +- [ListByParent](#exascaledbnodes_listbyparent) + +## ExascaleDbStorageVaults + +- [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) @@ -97,6 +133,7 @@ ## OracleSubscriptions +- [AddAzureSubscriptions](#oraclesubscriptions_addazuresubscriptions) - [CreateOrUpdate](#oraclesubscriptions_createorupdate) - [Delete](#oraclesubscriptions_delete) - [Get](#oraclesubscriptions_get) @@ -116,7 +153,7 @@ - [CreateOrUpdate](#virtualnetworkaddresses_createorupdate) - [Delete](#virtualnetworkaddresses_delete) - [Get](#virtualnetworkaddresses_get) -- [ListByCloudVmCluster](#virtualnetworkaddresses_listbycloudvmcluster) +- [ListByParent](#virtualnetworkaddresses_listbyparent) ### AutonomousDatabaseBackups_CreateOrUpdate ```java @@ -128,7 +165,7 @@ import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupP public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_create. * json */ /** @@ -148,7 +185,7 @@ public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_create. * json */ /** @@ -177,7 +214,7 @@ public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { public final class AutonomousDatabaseBackupsDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_delete. * json */ /** @@ -193,7 +230,7 @@ public final class AutonomousDatabaseBackupsDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_delete. * json */ /** @@ -218,7 +255,7 @@ public final class AutonomousDatabaseBackupsDeleteSamples { public final class AutonomousDatabaseBackupsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get. * json */ /** @@ -234,7 +271,7 @@ public final class AutonomousDatabaseBackupsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get. * json */ /** @@ -250,15 +287,15 @@ public final class AutonomousDatabaseBackupsGetSamples { } ``` -### AutonomousDatabaseBackups_ListByAutonomousDatabase +### AutonomousDatabaseBackups_ListByParent ```java /** - * Samples for AutonomousDatabaseBackups ListByAutonomousDatabase. + * Samples for AutonomousDatabaseBackups ListByParent. */ -public final class AutonomousDatabaseBackupsListByAutonomousDatabaseSamples { +public final class AutonomousDatabaseBackupsListByParentSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseBackup_listByParent.json */ /** @@ -268,23 +305,7 @@ public final class AutonomousDatabaseBackupsListByAutonomousDatabaseSamples { */ 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 - */ - /** - * 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); + manager.autonomousDatabaseBackups().listByParent("rg000", "databasedb1", com.azure.core.util.Context.NONE); } } ``` @@ -300,7 +321,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. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_patch. * json */ /** @@ -318,7 +339,7 @@ public final class AutonomousDatabaseBackupsUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_patch. * json */ /** @@ -344,7 +365,7 @@ public final class AutonomousDatabaseBackupsUpdateSamples { */ public final class AutonomousDatabaseCharacterSetsGetSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseCharacterSet_get.json */ /** @@ -368,7 +389,7 @@ public final class AutonomousDatabaseCharacterSetsGetSamples { */ public final class AutonomousDatabaseCharacterSetsListByLocationSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseCharacterSet_listByLocation.json */ /** @@ -391,7 +412,7 @@ public final class AutonomousDatabaseCharacterSetsListByLocationSamples { */ public final class AutonomousDatabaseNationalCharacterSetsGetSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseNationalCharacterSet_get.json */ /** @@ -415,7 +436,7 @@ public final class AutonomousDatabaseNationalCharacterSetsGetSamples { */ public final class AutonomousDatabaseNationalCharacterSetsListByLocationSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseNationalCharacterSet_listByLocation.json */ /** @@ -439,7 +460,7 @@ public final class AutonomousDatabaseNationalCharacterSetsListByLocationSamples public final class AutonomousDatabaseVersionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseVersion_get. * json */ /** @@ -461,7 +482,7 @@ public final class AutonomousDatabaseVersionsGetSamples { */ public final class AutonomousDatabaseVersionsListByLocationSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseVersion_listByLocation.json */ /** @@ -476,13 +497,63 @@ public final class AutonomousDatabaseVersionsListByLocationSamples { } ``` +### AutonomousDatabases_ChangeDisasterRecoveryConfiguration + +```java +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: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * autonomousDatabase_changeDisasterRecoveryConfiguration.json + */ + /** + * Sample code: Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void performChangeDisasterRecoveryConfigurationActionOnAutonomousDatabase( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .changeDisasterRecoveryConfiguration("rg000", "databasedb1", + new DisasterRecoveryConfigurationDetails().withDisasterRecoveryType(DisasterRecoveryType.ADG) + .withIsReplicateAutomaticBackups(false), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + ### AutonomousDatabases_CreateOrUpdate ```java import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCloneProperties; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCrossRegionDisasterRecoveryProperties; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseProperties; import com.azure.resourcemanager.oracledatabase.models.CloneType; import com.azure.resourcemanager.oracledatabase.models.ComputeModel; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType; import java.util.HashMap; import java.util.Map; @@ -492,7 +563,7 @@ import java.util.Map; public final class AutonomousDatabasesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_create.json */ /** * Sample code: AutonomousDatabases_CreateOrUpdate. @@ -521,9 +592,38 @@ public final class AutonomousDatabasesCreateOrUpdateSamples { .create(); } + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * autonomousDatabaseCrossRegionPeer_create.json + */ + /** + * Sample code: AutonomousDatabases_CreateOrUpdate_CrossRegionPeer. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void autonomousDatabasesCreateOrUpdateCrossRegionPeer( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new AutonomousDatabaseCrossRegionDisasterRecoveryProperties().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") + .withSourceLocation("germanywestcentral") + .withSourceOcid("ocid1..aaaaa") + .withRemoteDisasterRecoveryType(DisasterRecoveryType.ADG) + .withIsReplicateAutomaticBackups(false)) + .create(); + } + /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_create.json */ /** * Sample code: Create Autonomous Database. @@ -554,7 +654,7 @@ public final class AutonomousDatabasesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseClone_create. * json */ /** @@ -588,7 +688,7 @@ public final class AutonomousDatabasesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseClone_create. * json */ /** @@ -643,7 +743,7 @@ public final class AutonomousDatabasesCreateOrUpdateSamples { public final class AutonomousDatabasesDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_delete.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_delete.json */ /** * Sample code: Delete Autonomous Database. @@ -668,7 +768,7 @@ import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; public final class AutonomousDatabasesFailoverSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_failover.json */ /** * Sample code: AutonomousDatabases_Failover. @@ -684,7 +784,7 @@ public final class AutonomousDatabasesFailoverSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_failover.json */ /** * Sample code: Perform failover action on Autonomous Database. @@ -711,7 +811,7 @@ import com.azure.resourcemanager.oracledatabase.models.GenerateType; */ public final class AutonomousDatabasesGenerateWalletSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabase_generateWallet.json */ /** @@ -740,7 +840,7 @@ public final class AutonomousDatabasesGenerateWalletSamples { public final class AutonomousDatabasesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json */ /** * Sample code: Get Autonomous Database. @@ -754,7 +854,7 @@ public final class AutonomousDatabasesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json */ /** * Sample code: AutonomousDatabases_Get. @@ -776,7 +876,7 @@ public final class AutonomousDatabasesGetByResourceGroupSamples { */ public final class AutonomousDatabasesListSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabase_listBySubscription.json */ /** @@ -799,7 +899,7 @@ public final class AutonomousDatabasesListSamples { */ public final class AutonomousDatabasesListByResourceGroupSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabase_listByResourceGroup.json */ /** @@ -826,7 +926,7 @@ import java.time.OffsetDateTime; public final class AutonomousDatabasesRestoreSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_restore.json */ /** * Sample code: AutonomousDatabases_Restore. @@ -843,7 +943,7 @@ public final class AutonomousDatabasesRestoreSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_restore.json */ /** * Sample code: Perform restore action on Autonomous Database. @@ -869,7 +969,7 @@ public final class AutonomousDatabasesRestoreSamples { public final class AutonomousDatabasesShrinkSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_shrink.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_shrink.json */ /** * Sample code: Perform shrink action on Autonomous Database. @@ -894,7 +994,7 @@ import com.azure.resourcemanager.oracledatabase.models.PeerDbDetails; public final class AutonomousDatabasesSwitchoverSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_switchover. * json */ /** @@ -911,7 +1011,7 @@ public final class AutonomousDatabasesSwitchoverSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_switchover. * json */ /** @@ -939,7 +1039,7 @@ import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabase; public final class AutonomousDatabasesUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_patch.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_patch.json */ /** * Sample code: Patch Autonomous Database. @@ -964,7 +1064,7 @@ public final class AutonomousDatabasesUpdateSamples { public final class CloudExadataInfrastructuresAddStorageCapacitySamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_addStorageCapacity.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_addStorageCapacity.json */ /** * Sample code: Perform add storage capacity on exadata infra. @@ -992,7 +1092,7 @@ import java.util.Map; public final class CloudExadataInfrastructuresCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_create.json */ /** * Sample code: Create Exadata Infrastructure. @@ -1037,7 +1137,7 @@ public final class CloudExadataInfrastructuresCreateOrUpdateSamples { public final class CloudExadataInfrastructuresDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_delete.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_delete.json */ /** * Sample code: Delete Exadata Infrastructure. @@ -1060,7 +1160,7 @@ public final class CloudExadataInfrastructuresDeleteSamples { public final class CloudExadataInfrastructuresGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_get.json */ /** * Sample code: Get Exadata Infrastructure. @@ -1084,7 +1184,7 @@ public final class CloudExadataInfrastructuresGetByResourceGroupSamples { public final class CloudExadataInfrastructuresListSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listBySubscription.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_listBySubscription.json */ /** * Sample code: List Exadata Infrastructure by subscription. @@ -1107,7 +1207,7 @@ public final class CloudExadataInfrastructuresListSamples { public final class CloudExadataInfrastructuresListByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listByResourceGroup. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_listByResourceGroup. * json */ /** @@ -1133,7 +1233,7 @@ import com.azure.resourcemanager.oracledatabase.models.CloudExadataInfrastructur public final class CloudExadataInfrastructuresUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_patch.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_patch.json */ /** * Sample code: Patch Exadata Infrastructure. @@ -1162,7 +1262,7 @@ import java.util.Arrays; public final class CloudVmClustersAddVmsSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_addVms.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_addVms.json */ /** * Sample code: Add VMs to VM Cluster. @@ -1196,7 +1296,7 @@ import java.util.Map; public final class CloudVmClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_create.json */ /** * Sample code: Create VM Cluster. @@ -1268,7 +1368,7 @@ public final class CloudVmClustersCreateOrUpdateSamples { public final class CloudVmClustersDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_delete.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_delete.json */ /** * Sample code: Delete VM Cluster. @@ -1290,7 +1390,7 @@ public final class CloudVmClustersDeleteSamples { public final class CloudVmClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_get.json */ /** * Sample code: Get VM Cluster. @@ -1312,7 +1412,7 @@ public final class CloudVmClustersGetByResourceGroupSamples { public final class CloudVmClustersListSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listBySubscription. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_listBySubscription. * json */ /** @@ -1336,7 +1436,7 @@ public final class CloudVmClustersListSamples { public final class CloudVmClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listByResourceGroup. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_listByResourceGroup. * json */ /** @@ -1361,7 +1461,7 @@ import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressesFilter; */ public final class CloudVmClustersListPrivateIpAddressesSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * vmClusters_listPrivateIpAddresses.json */ /** @@ -1391,7 +1491,7 @@ 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 + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_removeVms.json */ /** * Sample code: Remove VMs from VM Cluster. @@ -1417,7 +1517,7 @@ import com.azure.resourcemanager.oracledatabase.models.CloudVmCluster; public final class CloudVmClustersUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_patch.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_patch.json */ /** * Sample code: Patch VM Cluster. @@ -1445,7 +1545,7 @@ import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; public final class DbNodesActionSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_action.json */ /** * Sample code: DbNodes_Action. @@ -1460,7 +1560,7 @@ public final class DbNodesActionSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_action.json */ /** * Sample code: VM actions on DbNodes of VM Cluster. @@ -1485,7 +1585,7 @@ public final class DbNodesActionSamples { public final class DbNodesGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_get.json */ /** * Sample code: Get DbNode. @@ -1498,16 +1598,16 @@ public final class DbNodesGetSamples { } ``` -### DbNodes_ListByCloudVmCluster +### DbNodes_ListByParent ```java /** - * Samples for DbNodes ListByCloudVmCluster. + * Samples for DbNodes ListByParent. */ -public final class DbNodesListByCloudVmClusterSamples { +public final class DbNodesListByParentSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_listByParent.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_listByParent.json */ /** * Sample code: List DbNodes by VM Cluster. @@ -1515,7 +1615,7 @@ public final class DbNodesListByCloudVmClusterSamples { * @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); + manager.dbNodes().listByParent("rg000", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -1529,7 +1629,7 @@ public final class DbNodesListByCloudVmClusterSamples { public final class DbServersGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_get.json */ /** * Sample code: Get DbServer by parent. @@ -1542,16 +1642,16 @@ public final class DbServersGetSamples { } ``` -### DbServers_ListByCloudExadataInfrastructure +### DbServers_ListByParent ```java /** - * Samples for DbServers ListByCloudExadataInfrastructure. + * Samples for DbServers ListByParent. */ -public final class DbServersListByCloudExadataInfrastructureSamples { +public final class DbServersListByParentSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_listByParent.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_listByParent.json */ /** * Sample code: List DbServers by Exadata Infrastructure. @@ -1560,7 +1660,7 @@ public final class DbServersListByCloudExadataInfrastructureSamples { */ public static void listDbServersByExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); + manager.dbServers().listByParent("rg000", "infra1", com.azure.core.util.Context.NONE); } } ``` @@ -1574,7 +1674,7 @@ public final class DbServersListByCloudExadataInfrastructureSamples { public final class DbSystemShapesGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_get.json */ /** * Sample code: Get a DbSystemShape by name. @@ -1596,7 +1696,7 @@ public final class DbSystemShapesGetSamples { public final class DbSystemShapesListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_listByLocation. * json */ /** @@ -1606,7 +1706,7 @@ public final class DbSystemShapesListByLocationSamples { */ public static void listDbSystemShapesByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().listByLocation("eastus", com.azure.core.util.Context.NONE); + manager.dbSystemShapes().listByLocation("eastus", null, com.azure.core.util.Context.NONE); } } ``` @@ -1620,7 +1720,7 @@ public final class DbSystemShapesListByLocationSamples { public final class DnsPrivateViewsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_get.json */ /** * Sample code: Get a DnsPrivateView by name. @@ -1643,7 +1743,7 @@ public final class DnsPrivateViewsGetSamples { public final class DnsPrivateViewsListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_listByLocation. * json */ /** @@ -1667,7 +1767,7 @@ public final class DnsPrivateViewsListByLocationSamples { public final class DnsPrivateZonesGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_get.json */ /** * Sample code: Get a DnsPrivateZone by name. @@ -1691,7 +1791,7 @@ public final class DnsPrivateZonesGetSamples { public final class DnsPrivateZonesListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_listByLocation. * json */ /** @@ -1706,6 +1806,624 @@ public final class DnsPrivateZonesListByLocationSamples { } ``` +### ExadbVmClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracledatabase.models.DataCollectionOptions; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterProperties; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterStorageDetails; +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 ExadbVmClusters CreateOrUpdate. + */ +public final class ExadbVmClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_CreateOrUpdate_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersCreateOrUpdateMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .define("clusterName") + .withRegion("xojp") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key9683", "fakeTokenPlaceholder")) + .withProperties(new ExadbVmClusterProperties().withClusterName("hssswln") + .withBackupSubnetCidr("fr") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(true) + .withIsHealthMonitoringEnabled(true) + .withIsIncidentLogsEnabled(true)) + .withDisplayName( + "dyhkncxzzgcwlfkfygvqlvqbxekvkbhjprmuxtaukewjnfrrnfqgrqsjfgsayrezkspqplrduuomuvtpkqurcoqjdnadlvedgfngglcgafbxtcewxlgckvehhqgfwkokbjoqftunjsgfjwbdaftxoytsphydwogtlnfxxuzzjvqcrin") + .withDomain("vzfak") + .withEnabledEcpuCount(0) + .withExascaleDbStorageVaultId( + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/exascaleDbStorageVaults/storageVaultName") + .withGridImageOcid("ocid1.dbpatch.oc1..aaaaa3klq") + .withHostname("tdn") + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withNodeCount(8) + .withNsgCidrs(Arrays.asList(new NsgCidr().withSource("10.0.0.0/16") + .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)))) + .withPrivateZoneOcid("ocid1.autonomousdatabase.oc1..aaaaa3klq") + .withScanListenerPortTcp(9) + .withScanListenerPortTcpSsl(18) + .withShape("evenjblxxfsztdxlcr") + .withSshPublicKeys(Arrays.asList("wiseakllkohemfmnoyteg")) + .withSystemVersion( + "udwsykstqawwjrvzebfyyccnjzhxtijvywlgnrkqxnboibyppistnbvqqsnsxmjnzeumgnatmarzfnjhglmtrknszthrxtwewwqjbkwytbhtjbgondtktkpvjmxdcuyjupr") + .withTimeZone( + "ayuqnpfkasdzmxlfnkjzrenyogbvcysdbkstjhyjdgxygitlykihtwdiktilukyplgxovaonrqcqaviyaqgyrqfrklqvqyobnxgmzpqbgjhdtjdquhyqnvhavnqpfupaqhdedgdvfomeueeuwjjfiqiyxspybpyj") + .withTotalEcpuCount(56) + .withVmFileSystemStorage(new ExadbVmClusterStorageDetails().withTotalSizeInGbs(10))) + .withZones(Arrays.asList("iupjvcfsbvfhrebwf")) + .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; + } +} +``` + +### ExadbVmClusters_Delete + +```java +/** + * Samples for ExadbVmClusters Delete. + */ +public final class ExadbVmClustersDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Delete_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersDeleteMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().delete("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_GetByResourceGroup + +```java +/** + * Samples for ExadbVmClusters GetByResourceGroup. + */ +public final class ExadbVmClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_Get_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_List + +```java +/** + * Samples for ExadbVmClusters List. + */ +public final class ExadbVmClustersListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_ListBySubscription_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersListBySubscriptionMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_ListByResourceGroup + +```java +/** + * Samples for ExadbVmClusters ListByResourceGroup. + */ +public final class ExadbVmClustersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_ListByResourceGroup_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersListByResourceGroupMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} +``` + +### ExadbVmClusters_RemoveVms + +```java +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: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### ExadbVmClusters_Update + +```java +import com.azure.resourcemanager.oracledatabase.models.ExadbVmCluster; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdateProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExadbVmClusters Update. + */ +public final class ExadbVmClustersUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_Update_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Update_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersUpdateMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + ExadbVmCluster resource = manager.exadbVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key6027", "fakeTokenPlaceholder")) + .withZones(Arrays.asList("zcqfxmpauiqjphmhwwt")) + .withProperties(new ExadbVmClusterUpdateProperties().withNodeCount(9)) + .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; + } +} +``` + +### ExascaleDbNodes_Action + +```java +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: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### ExascaleDbNodes_Get + +```java +/** + * Samples for ExascaleDbNodes Get. + */ +public final class ExascaleDbNodesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExascaleDbNodes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbNodesGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes() + .getWithResponse("rgopenapi", "vmClusterName", "dbNodeName", com.azure.core.util.Context.NONE); + } +} +``` + +### ExascaleDbNodes_ListByParent + +```java +/** + * Samples for ExascaleDbNodes ListByParent. + */ +public final class ExascaleDbNodesListByParentSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### ExascaleDbStorageVaults_Create + +```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 ExascaleDbStorageVaults Create. + */ +public final class ExascaleDbStorageVaultsCreateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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; + } +} +``` + +### ExascaleDbStorageVaults_Delete + +```java +/** + * Samples for ExascaleDbStorageVaults Delete. + */ +public final class ExascaleDbStorageVaultsDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### ExascaleDbStorageVaults_GetByResourceGroup + +```java +/** + * Samples for ExascaleDbStorageVaults GetByResourceGroup. + */ +public final class ExascaleDbStorageVaultsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### ExascaleDbStorageVaults_List + +```java +/** + * Samples for ExascaleDbStorageVaults List. + */ +public final class ExascaleDbStorageVaultsListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### ExascaleDbStorageVaults_ListByResourceGroup + +```java +/** + * Samples for ExascaleDbStorageVaults ListByResourceGroup. + */ +public final class ExascaleDbStorageVaultsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### ExascaleDbStorageVaults_Update + +```java +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: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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; + } +} +``` + +### FlexComponents_Get + +```java +/** + * Samples for FlexComponents Get. + */ +public final class FlexComponentsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### FlexComponents_ListByParent + +```java +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + +/** + * Samples for FlexComponents ListByParent. + */ +public final class FlexComponentsListByParentSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### GiMinorVersions_Get + +```java +/** + * Samples for GiMinorVersions Get. + */ +public final class GiMinorVersionsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + +### GiMinorVersions_ListByParent + +```java +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; + +/** + * Samples for GiMinorVersions ListByParent. + */ +public final class GiMinorVersionsListByParentSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } +} +``` + ### GiVersions_Get ```java @@ -1715,7 +2433,22 @@ public final class DnsPrivateZonesListByLocationSamples { public final class GiVersionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MinimumSet_Gen. + * json + */ + /** + * Sample code: Get a GiVersion by name - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAGiVersionByNameGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().getWithResponse("eastus", "giVersionName", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/giVersions_get.json */ /** * Sample code: Get a GiVersion by name. @@ -1725,28 +2458,62 @@ public final class GiVersionsGetSamples { public static void getAGiVersionByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.giVersions().getWithResponse("eastus", "19.0.0.0", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MaximumSet_Gen. + * json + */ + /** + * Sample code: Get a GiVersion by name - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAGiVersionByNameGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().getWithResponse("eastus", "giVersionName", com.azure.core.util.Context.NONE); + } } ``` ### GiVersions_ListByLocation ```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: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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); + } + + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * GiVersions_ListByLocation_MinimumSet_Gen.json + */ + /** + * Sample code: List GiVersions by location - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void listGiVersionsByLocationGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().listByLocation("eastus", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1760,7 +2527,7 @@ public final class GiVersionsListByLocationSamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/operations_list.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/operations_list.json */ /** * Sample code: List Operations. @@ -1773,6 +2540,34 @@ public final class OperationsListSamples { } ``` +### OracleSubscriptions_AddAzureSubscriptions + +```java +import com.azure.resourcemanager.oracledatabase.models.AzureSubscriptions; +import java.util.Arrays; + +/** + * Samples for OracleSubscriptions AddAzureSubscriptions. + */ +public final class OracleSubscriptionsAddAzureSubscriptionsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * oracleSubscriptions_addAzureSubscriptions.json + */ + /** + * Sample code: Add Azure Subscriptions to the OracleSubscription. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void addAzureSubscriptionsToTheOracleSubscription( + 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); + } +} +``` + ### OracleSubscriptions_CreateOrUpdate ```java @@ -1786,7 +2581,7 @@ import com.azure.resourcemanager.oracledatabase.models.Plan; public final class OracleSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_create.json */ /** * Sample code: Create or Update Oracle Subscription. @@ -1816,7 +2611,7 @@ public final class OracleSubscriptionsCreateOrUpdateSamples { public final class OracleSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_delete.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_delete.json */ /** * Sample code: Delete Oracle Subscription. @@ -1839,7 +2634,7 @@ public final class OracleSubscriptionsDeleteSamples { public final class OracleSubscriptionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_get.json */ /** * Sample code: Get Oracle Subscription. @@ -1860,7 +2655,7 @@ public final class OracleSubscriptionsGetSamples { */ public final class OracleSubscriptionsListSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * oracleSubscriptions_listBySubscription.json */ /** @@ -1883,7 +2678,7 @@ public final class OracleSubscriptionsListSamples { */ public final class OracleSubscriptionsListActivationLinksSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * oracleSubscriptions_listActivationLinks.json */ /** @@ -1906,7 +2701,7 @@ public final class OracleSubscriptionsListActivationLinksSamples { */ public final class OracleSubscriptionsListCloudAccountDetailsSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * oracleSubscriptions_listCloudAccountDetails.json */ /** @@ -1929,7 +2724,7 @@ public final class OracleSubscriptionsListCloudAccountDetailsSamples { */ public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * oracleSubscriptions_listSaasSubscriptionDetails.json */ /** @@ -1955,7 +2750,7 @@ import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; public final class OracleSubscriptionsUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_patch.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_patch.json */ /** * Sample code: Patch Oracle Subscription. @@ -1977,7 +2772,7 @@ public final class OracleSubscriptionsUpdateSamples { public final class SystemVersionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json */ /** * Sample code: systemVersions_listSystemVersions. @@ -1991,7 +2786,7 @@ public final class SystemVersionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json */ /** * Sample code: Get Exadata System Version. @@ -2013,7 +2808,7 @@ public final class SystemVersionsGetSamples { public final class SystemVersionsListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_listByLocation. * json */ /** @@ -2028,7 +2823,7 @@ public final class SystemVersionsListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_listByLocation. * json */ /** @@ -2054,7 +2849,7 @@ import com.azure.resourcemanager.oracledatabase.models.VirtualNetworkAddressProp public final class VirtualNetworkAddressesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_create. * json */ /** @@ -2083,7 +2878,7 @@ public final class VirtualNetworkAddressesCreateOrUpdateSamples { public final class VirtualNetworkAddressesDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_delete. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_delete. * json */ /** @@ -2107,7 +2902,7 @@ public final class VirtualNetworkAddressesDeleteSamples { public final class VirtualNetworkAddressesGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_get.json */ /** * Sample code: Get Virtual Network Address. @@ -2122,15 +2917,15 @@ public final class VirtualNetworkAddressesGetSamples { } ``` -### VirtualNetworkAddresses_ListByCloudVmCluster +### VirtualNetworkAddresses_ListByParent ```java /** - * Samples for VirtualNetworkAddresses ListByCloudVmCluster. + * Samples for VirtualNetworkAddresses ListByParent. */ -public final class VirtualNetworkAddressesListByCloudVmClusterSamples { +public final class VirtualNetworkAddressesListByParentSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * virtualNetworkAddresses_listByParent.json */ /** @@ -2140,7 +2935,7 @@ public final class VirtualNetworkAddressesListByCloudVmClusterSamples { */ public static void listVirtualNetworkAddressesByVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.virtualNetworkAddresses().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); + manager.virtualNetworkAddresses().listByParent("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 470e2a9a42a9..daad37748999 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/pom.xml +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/pom.xml @@ -18,7 +18,7 @@ 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. + 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-2025-03-01. https://github.com/Azure/azure-sdk-for-java @@ -45,13 +45,10 @@ UTF-8 0 0 + true + false - - com.azure - azure-json - 1.5.0 - com.azure azure-core @@ -62,6 +59,11 @@ azure-core-management 1.17.0 + + com.azure + azure-json + 1.5.0 + com.azure azure-core-test 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..ae30ed3199ed 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 @@ -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.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,6 +37,11 @@ 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; @@ -45,8 +51,8 @@ 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; @@ -78,6 +90,10 @@ public final class OracleDatabaseManager { private CloudVmClusters cloudVmClusters; + private ExadbVmClusters exadbVmClusters; + + private ExascaleDbStorageVaults exascaleDbStorageVaults; + private AutonomousDatabaseCharacterSets autonomousDatabaseCharacterSets; private AutonomousDatabaseNationalCharacterSets autonomousDatabaseNationalCharacterSets; @@ -90,8 +106,12 @@ public final class OracleDatabaseManager { private DnsPrivateZones dnsPrivateZones; + private FlexComponents flexComponents; + private GiVersions giVersions; + private GiMinorVersions giMinorVersions; + private SystemVersions systemVersions; private OracleSubscriptions oracleSubscriptions; @@ -104,6 +124,8 @@ public final class OracleDatabaseManager { private VirtualNetworkAddresses virtualNetworkAddresses; + private ExascaleDbNodes exascaleDbNodes; + private final OracleDatabaseResourceManager clientObject; private OracleDatabaseManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -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; @@ -263,12 +288,14 @@ public OracleDatabaseManager authenticate(TokenCredential credential, AzureProfi 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())); @@ -363,6 +390,31 @@ public CloudVmClusters cloudVmClusters() { return cloudVmClusters; } + /** + * 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 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 the resource collection API of AutonomousDatabaseCharacterSets. * @@ -438,6 +490,18 @@ public DnsPrivateZones dnsPrivateZones() { return dnsPrivateZones; } + /** + * Gets the resource collection API of FlexComponents. + * + * @return Resource collection API of FlexComponents. + */ + public FlexComponents flexComponents() { + if (this.flexComponents == null) { + this.flexComponents = new FlexComponentsImpl(clientObject.getFlexComponents(), this); + } + return flexComponents; + } + /** * Gets the resource collection API of GiVersions. * @@ -450,6 +514,18 @@ public GiVersions giVersions() { 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; + } + /** * Gets the resource collection API of SystemVersions. * @@ -524,6 +600,18 @@ public VirtualNetworkAddresses virtualNetworkAddresses() { return virtualNetworkAddresses; } + /** + * 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 wrapped service client OracleDatabaseResourceManager providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. 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..14cc32240af3 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 @@ -30,8 +30,7 @@ public interface AutonomousDatabaseBackupsClient { * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename); + PagedIterable listByParent(String resourceGroupName, String autonomousdatabasename); /** * List AutonomousDatabaseBackup resources by AutonomousDatabase. @@ -46,8 +45,8 @@ PagedIterable listByAutonomousDatabase(String res * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename, Context context); + PagedIterable listByParent(String resourceGroupName, String autonomousdatabasename, + Context context); /** * Get a AutonomousDatabaseBackup. 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..b70de4c87d60 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 @@ -16,7 +16,7 @@ */ public interface AutonomousDatabaseCharacterSetsClient { /** - * 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. @@ -29,7 +29,7 @@ public interface AutonomousDatabaseCharacterSetsClient { PagedIterable listByLocation(String location); /** - * 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. 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..1f44624c5e9f 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 @@ -17,7 +17,7 @@ */ public interface AutonomousDatabaseNationalCharacterSetsClient { /** - * 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. @@ -30,7 +30,7 @@ public interface AutonomousDatabaseNationalCharacterSetsClient { PagedIterable listByLocation(String location); /** - * 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. 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..9ca8abc0c482 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 @@ -16,7 +16,7 @@ */ public interface AutonomousDatabaseVersionsClient { /** - * 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. @@ -28,7 +28,7 @@ public interface AutonomousDatabaseVersionsClient { PagedIterable listByLocation(String location); /** - * 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. 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..cf34c45d6176 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 @@ -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; @@ -274,6 +275,69 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String autonomousdatabasename, Context context); + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseInner> beginChangeDisasterRecoveryConfiguration( + String resourceGroupName, String autonomousdatabasename, DisasterRecoveryConfigurationDetails body); + + /** + * 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 com.azure.core.management.exception.ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseInner> beginChangeDisasterRecoveryConfiguration( + String resourceGroupName, String autonomousdatabasename, DisasterRecoveryConfigurationDetails body, + Context context); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + AutonomousDatabaseInner changeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body); + + /** + * 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 com.azure.core.management.exception.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) + AutonomousDatabaseInner changeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body, Context context); + /** * Perform failover action on Autonomous Database. * 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..e860caf80db1 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 @@ -29,7 +29,7 @@ public interface DbNodesClient { * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + PagedIterable listByParent(String resourceGroupName, String cloudvmclustername); /** * List DbNode resources by CloudVmCluster. @@ -43,8 +43,7 @@ public interface DbNodesClient { * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, - Context context); + PagedIterable listByParent(String resourceGroupName, String cloudvmclustername, Context context); /** * Get a DbNode. 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..45cc4f6be4af 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 @@ -26,8 +26,7 @@ public interface DbServersClient { * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename); + PagedIterable listByParent(String resourceGroupName, String cloudexadatainfrastructurename); /** * List DbServer resources by CloudExadataInfrastructure. @@ -41,8 +40,8 @@ PagedIterable listByCloudExadataInfrastructure(String resourceGro * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename, Context context); + PagedIterable listByParent(String resourceGroupName, String cloudexadatainfrastructurename, + Context context); /** * Get a DbServer. 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..ea61211fce4f 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 @@ -16,7 +16,7 @@ */ public interface DbSystemShapesClient { /** - * List DbSystemShape resources by Location. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,9 +28,10 @@ public interface DbSystemShapesClient { PagedIterable listByLocation(String location); /** - * 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. * @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. @@ -38,7 +39,7 @@ public interface DbSystemShapesClient { * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + PagedIterable listByLocation(String location, String zone, Context context); /** * Get a DbSystemShape. 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..c4dc500efd7b 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 @@ -16,7 +16,7 @@ */ public interface DnsPrivateViewsClient { /** - * 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. @@ -28,7 +28,7 @@ public interface DnsPrivateViewsClient { PagedIterable listByLocation(String location); /** - * 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. 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..6ce05d4468f1 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 @@ -16,7 +16,7 @@ */ public interface DnsPrivateZonesClient { /** - * 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. @@ -28,7 +28,7 @@ public interface DnsPrivateZonesClient { PagedIterable listByLocation(String location); /** - * 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. 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..561303d21cc0 --- /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) AutoRest 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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 exadbVmCluster resource definition. + */ + @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 exadbVmCluster resource definition. + */ + @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 exadbVmCluster resource definition. + */ + @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 exadbVmCluster resource definition. + */ + @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..f13892c71319 --- /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) AutoRest 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 { + /** + * 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); + + /** + * 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); + + /** + * 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 exascaleDbNode action response. + */ + @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 exascaleDbNode action response. + */ + @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 exascaleDbNode action 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 exascaleDbNode action 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..a9a66cd8acf8 --- /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) AutoRest 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 { + /** + * 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); + + /** + * 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); + + /** + * 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); +} 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..5cd6f31bc730 --- /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) AutoRest 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 { + /** + * 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); + + /** + * 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); +} 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..21f0c9671245 --- /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) AutoRest 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..26dc8d6463a3 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 @@ -10,13 +10,14 @@ 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. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,9 +29,11 @@ public interface GiVersionsClient { PagedIterable listByLocation(String location); /** - * 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. * @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. @@ -38,7 +41,7 @@ public interface GiVersionsClient { * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); + PagedIterable listByLocation(String location, SystemShapes shape, String zone, Context context); /** * Get a GiVersion. 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/OracleDatabaseResourceManager.java index 09cc41dda2cb..7e457bd86bc7 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/OracleDatabaseResourceManager.java @@ -74,6 +74,20 @@ public interface OracleDatabaseResourceManager { */ CloudVmClustersClient getCloudVmClusters(); + /** + * Gets the ExadbVmClustersClient object to access its operations. + * + * @return the ExadbVmClustersClient object. + */ + ExadbVmClustersClient getExadbVmClusters(); + + /** + * Gets the ExascaleDbStorageVaultsClient object to access its operations. + * + * @return the ExascaleDbStorageVaultsClient object. + */ + ExascaleDbStorageVaultsClient getExascaleDbStorageVaults(); + /** * Gets the AutonomousDatabaseCharacterSetsClient object to access its operations. * @@ -116,6 +130,13 @@ public interface OracleDatabaseResourceManager { */ DnsPrivateZonesClient getDnsPrivateZones(); + /** + * Gets the FlexComponentsClient object to access its operations. + * + * @return the FlexComponentsClient object. + */ + FlexComponentsClient getFlexComponents(); + /** * Gets the GiVersionsClient object to access its operations. * @@ -123,6 +144,13 @@ public interface OracleDatabaseResourceManager { */ GiVersionsClient getGiVersions(); + /** + * Gets the GiMinorVersionsClient object to access its operations. + * + * @return the GiMinorVersionsClient object. + */ + GiMinorVersionsClient getGiMinorVersions(); + /** * Gets the SystemVersionsClient object to access its operations. * @@ -164,4 +192,11 @@ public interface OracleDatabaseResourceManager { * @return the VirtualNetworkAddressesClient object. */ VirtualNetworkAddressesClient getVirtualNetworkAddresses(); + + /** + * Gets the ExascaleDbNodesClient object to access its operations. + * + * @return the ExascaleDbNodesClient object. + */ + ExascaleDbNodesClient getExascaleDbNodes(); } 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..baa667745ca3 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 @@ -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; /** @@ -211,6 +212,54 @@ public interface OracleSubscriptionsClient { @ServiceMethod(returns = ReturnType.SINGLE) void delete(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); + /** * List Activation Links. * 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..6556e32342d7 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 @@ -16,7 +16,7 @@ */ public interface SystemVersionsClient { /** - * 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. @@ -28,7 +28,7 @@ public interface SystemVersionsClient { PagedIterable listByLocation(String location); /** - * 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. 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..41e6d445ce80 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 @@ -28,7 +28,7 @@ public interface VirtualNetworkAddressesClient { * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + PagedIterable listByParent(String resourceGroupName, String cloudvmclustername); /** * List VirtualNetworkAddress resources by CloudVmCluster. @@ -42,7 +42,7 @@ public interface VirtualNetworkAddressesClient { * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + PagedIterable listByParent(String resourceGroupName, String cloudvmclustername, Context context); /** 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..08226db757ea 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 @@ -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..525a9c1fdc26 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 @@ -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,9 +39,9 @@ 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. @@ -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/AutonomousDatabaseInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDatabaseInner.java index 91f2bdaff8f8..bd687715cbe3 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 @@ -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..a42aa5075c4f 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 @@ -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,9 +39,9 @@ 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. @@ -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/AutonomousDbVersionInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/AutonomousDbVersionInner.java index b7a2c1950a65..3c530299fa2c 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 @@ -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,9 +39,9 @@ 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. @@ -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/CloudExadataInfrastructureInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/CloudExadataInfrastructureInner.java index c421e958d139..071fcbb36941 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 @@ -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..9fe9629ee0fc 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 @@ -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..4d706c53f64e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbActionResponseInner.java @@ -0,0 +1,83 @@ +// 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.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(); + 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..9bb4e5fc7cb5 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 @@ -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,9 +39,9 @@ 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. @@ -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/DbServerInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbServerInner.java index 598033963610..7c49ffcf0269 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 @@ -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,9 +39,9 @@ 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. @@ -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/DbSystemShapeInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DbSystemShapeInner.java index d4e2485e6359..993da62376fc 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 @@ -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,9 +39,9 @@ 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. @@ -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/DnsPrivateViewInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateViewInner.java index 1c91ac38a9f5..436ee7d86a3b 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 @@ -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,9 +39,9 @@ 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. @@ -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/DnsPrivateZoneInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/DnsPrivateZoneInner.java index 9ebf6d9d21cb..816a2491ac1e 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 @@ -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,9 +39,9 @@ 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. @@ -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/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..e34373760700 --- /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) AutoRest 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..ab564bd63542 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/ExascaleDbNodeInner.java @@ -0,0 +1,166 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodeProperties; +import java.io.IOException; + +/** + * The DbNode resource belonging to ExadbVmCluster. + */ +@Fluent +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. + */ + public ExascaleDbNodeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public ExascaleDbNodeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the ExascaleDbNodeInner object itself. + */ + public ExascaleDbNodeInner withProperties(ExascaleDbNodeProperties properties) { + this.properties = properties; + 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; + } + + /** + * 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..748394429ef5 --- /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) AutoRest 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..727a3994ece7 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/FlexComponentInner.java @@ -0,0 +1,166 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.FlexComponentProperties; +import java.io.IOException; + +/** + * FlexComponent Resource Definition. + */ +@Fluent +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. + */ + public FlexComponentInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public FlexComponentProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the FlexComponentInner object itself. + */ + public FlexComponentInner withProperties(FlexComponentProperties properties) { + this.properties = properties; + 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; + } + + /** + * 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..14dab8e0da65 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/GiMinorVersionInner.java @@ -0,0 +1,166 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.oracledatabase.models.GiMinorVersionProperties; +import java.io.IOException; + +/** + * The Oracle Grid Infrastructure (GI) minor version resource definition. + */ +@Fluent +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. + */ + public GiMinorVersionInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public GiMinorVersionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the GiMinorVersionInner object itself. + */ + public GiMinorVersionInner withProperties(GiMinorVersionProperties properties) { + this.properties = properties; + 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; + } + + /** + * 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..708ea43734ac 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 @@ -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,9 +39,9 @@ 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. @@ -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/OracleSubscriptionInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/OracleSubscriptionInner.java index ea3ee86cbb68..bfc0ee9a4a20 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 @@ -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/SystemVersionInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/SystemVersionInner.java index d1512c1175f9..07aaf3f6727b 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 @@ -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,9 +39,9 @@ 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. @@ -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/VirtualNetworkAddressInner.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/fluent/models/VirtualNetworkAddressInner.java index 3ea0390a0fde..695a2aef9396 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 @@ -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/implementation/AutonomousDatabaseBackupImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupImpl.java index 0513f6082494..594dc1f55a1a 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 @@ -10,7 +10,6 @@ import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackup; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupProperties; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdate; -import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseBackupUpdateProperties; public final class AutonomousDatabaseBackupImpl implements AutonomousDatabaseBackup, AutonomousDatabaseBackup.Definition, AutonomousDatabaseBackup.Update { @@ -132,12 +131,16 @@ public AutonomousDatabaseBackup refresh(Context context) { } public AutonomousDatabaseBackupImpl withProperties(AutonomousDatabaseBackupProperties properties) { - this.innerModel().withProperties(properties); - return this; + if (isInCreateMode()) { + this.innerModel().withProperties(properties); + return this; + } else { + this.updateProperties.withProperties(properties); + return this; + } } - public AutonomousDatabaseBackupImpl withProperties(AutonomousDatabaseBackupUpdateProperties 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/AutonomousDatabaseBackupsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/AutonomousDatabaseBackupsClientImpl.java index 78cea68fe887..f630c8491073 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 @@ -76,7 +76,7 @@ public interface AutonomousDatabaseBackupsService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAutonomousDatabase(@HostParam("$host") String endpoint, + Mono> listByParent(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, @@ -130,7 +130,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByAutonomousDatabaseNext( + Mono> listByParentNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -147,8 +147,8 @@ Mono> listByAutonomousDatabaseNext( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByAutonomousDatabaseSinglePageAsync(String resourceGroupName, String autonomousdatabasename) { + private Mono> listByParentSinglePageAsync(String resourceGroupName, + String autonomousdatabasename) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -167,9 +167,8 @@ Mono> listByAutonomousDatabaseNext( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByAutonomousDatabase(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) + .withContext(context -> service.listByParent(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())); @@ -188,8 +187,8 @@ Mono> listByAutonomousDatabaseNext( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByAutonomousDatabaseSinglePageAsync( - String resourceGroupName, String autonomousdatabasename, Context context) { + private Mono> listByParentSinglePageAsync(String resourceGroupName, + String autonomousdatabasename, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -209,8 +208,8 @@ private Mono> listByAutonomousDatab 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) + .listByParent(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)); } @@ -226,10 +225,10 @@ private Mono> listByAutonomousDatab * @return the response of a AutonomousDatabaseBackup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAutonomousDatabaseAsync(String resourceGroupName, + private PagedFlux listByParentAsync(String resourceGroupName, String autonomousdatabasename) { - return new PagedFlux<>(() -> listByAutonomousDatabaseSinglePageAsync(resourceGroupName, autonomousdatabasename), - nextLink -> listByAutonomousDatabaseNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, autonomousdatabasename), + nextLink -> listByParentNextSinglePageAsync(nextLink)); } /** @@ -244,11 +243,10 @@ private PagedFlux listByAutonomousDatabaseAsync(S * @return the response of a AutonomousDatabaseBackup list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByAutonomousDatabaseAsync(String resourceGroupName, + private PagedFlux listByParentAsync(String resourceGroupName, String autonomousdatabasename, Context context) { - return new PagedFlux<>( - () -> listByAutonomousDatabaseSinglePageAsync(resourceGroupName, autonomousdatabasename, context), - nextLink -> listByAutonomousDatabaseNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, autonomousdatabasename, context), + nextLink -> listByParentNextSinglePageAsync(nextLink, context)); } /** @@ -263,9 +261,9 @@ private PagedFlux listByAutonomousDatabaseAsync(S * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAutonomousDatabase(String resourceGroupName, + public PagedIterable listByParent(String resourceGroupName, String autonomousdatabasename) { - return new PagedIterable<>(listByAutonomousDatabaseAsync(resourceGroupName, autonomousdatabasename)); + return new PagedIterable<>(listByParentAsync(resourceGroupName, autonomousdatabasename)); } /** @@ -281,9 +279,9 @@ public PagedIterable listByAutonomousDatabase(Str * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByAutonomousDatabase(String resourceGroupName, + public PagedIterable listByParent(String resourceGroupName, String autonomousdatabasename, Context context) { - return new PagedIterable<>(listByAutonomousDatabaseAsync(resourceGroupName, autonomousdatabasename, context)); + return new PagedIterable<>(listByParentAsync(resourceGroupName, autonomousdatabasename, context)); } /** @@ -1174,8 +1172,7 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Stri * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByAutonomousDatabaseNextSinglePageAsync(String nextLink) { + private Mono> listByParentNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1185,8 +1182,7 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Stri } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByAutonomousDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + .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())); @@ -1204,8 +1200,8 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Stri * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByAutonomousDatabaseNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByParentNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -1215,7 +1211,7 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Stri } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByAutonomousDatabaseNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } 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..8c8f65527cb3 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 @@ -27,17 +27,17 @@ public AutonomousDatabaseBackupsImpl(AutonomousDatabaseBackupsClient innerClient this.serviceManager = serviceManager; } - public PagedIterable listByAutonomousDatabase(String resourceGroupName, + public PagedIterable listByParent(String resourceGroupName, String autonomousdatabasename) { PagedIterable inner - = this.serviceClient().listByAutonomousDatabase(resourceGroupName, autonomousdatabasename); + = this.serviceClient().listByParent(resourceGroupName, autonomousdatabasename); return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseBackupImpl(inner1, this.manager())); } - public PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename, Context context) { + public PagedIterable listByParent(String resourceGroupName, String autonomousdatabasename, + Context context) { PagedIterable inner - = this.serviceClient().listByAutonomousDatabase(resourceGroupName, autonomousdatabasename, context); + = this.serviceClient().listByParent(resourceGroupName, autonomousdatabasename, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseBackupImpl(inner1, this.manager())); } 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..33427cde205d 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 @@ -89,7 +89,7 @@ Mono> listByLocationNext( } /** - * 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. @@ -121,7 +121,7 @@ private Mono> listByLocationS } /** - * 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. @@ -155,7 +155,7 @@ private Mono> listByLocationS } /** - * 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. @@ -171,7 +171,7 @@ private PagedFlux listByLocationAsync(Strin } /** - * 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. @@ -188,7 +188,7 @@ private PagedFlux listByLocationAsync(Strin } /** - * 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. @@ -203,7 +203,7 @@ public PagedIterable listByLocation(String } /** - * 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. 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..b43d57a1ccd0 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 @@ -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,17 @@ public AutonomousDatabase refresh(Context context) { return this; } + public AutonomousDatabase changeDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails body) { + return serviceManager.autonomousDatabases() + .changeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body); + } + + public AutonomousDatabase changeDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails body, + Context context) { + return serviceManager.autonomousDatabases() + .changeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body, context); + } + public AutonomousDatabase failover(PeerDbDetails body) { return serviceManager.autonomousDatabases().failover(resourceGroupName, autonomousdatabasename, body); } 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..a82989271425 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 @@ -92,7 +92,7 @@ Mono> listByLocationN } /** - * 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. @@ -126,7 +126,7 @@ Mono> listByLocationN } /** - * 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. @@ -160,7 +160,7 @@ Mono> listByLocationN } /** - * 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. @@ -176,7 +176,7 @@ private PagedFlux listByLocationAsy } /** - * 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. @@ -194,7 +194,7 @@ private PagedFlux listByLocationAsy } /** - * 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. @@ -209,7 +209,7 @@ public PagedIterable listByLocation } /** - * 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. 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..d38492886072 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 @@ -90,7 +90,7 @@ Mono> listByLocationNext( } /** - * 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. @@ -122,7 +122,7 @@ private Mono> listByLocationSinglePageAs } /** - * 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. @@ -156,7 +156,7 @@ private Mono> listByLocationSinglePageAs } /** - * 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. @@ -171,7 +171,7 @@ private PagedFlux listByLocationAsync(String location) } /** - * 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. @@ -187,7 +187,7 @@ private PagedFlux listByLocationAsync(String location, } /** - * 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. @@ -201,7 +201,7 @@ public PagedIterable listByLocation(String location) { } /** - * 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. 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..5aa96f5d1775 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 @@ -38,6 +38,7 @@ import com.azure.resourcemanager.oracledatabase.fluent.models.AutonomousDatabaseWalletFileInner; import com.azure.resourcemanager.oracledatabase.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; @@ -136,6 +137,17 @@ Mono>> delete(@HostParam("$host") String endpoint, @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}/changeDisasterRecoveryConfiguration") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> changeDisasterRecoveryConfiguration(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @BodyParam("application/json") DisasterRecoveryConfigurationDetails body, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/failover") @ExpectedResponses({ 200, 202 }) @@ -1237,6 +1249,251 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Cont deleteAsync(resourceGroupName, autonomousdatabasename, context).block(); } + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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>> 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.")); + } + 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"; + return FluxUtil + .withContext(context -> service.changeDisasterRecoveryConfiguration(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, + body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> changeDisasterRecoveryConfigurationWithResponseAsync( + String resourceGroupName, String autonomousdatabasename, DisasterRecoveryConfigurationDetails 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.changeDisasterRecoveryConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> + beginChangeDisasterRecoveryConfigurationAsync(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body) { + Mono>> mono + = changeDisasterRecoveryConfigurationWithResponseAsync(resourceGroupName, autonomousdatabasename, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); + } + + /** + * 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> + beginChangeDisasterRecoveryConfigurationAsync(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = changeDisasterRecoveryConfigurationWithResponseAsync(resourceGroupName, + autonomousdatabasename, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> + beginChangeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body) { + return this.beginChangeDisasterRecoveryConfigurationAsync(resourceGroupName, autonomousdatabasename, body) + .getSyncPoller(); + } + + /** + * 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 SyncPoller} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> + beginChangeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body, Context context) { + return this + .beginChangeDisasterRecoveryConfigurationAsync(resourceGroupName, autonomousdatabasename, body, context) + .getSyncPoller(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 changeDisasterRecoveryConfigurationAsync(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body) { + return beginChangeDisasterRecoveryConfigurationAsync(resourceGroupName, autonomousdatabasename, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono changeDisasterRecoveryConfigurationAsync(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body, Context context) { + return beginChangeDisasterRecoveryConfigurationAsync(resourceGroupName, autonomousdatabasename, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 changeDisasterRecoveryConfiguration(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body) { + return changeDisasterRecoveryConfigurationAsync(resourceGroupName, autonomousdatabasename, body).block(); + } + + /** + * 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner changeDisasterRecoveryConfiguration(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body, Context context) { + return changeDisasterRecoveryConfigurationAsync(resourceGroupName, autonomousdatabasename, body, context) + .block(); + } + /** * Perform failover action on Autonomous Database. * 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..823b389396ee 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 @@ -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; @@ -83,6 +84,28 @@ public void delete(String resourceGroupName, String autonomousdatabasename, Cont this.serviceClient().delete(resourceGroupName, autonomousdatabasename, context); } + public AutonomousDatabase changeDisasterRecoveryConfiguration(String resourceGroupName, + String autonomousdatabasename, DisasterRecoveryConfigurationDetails body) { + AutonomousDatabaseInner inner + = this.serviceClient().changeDisasterRecoveryConfiguration(resourceGroupName, autonomousdatabasename, body); + if (inner != null) { + return new AutonomousDatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + 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 { + return null; + } + } + public AutonomousDatabase failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { AutonomousDatabaseInner inner = this.serviceClient().failover(resourceGroupName, autonomousdatabasename, body); if (inner != null) { 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..4c4e0ae79bda 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 @@ -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; 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..965412141921 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 @@ -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; 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..230215a8fc7f --- /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) AutoRest 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/DbNodesClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/DbNodesClientImpl.java index 2fb33bc67f2c..e3d2c9f27c4f 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 @@ -73,7 +73,7 @@ public interface DbNodesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudVmCluster(@HostParam("$host") String endpoint, + Mono> listByParent(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, @@ -103,7 +103,7 @@ Mono>> action(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudVmClusterNext( + Mono> listByParentNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -120,7 +120,7 @@ Mono> listByCloudVmClusterNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterSinglePageAsync(String resourceGroupName, + private Mono> listByParentSinglePageAsync(String resourceGroupName, String cloudvmclustername) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -140,7 +140,7 @@ private Mono> listByCloudVmClusterSinglePageAsync(Str } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.listByParent(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)) @@ -160,7 +160,7 @@ private Mono> listByCloudVmClusterSinglePageAsync(Str * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterSinglePageAsync(String resourceGroupName, + private Mono> listByParentSinglePageAsync(String resourceGroupName, String cloudvmclustername, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -181,8 +181,8 @@ private Mono> listByCloudVmClusterSinglePageAsync(Str 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) + .listByParent(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)); } @@ -198,9 +198,9 @@ private Mono> listByCloudVmClusterSinglePageAsync(Str * @return the response of a DbNode 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)); + private PagedFlux listByParentAsync(String resourceGroupName, String cloudvmclustername) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, cloudvmclustername), + nextLink -> listByParentNextSinglePageAsync(nextLink)); } /** @@ -215,11 +215,10 @@ private PagedFlux listByCloudVmClusterAsync(String resourceGroupNam * @return the response of a DbNode list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, String cloudvmclustername, + private PagedFlux listByParentAsync(String resourceGroupName, String cloudvmclustername, Context context) { - return new PagedFlux<>( - () -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername, context), - nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, cloudvmclustername, context), + nextLink -> listByParentNextSinglePageAsync(nextLink, context)); } /** @@ -233,8 +232,8 @@ private PagedFlux listByCloudVmClusterAsync(String resourceGroupNam * @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) { - return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername)); + public PagedIterable listByParent(String resourceGroupName, String cloudvmclustername) { + return new PagedIterable<>(listByParentAsync(resourceGroupName, cloudvmclustername)); } /** @@ -249,9 +248,9 @@ public PagedIterable listByCloudVmCluster(String resourceGroupName, * @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, + public PagedIterable listByParent(String resourceGroupName, String cloudvmclustername, Context context) { - return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername, context)); + return new PagedIterable<>(listByParentAsync(resourceGroupName, cloudvmclustername, context)); } /** @@ -646,7 +645,7 @@ public DbNodeInner action(String resourceGroupName, String cloudvmclustername, S * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterNextSinglePageAsync(String nextLink) { + private Mono> listByParentNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -656,8 +655,7 @@ private Mono> listByCloudVmClusterNextSinglePageAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByCloudVmClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .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())); @@ -675,7 +673,7 @@ private Mono> listByCloudVmClusterNextSinglePageAsync * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterNextSinglePageAsync(String nextLink, Context context) { + private Mono> listByParentNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -685,7 +683,7 @@ private Mono> listByCloudVmClusterNextSinglePageAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByCloudVmClusterNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } 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..8755442a56e3 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 @@ -28,16 +28,14 @@ public DbNodesImpl(DbNodesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername) { - PagedIterable inner - = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername); + public PagedIterable listByParent(String resourceGroupName, String cloudvmclustername) { + PagedIterable inner = this.serviceClient().listByParent(resourceGroupName, cloudvmclustername); return ResourceManagerUtils.mapPage(inner, inner1 -> new DbNodeImpl(inner1, this.manager())); } - public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, - Context context) { + public PagedIterable listByParent(String resourceGroupName, String cloudvmclustername, Context context) { PagedIterable inner - = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername, context); + = this.serviceClient().listByParent(resourceGroupName, cloudvmclustername, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new DbNodeImpl(inner1, this.manager())); } 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..5188d1266b03 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 @@ -66,7 +66,7 @@ public interface DbServersService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudExadataInfrastructure(@HostParam("$host") String endpoint, + Mono> listByParent(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, @@ -86,7 +86,7 @@ Mono> get(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudExadataInfrastructureNext( + Mono> listByParentNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -103,7 +103,7 @@ Mono> listByCloudExadataInfrastructureNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudExadataInfrastructureSinglePageAsync(String resourceGroupName, + private Mono> listByParentSinglePageAsync(String resourceGroupName, String cloudexadatainfrastructurename) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -123,9 +123,8 @@ private Mono> listByCloudExadataInfrastructureSingl } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByCloudExadataInfrastructure(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, - cloudexadatainfrastructurename, accept, context)) + .withContext(context -> service.listByParent(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())); @@ -144,7 +143,7 @@ private Mono> listByCloudExadataInfrastructureSingl * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudExadataInfrastructureSinglePageAsync(String resourceGroupName, + private Mono> listByParentSinglePageAsync(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -165,8 +164,8 @@ private Mono> listByCloudExadataInfrastructureSingl 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) + .listByParent(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)); } @@ -182,11 +181,10 @@ private Mono> listByCloudExadataInfrastructureSingl * @return the response of a DbServer list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudExadataInfrastructureAsync(String resourceGroupName, + private PagedFlux listByParentAsync(String resourceGroupName, String cloudexadatainfrastructurename) { - return new PagedFlux<>( - () -> listByCloudExadataInfrastructureSinglePageAsync(resourceGroupName, cloudexadatainfrastructurename), - nextLink -> listByCloudExadataInfrastructureNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, cloudexadatainfrastructurename), + nextLink -> listByParentNextSinglePageAsync(nextLink)); } /** @@ -201,11 +199,11 @@ private PagedFlux listByCloudExadataInfrastructureAsync(String re * @return the response of a DbServer list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudExadataInfrastructureAsync(String resourceGroupName, - String cloudexadatainfrastructurename, Context context) { - return new PagedFlux<>(() -> listByCloudExadataInfrastructureSinglePageAsync(resourceGroupName, - cloudexadatainfrastructurename, context), - nextLink -> listByCloudExadataInfrastructureNextSinglePageAsync(nextLink, context)); + private PagedFlux listByParentAsync(String resourceGroupName, String cloudexadatainfrastructurename, + Context context) { + return new PagedFlux<>( + () -> listByParentSinglePageAsync(resourceGroupName, cloudexadatainfrastructurename, context), + nextLink -> listByParentNextSinglePageAsync(nextLink, context)); } /** @@ -219,10 +217,8 @@ private PagedFlux listByCloudExadataInfrastructureAsync(String re * @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) { - return new PagedIterable<>( - listByCloudExadataInfrastructureAsync(resourceGroupName, cloudexadatainfrastructurename)); + public PagedIterable listByParent(String resourceGroupName, String cloudexadatainfrastructurename) { + return new PagedIterable<>(listByParentAsync(resourceGroupName, cloudexadatainfrastructurename)); } /** @@ -237,10 +233,9 @@ public PagedIterable listByCloudExadataInfrastructure(String reso * @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)); + public PagedIterable listByParent(String resourceGroupName, String cloudexadatainfrastructurename, + Context context) { + return new PagedIterable<>(listByParentAsync(resourceGroupName, cloudexadatainfrastructurename, context)); } /** @@ -388,7 +383,7 @@ public DbServerInner get(String resourceGroupName, String cloudexadatainfrastruc * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudExadataInfrastructureNextSinglePageAsync(String nextLink) { + private Mono> listByParentNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -398,8 +393,7 @@ private Mono> listByCloudExadataInfrastructureNextS } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByCloudExadataInfrastructureNext(nextLink, this.client.getEndpoint(), - accept, context)) + .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())); @@ -417,8 +411,7 @@ private Mono> listByCloudExadataInfrastructureNextS * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudExadataInfrastructureNextSinglePageAsync(String nextLink, - Context context) { + private Mono> listByParentNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -428,7 +421,7 @@ private Mono> listByCloudExadataInfrastructureNextS } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByCloudExadataInfrastructureNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } 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..eff285c03b68 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 @@ -27,17 +27,16 @@ public DbServersImpl(DbServersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename) { + public PagedIterable listByParent(String resourceGroupName, String cloudexadatainfrastructurename) { PagedIterable inner - = this.serviceClient().listByCloudExadataInfrastructure(resourceGroupName, cloudexadatainfrastructurename); + = this.serviceClient().listByParent(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); + public PagedIterable listByParent(String resourceGroupName, String cloudexadatainfrastructurename, + Context context) { + PagedIterable inner + = this.serviceClient().listByParent(resourceGroupName, cloudexadatainfrastructurename, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new DbServerImpl(inner1, this.manager())); } 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..c86715b6beb3 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 @@ -68,7 +68,8 @@ public interface DbSystemShapesService { @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocation(@HostParam("$host") 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, @QueryParam("zone") String zone, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}") @@ -89,9 +90,10 @@ Mono> listByLocationNext( } /** - * 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. @@ -99,7 +101,7 @@ Mono> listByLocationNext( * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + 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.")); @@ -114,16 +116,17 @@ private Mono> listByLocationSinglePageAsync(St final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) + 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -132,7 +135,8 @@ private Mono> listByLocationSinglePageAsync(St * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, Context context) { + private Mono> listByLocationSinglePageAsync(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.")); @@ -148,13 +152,29 @@ private Mono> listByLocationSinglePageAsync(St context = this.client.mergeContext(context); return service .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) + location, zone, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * 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 PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, String zone) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, zone), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,14 +184,16 @@ private Mono> listByLocationSinglePageAsync(St */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + final String zone = null; + 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 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. @@ -179,13 +201,13 @@ private PagedFlux listByLocationAsync(String location) { * @return the response of a DbSystemShape list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + private PagedFlux listByLocationAsync(String location, String zone, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, zone, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** - * List DbSystemShape resources by Location. + * List DbSystemShape resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,13 +217,15 @@ private PagedFlux listByLocationAsync(String location, Conte */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + final String zone = null; + return new PagedIterable<>(listByLocationAsync(location, zone)); } /** - * 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -209,8 +233,8 @@ public PagedIterable listByLocation(String location) { * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + public PagedIterable listByLocation(String location, String zone, Context context) { + return new PagedIterable<>(listByLocationAsync(location, zone, context)); } /** 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..df60d244c371 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 @@ -32,8 +32,8 @@ public PagedIterable listByLocation(String 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); + 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())); } 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..8f1574ead20e 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 @@ -89,7 +89,7 @@ Mono> listByLocationNext( } /** - * 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. @@ -121,7 +121,7 @@ private Mono> listByLocationSinglePageAsync(S } /** - * 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. @@ -154,7 +154,7 @@ private Mono> listByLocationSinglePageAsync(S } /** - * 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. @@ -169,7 +169,7 @@ private PagedFlux listByLocationAsync(String location) { } /** - * 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. @@ -185,7 +185,7 @@ private PagedFlux listByLocationAsync(String location, Cont } /** - * 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. @@ -199,7 +199,7 @@ public PagedIterable listByLocation(String location) { } /** - * 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. 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..91ff35074779 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 @@ -89,7 +89,7 @@ Mono> listByLocationNext( } /** - * 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. @@ -121,7 +121,7 @@ private Mono> listByLocationSinglePageAsync(S } /** - * 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. @@ -154,7 +154,7 @@ private Mono> listByLocationSinglePageAsync(S } /** - * 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. @@ -169,7 +169,7 @@ private PagedFlux listByLocationAsync(String location) { } /** - * 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. @@ -185,7 +185,7 @@ private PagedFlux listByLocationAsync(String location, Cont } /** - * 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. @@ -199,7 +199,7 @@ public PagedIterable listByLocation(String location) { } /** - * 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. 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..45800470836d --- /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) AutoRest 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..8a215ce02929 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExadbVmClustersClientImpl.java @@ -0,0 +1,1535 @@ +// 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.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.Context; +import com.azure.core.util.FluxUtil; +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.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 OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of ExadbVmClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExadbVmClustersClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(ExadbVmClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerExadbVmClusters to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface ExadbVmClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") 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/exadbVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") 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/{exadbVmClusterName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") 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" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, + @BodyParam("application/json") ExadbVmClusterInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, + @BodyParam("application/json") ExadbVmClusterUpdate properties, @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) + Mono>> delete(@HostParam("$host") 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" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> removeVms(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, + @BodyParam("application/json") RemoveVirtualMachineFromExadbVmClusterDetails body, + @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("$host") 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("$host") 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. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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(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 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. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * 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<>(listAsync(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 ManagementException thrown if the 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, + 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.")); + } + 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)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, 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 ManagementException thrown if the 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<>(listByResourceGroupAsync(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 ManagementException thrown if the 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<>(listByResourceGroupAsync(resourceGroupName, 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, 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 (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName 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, 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 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) { + return getByResourceGroupWithResponseAsync(resourceGroupName, exadbVmClusterName, context).block(); + } + + /** + * 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(); + } + + /** + * 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, resource, accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, 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 (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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, resource, accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, exadbVmClusterName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + 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 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) { + return this.beginCreateOrUpdateAsync(resourceGroupName, exadbVmClusterName, resource).getSyncPoller(); + } + + /** + * 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) { + return this.beginCreateOrUpdateAsync(resourceGroupName, exadbVmClusterName, resource, context).getSyncPoller(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, exadbVmClusterName, resource, context).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 createOrUpdateAsync(resourceGroupName, exadbVmClusterName, resource).block(); + } + + /** + * 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 createOrUpdateAsync(resourceGroupName, exadbVmClusterName, resource, context).block(); + } + + /** + * 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, properties, accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, 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 (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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, exadbVmClusterName, properties, accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, exadbVmClusterName, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + 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 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) { + return this.beginUpdateAsync(resourceGroupName, exadbVmClusterName, properties).getSyncPoller(); + } + + /** + * 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) { + return this.beginUpdateAsync(resourceGroupName, exadbVmClusterName, properties, context).getSyncPoller(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return beginUpdateAsync(resourceGroupName, exadbVmClusterName, properties, context).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 updateAsync(resourceGroupName, exadbVmClusterName, properties).block(); + } + + /** + * 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 updateAsync(resourceGroupName, exadbVmClusterName, properties, context).block(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, 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 (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName 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, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, exadbVmClusterName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String exadbVmClusterName) { + return this.beginDeleteAsync(resourceGroupName, exadbVmClusterName).getSyncPoller(); + } + + /** + * 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) { + return this.beginDeleteAsync(resourceGroupName, exadbVmClusterName, context).getSyncPoller(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Context context) { + return beginDeleteAsync(resourceGroupName, exadbVmClusterName, context).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) { + deleteAsync(resourceGroupName, exadbVmClusterName).block(); + } + + /** + * 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) { + deleteAsync(resourceGroupName, exadbVmClusterName, context).block(); + } + + /** + * 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 exadbVmCluster resource definition 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.removeVms(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, body, accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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>> removeVmsWithResponseAsync(String resourceGroupName, + String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails 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 (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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.removeVms(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, body, accept, 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 exadbVmCluster resource definition. + */ + @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginRemoveVmsAsync( + String resourceGroupName, String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = removeVmsWithResponseAsync(resourceGroupName, exadbVmClusterName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + 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 {@link SyncPoller} for polling of exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExadbVmClusterInner> beginRemoveVms(String resourceGroupName, + String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body) { + return this.beginRemoveVmsAsync(resourceGroupName, exadbVmClusterName, body).getSyncPoller(); + } + + /** + * 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 exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ExadbVmClusterInner> beginRemoveVms(String resourceGroupName, + String exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails body, Context context) { + return this.beginRemoveVmsAsync(resourceGroupName, exadbVmClusterName, body, context).getSyncPoller(); + } + + /** + * 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 exadbVmCluster resource definition 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 removeVmsAsync(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body, Context context) { + return beginRemoveVmsAsync(resourceGroupName, exadbVmClusterName, body, context).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 exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body) { + return removeVmsAsync(resourceGroupName, exadbVmClusterName, body).block(); + } + + /** + * 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 exadbVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExadbVmClusterInner removeVms(String resourceGroupName, String exadbVmClusterName, + RemoveVirtualMachineFromExadbVmClusterDetails body, Context context) { + return removeVmsAsync(resourceGroupName, exadbVmClusterName, body, context).block(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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)); + } +} 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..9b840c4afef6 --- /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) AutoRest 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 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 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 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..af756cb11a0b --- /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) AutoRest 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..a18b19449ffa --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbNodesClientImpl.java @@ -0,0 +1,703 @@ +// 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.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.Context; +import com.azure.core.util.FluxUtil; +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.models.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.ExascaleDbNodeListResult; +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 OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of ExascaleDbNodesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExascaleDbNodesClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(ExascaleDbNodesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerExascaleDbNodes to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface ExascaleDbNodesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("$host") 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/{exascaleDbNodeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") 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" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> action(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exadbVmClusterName") String exadbVmClusterName, + @PathParam("exascaleDbNodeName") String exascaleDbNodeName, + @BodyParam("application/json") DbNodeAction body, @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("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, 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 (exadbVmClusterName == null) { + return Mono + .error(new IllegalArgumentException("Parameter exadbVmClusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, + Context context) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, exadbVmClusterName, context), + nextLink -> listByParentNextSinglePageAsync(nextLink, context)); + } + + /** + * 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<>(listByParentAsync(resourceGroupName, 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 ManagementException thrown if the 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<>(listByParentAsync(resourceGroupName, exadbVmClusterName, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, 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 (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"; + context = this.client.mergeContext(context); + return service.get(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 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) { + return getWithResponseAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, context).block(); + } + + /** + * 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(); + } + + /** + * 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 exascaleDbNode action response 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.action(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, + accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbNode action response 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, 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 (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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.action(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, accept, 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 exascaleDbNode action response. + */ + @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 exascaleDbNode action response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DbActionResponseInner> beginActionAsync( + String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = actionWithResponseAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), 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 {@link SyncPoller} for polling of exascaleDbNode action response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DbActionResponseInner> beginAction(String resourceGroupName, + String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body) { + return this.beginActionAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body).getSyncPoller(); + } + + /** + * 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 exascaleDbNode action response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DbActionResponseInner> beginAction(String resourceGroupName, + String exadbVmClusterName, String exascaleDbNodeName, DbNodeAction body, Context context) { + return this.beginActionAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, context) + .getSyncPoller(); + } + + /** + * 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 exascaleDbNode action response 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return exascaleDbNode action response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono actionAsync(String resourceGroupName, String exadbVmClusterName, + String exascaleDbNodeName, DbNodeAction body, Context context) { + return beginActionAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, context).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 exascaleDbNode action response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbActionResponseInner action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body) { + return actionAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body).block(); + } + + /** + * 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 exascaleDbNode action response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbActionResponseInner action(String resourceGroupName, String exadbVmClusterName, String exascaleDbNodeName, + DbNodeAction body, Context context) { + return actionAsync(resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body, context).block(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } +} 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..82f87fa14c08 --- /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) AutoRest 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 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 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 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..2f829434fb07 --- /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) AutoRest 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..e0168b97ac6a --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/ExascaleDbStorageVaultsClientImpl.java @@ -0,0 +1,1306 @@ +// 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.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.Context; +import com.azure.core.util.FluxUtil; +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.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 OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of ExascaleDbStorageVaultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExascaleDbStorageVaultsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(ExascaleDbStorageVaultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerExascaleDbStorageVaults to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface ExascaleDbStorageVaultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") 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/exascaleDbStorageVaults") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") 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/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") 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" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @BodyParam("application/json") ExascaleDbStorageVaultInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("exascaleDbStorageVaultName") String exascaleDbStorageVaultName, + @BodyParam("application/json") ExascaleDbStorageVaultTagsUpdate properties, + @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) + Mono>> delete(@HostParam("$host") 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("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") 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("$host") String endpoint, + @HeaderParam("Accept") String accept, Context 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. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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(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 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. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * 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<>(listAsync(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 ManagementException thrown if the 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, 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.")); + } + 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)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, 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 ManagementException thrown if the 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<>(listByResourceGroupAsync(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 ManagementException thrown if the 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<>(listByResourceGroupAsync(resourceGroupName, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, 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 (exascaleDbStorageVaultName == null) { + return Mono.error( + new IllegalArgumentException("Parameter exascaleDbStorageVaultName 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, 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 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) { + return getByResourceGroupWithResponseAsync(resourceGroupName, exascaleDbStorageVaultName, context).block(); + } + + /** + * 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 accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, resource, accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, 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 (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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, exascaleDbStorageVaultName, resource, accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, exascaleDbStorageVaultName, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), 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 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) { + return this.beginCreateAsync(resourceGroupName, exascaleDbStorageVaultName, resource).getSyncPoller(); + } + + /** + * 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) { + return this.beginCreateAsync(resourceGroupName, exascaleDbStorageVaultName, resource, context).getSyncPoller(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return beginCreateAsync(resourceGroupName, exascaleDbStorageVaultName, resource, context).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 createAsync(resourceGroupName, exascaleDbStorageVaultName, resource).block(); + } + + /** + * 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 createAsync(resourceGroupName, exascaleDbStorageVaultName, resource, context).block(); + } + + /** + * 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, exascaleDbStorageVaultName, properties, accept, + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, 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 (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 accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, exascaleDbStorageVaultName, properties, accept, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, exascaleDbStorageVaultName, properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), 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 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) { + return this.beginUpdateAsync(resourceGroupName, exascaleDbStorageVaultName, properties).getSyncPoller(); + } + + /** + * 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) { + return this.beginUpdateAsync(resourceGroupName, exascaleDbStorageVaultName, properties, context) + .getSyncPoller(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + return beginUpdateAsync(resourceGroupName, exascaleDbStorageVaultName, properties, context).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 updateAsync(resourceGroupName, exascaleDbStorageVaultName, properties).block(); + } + + /** + * 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 updateAsync(resourceGroupName, exascaleDbStorageVaultName, properties, context).block(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, 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 (exascaleDbStorageVaultName == null) { + return Mono.error( + new IllegalArgumentException("Parameter exascaleDbStorageVaultName 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, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, exascaleDbStorageVaultName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String exascaleDbStorageVaultName) { + return this.beginDeleteAsync(resourceGroupName, exascaleDbStorageVaultName).getSyncPoller(); + } + + /** + * 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) { + return this.beginDeleteAsync(resourceGroupName, exascaleDbStorageVaultName, context).getSyncPoller(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Context context) { + return beginDeleteAsync(resourceGroupName, exascaleDbStorageVaultName, context).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) { + deleteAsync(resourceGroupName, exascaleDbStorageVaultName).block(); + } + + /** + * 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) { + deleteAsync(resourceGroupName, exascaleDbStorageVaultName, context).block(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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)); + } +} 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..d6a7d67e614d --- /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) AutoRest 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 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 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 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 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..62f7a8d042bb --- /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) AutoRest 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..12c609e2b920 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/FlexComponentsClientImpl.java @@ -0,0 +1,409 @@ +// 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.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.resourcemanager.oracledatabase.fluent.FlexComponentsClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.FlexComponentInner; +import com.azure.resourcemanager.oracledatabase.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 OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of FlexComponentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FlexComponentsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(FlexComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerFlexComponents to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface FlexComponentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParent(@HostParam("$host") 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/{flexComponentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") 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("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByParentNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, + 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 + .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)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(location, shape, context), + nextLink -> listByParentNextSinglePageAsync(nextLink, context)); + } + + /** + * 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<>(listByParentAsync(location, shape)); + } + + /** + * 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<>(listByParentAsync(location, shape, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + 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.")); + } + if (flexComponentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter flexComponentName 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, 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 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) { + return getWithResponseAsync(location, flexComponentName, context).block(); + } + + /** + * 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(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } +} 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..4a2083e9ca5a --- /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) AutoRest 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 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())); + } + + 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; + } + } + + 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..c6f9512a89a0 --- /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) AutoRest 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..ecb42376b339 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiMinorVersionsClientImpl.java @@ -0,0 +1,454 @@ +// 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.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.resourcemanager.oracledatabase.fluent.GiMinorVersionsClient; +import com.azure.resourcemanager.oracledatabase.fluent.models.GiMinorVersionInner; +import com.azure.resourcemanager.oracledatabase.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 OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of GiMinorVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GiMinorVersionsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(GiMinorVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerGiMinorVersions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + 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("$host") 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("$host") 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("$host") 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, 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.")); + } + if (giversionname == null) { + return Mono.error(new IllegalArgumentException("Parameter giversionname is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(location, giversionname, shapeFamily, zone, context), + nextLink -> listByParentNextSinglePageAsync(nextLink, context)); + } + + /** + * 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<>(listByParentAsync(location, giversionname, shapeFamily, zone)); + } + + /** + * 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<>(listByParentAsync(location, giversionname, shapeFamily, zone, 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, 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.")); + } + 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"; + context = this.client.mergeContext(context); + return service.get(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 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) { + return getWithResponseAsync(location, giversionname, giMinorVersionName, context).block(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return 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)); + } +} 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..597d13667177 --- /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) AutoRest 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/GiVersionsClientImpl.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/implementation/GiVersionsClientImpl.java index 97bd9c373b72..efb29be69f0e 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 @@ -28,6 +28,7 @@ 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.models.SystemShapes; import reactor.core.publisher.Mono; /** @@ -68,7 +69,8 @@ public interface GiVersionsService { @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocation(@HostParam("$host") 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, @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/{giversionname}") @@ -89,9 +91,11 @@ Mono> listByLocationNext( } /** - * 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. @@ -99,7 +103,8 @@ Mono> listByLocationNext( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { + 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.")); @@ -114,16 +119,18 @@ private Mono> listByLocationSinglePageAsync(String final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context)) + 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -132,7 +139,8 @@ private Mono> listByLocationSinglePageAsync(String * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, Context context) { + private Mono> listByLocationSinglePageAsync(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.")); @@ -148,13 +156,30 @@ private Mono> listByLocationSinglePageAsync(String context = this.client.mergeContext(context); return service .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - location, accept, context) + location, shape, zone, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } /** - * 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 PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, SystemShapes shape, String zone) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, shape, zone), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,14 +189,18 @@ private Mono> listByLocationSinglePageAsync(String */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + final SystemShapes shape = null; + final String zone = null; + 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 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. @@ -179,13 +208,14 @@ private PagedFlux listByLocationAsync(String location) { * @return the response of a GiVersion list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + private PagedFlux listByLocationAsync(String location, SystemShapes shape, String zone, + Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, shape, zone, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** - * List GiVersion resources by Location. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,13 +225,17 @@ private PagedFlux listByLocationAsync(String location, Context c */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); + final SystemShapes shape = null; + final String zone = null; + return new PagedIterable<>(listByLocationAsync(location, shape, zone)); } /** - * 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -209,8 +243,9 @@ public PagedIterable listByLocation(String location) { * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, context)); + public PagedIterable listByLocation(String location, SystemShapes shape, String zone, + Context context) { + return new PagedIterable<>(listByLocationAsync(location, shape, zone, context)); } /** 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..9c6432a1d916 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 @@ -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); @@ -32,8 +33,8 @@ public PagedIterable listByLocation(String 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); + 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())); } 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/OracleDatabaseResourceManagerImpl.java index 996a112cf085..067b7c948de1 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/OracleDatabaseResourceManagerImpl.java @@ -13,8 +13,8 @@ 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.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -26,8 +26,8 @@ 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,6 +35,11 @@ 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; @@ -195,6 +200,34 @@ public CloudVmClustersClient getCloudVmClusters() { return this.cloudVmClusters; } + /** + * The ExadbVmClustersClient object to access its operations. + */ + private final ExadbVmClustersClient exadbVmClusters; + + /** + * Gets the ExadbVmClustersClient object to access its operations. + * + * @return the ExadbVmClustersClient object. + */ + public ExadbVmClustersClient getExadbVmClusters() { + return this.exadbVmClusters; + } + + /** + * 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; + } + /** * The AutonomousDatabaseCharacterSetsClient object to access its operations. */ @@ -279,6 +312,20 @@ public DnsPrivateZonesClient getDnsPrivateZones() { return this.dnsPrivateZones; } + /** + * The FlexComponentsClient object to access its operations. + */ + private final FlexComponentsClient flexComponents; + + /** + * Gets the FlexComponentsClient object to access its operations. + * + * @return the FlexComponentsClient object. + */ + public FlexComponentsClient getFlexComponents() { + return this.flexComponents; + } + /** * The GiVersionsClient object to access its operations. */ @@ -293,6 +340,20 @@ 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; + } + /** * The SystemVersionsClient object to access its operations. */ @@ -377,6 +438,20 @@ public VirtualNetworkAddressesClient getVirtualNetworkAddresses() { return this.virtualNetworkAddresses; } + /** + * 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; + } + /** * Initializes an instance of OracleDatabaseResourceManager client. * @@ -394,24 +469,29 @@ public VirtualNetworkAddressesClient getVirtualNetworkAddresses() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-09-01"; + this.apiVersion = "2025-03-01"; this.operations = new OperationsClientImpl(this); this.autonomousDatabases = new AutonomousDatabasesClientImpl(this); this.cloudExadataInfrastructures = new CloudExadataInfrastructuresClientImpl(this); this.cloudVmClusters = new CloudVmClustersClientImpl(this); + this.exadbVmClusters = new ExadbVmClustersClientImpl(this); + this.exascaleDbStorageVaults = new ExascaleDbStorageVaultsClientImpl(this); this.autonomousDatabaseCharacterSets = new AutonomousDatabaseCharacterSetsClientImpl(this); this.autonomousDatabaseNationalCharacterSets = new AutonomousDatabaseNationalCharacterSetsClientImpl(this); this.autonomousDatabaseVersions = new AutonomousDatabaseVersionsClientImpl(this); this.dbSystemShapes = new DbSystemShapesClientImpl(this); this.dnsPrivateViews = new DnsPrivateViewsClientImpl(this); this.dnsPrivateZones = new DnsPrivateZonesClientImpl(this); + this.flexComponents = new FlexComponentsClientImpl(this); this.giVersions = new GiVersionsClientImpl(this); + this.giMinorVersions = new GiMinorVersionsClientImpl(this); this.systemVersions = new SystemVersionsClientImpl(this); this.oracleSubscriptions = new OracleSubscriptionsClientImpl(this); this.autonomousDatabaseBackups = new AutonomousDatabaseBackupsClientImpl(this); this.dbServers = new DbServersClientImpl(this); this.dbNodes = new DbNodesClientImpl(this); this.virtualNetworkAddresses = new VirtualNetworkAddressesClientImpl(this); + this.exascaleDbNodes = new ExascaleDbNodesClientImpl(this); } /** 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..c15a63e31f2e 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 @@ -38,6 +38,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.OracleSubscriptionListResult; import com.azure.resourcemanager.oracledatabase.models.OracleSubscriptionUpdate; import java.nio.ByteBuffer; @@ -118,6 +119,15 @@ Mono>> delete(@HostParam("$host") 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/addAzureSubscriptions") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> addAzureSubscriptions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") AzureSubscriptions body, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks") @ExpectedResponses({ 200, 202 }) @@ -886,6 +896,189 @@ public void delete(Context context) { deleteAsync(context).block(); } + /** + * 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.")); + } + if (this.client.getSubscriptionId() == null) { + 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 accept = "application/json"; + return FluxUtil + .withContext(context -> service.addAzureSubscriptions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addAzureSubscriptionsWithResponseAsync(AzureSubscriptions 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 (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.addAzureSubscriptions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), body, accept, context); + } + + /** + * 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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()); + } + + /** + * 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginAddAzureSubscriptionsAsync(AzureSubscriptions body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = addAzureSubscriptionsWithResponseAsync(body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * 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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAddAzureSubscriptions(AzureSubscriptions body) { + return this.beginAddAzureSubscriptionsAsync(body).getSyncPoller(); + } + + /** + * 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 SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginAddAzureSubscriptions(AzureSubscriptions body, Context context) { + return this.beginAddAzureSubscriptionsAsync(body, context).getSyncPoller(); + } + + /** + * 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addAzureSubscriptionsAsync(AzureSubscriptions body) { + return beginAddAzureSubscriptionsAsync(body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addAzureSubscriptionsAsync(AzureSubscriptions body, Context context) { + return beginAddAzureSubscriptionsAsync(body, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void addAzureSubscriptions(AzureSubscriptions body) { + addAzureSubscriptionsAsync(body).block(); + } + + /** + * 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void addAzureSubscriptions(AzureSubscriptions body, Context context) { + addAzureSubscriptionsAsync(body, context).block(); + } + /** * List Activation Links. * 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..16ddf4fb5ce4 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 @@ -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 { @@ -107,6 +108,14 @@ public void delete(Context context) { this.serviceClient().delete(context); } + public void addAzureSubscriptions(AzureSubscriptions body) { + this.serviceClient().addAzureSubscriptions(body); + } + + public void addAzureSubscriptions(AzureSubscriptions body, Context context) { + this.serviceClient().addAzureSubscriptions(body, context); + } + public ActivationLinks listActivationLinks() { ActivationLinksInner inner = this.serviceClient().listActivationLinks(); if (inner != null) { 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..921857a3541e 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 @@ -89,7 +89,7 @@ Mono> listByLocationNext( } /** - * 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. @@ -121,7 +121,7 @@ private Mono> listByLocationSinglePageAsync(St } /** - * 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. @@ -154,7 +154,7 @@ private Mono> listByLocationSinglePageAsync(St } /** - * 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. @@ -169,7 +169,7 @@ private PagedFlux listByLocationAsync(String location) { } /** - * 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. @@ -185,7 +185,7 @@ private PagedFlux listByLocationAsync(String location, Conte } /** - * 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. @@ -199,7 +199,7 @@ public PagedIterable listByLocation(String location) { } /** - * 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. 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..b7d9db54d6c3 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 @@ -74,7 +74,7 @@ public interface VirtualNetworkAddressesService { @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudVmCluster(@HostParam("$host") String endpoint, + Mono> listByParent(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, @@ -118,7 +118,7 @@ Mono>> delete(@HostParam("$host") String endpoint, @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByCloudVmClusterNext( + Mono> listByParentNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -135,8 +135,8 @@ Mono> listByCloudVmClusterNext( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByCloudVmClusterSinglePageAsync(String resourceGroupName, String cloudvmclustername) { + private Mono> listByParentSinglePageAsync(String resourceGroupName, + String cloudvmclustername) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -155,7 +155,7 @@ Mono> listByCloudVmClusterNext( } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), + .withContext(context -> service.listByParent(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)) @@ -175,8 +175,8 @@ Mono> listByCloudVmClusterNext( * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByCloudVmClusterSinglePageAsync(String resourceGroupName, String cloudvmclustername, Context context) { + private Mono> listByParentSinglePageAsync(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.")); @@ -196,8 +196,8 @@ Mono> listByCloudVmClusterNext( 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) + .listByParent(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)); } @@ -213,10 +213,10 @@ Mono> listByCloudVmClusterNext( * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, + private PagedFlux listByParentAsync(String resourceGroupName, String cloudvmclustername) { - return new PagedFlux<>(() -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername), - nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, cloudvmclustername), + nextLink -> listByParentNextSinglePageAsync(nextLink)); } /** @@ -231,11 +231,10 @@ private PagedFlux listByCloudVmClusterAsync(String r * @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)); + private PagedFlux listByParentAsync(String resourceGroupName, String cloudvmclustername, + Context context) { + return new PagedFlux<>(() -> listByParentSinglePageAsync(resourceGroupName, cloudvmclustername, context), + nextLink -> listByParentNextSinglePageAsync(nextLink, context)); } /** @@ -249,9 +248,8 @@ private PagedFlux listByCloudVmClusterAsync(String r * @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)); + public PagedIterable listByParent(String resourceGroupName, String cloudvmclustername) { + return new PagedIterable<>(listByParentAsync(resourceGroupName, cloudvmclustername)); } /** @@ -266,9 +264,9 @@ public PagedIterable listByCloudVmCluster(String res * @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)); + public PagedIterable listByParent(String resourceGroupName, String cloudvmclustername, + Context context) { + return new PagedIterable<>(listByParentAsync(resourceGroupName, cloudvmclustername, context)); } /** @@ -916,7 +914,7 @@ public void delete(String resourceGroupName, String cloudvmclustername, String v * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterNextSinglePageAsync(String nextLink) { + private Mono> listByParentNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -926,8 +924,7 @@ private Mono> listByCloudVmClusterNext } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByCloudVmClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .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())); @@ -945,7 +942,7 @@ private Mono> listByCloudVmClusterNext * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByCloudVmClusterNextSinglePageAsync(String nextLink, + private Mono> listByParentNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -956,7 +953,7 @@ private Mono> listByCloudVmClusterNext } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByCloudVmClusterNext(nextLink, this.client.getEndpoint(), accept, context) + return 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)); } 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..b4d5d16acfad 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 @@ -27,17 +27,16 @@ public VirtualNetworkAddressesImpl(VirtualNetworkAddressesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByCloudVmCluster(String resourceGroupName, - String cloudvmclustername) { + public PagedIterable listByParent(String resourceGroupName, String cloudvmclustername) { PagedIterable inner - = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername); + = this.serviceClient().listByParent(resourceGroupName, cloudvmclustername); return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkAddressImpl(inner1, this.manager())); } - public PagedIterable listByCloudVmCluster(String resourceGroupName, - String cloudvmclustername, Context context) { + public PagedIterable listByParent(String resourceGroupName, String cloudvmclustername, + Context context) { PagedIterable inner - = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername, context); + = this.serviceClient().listByParent(resourceGroupName, cloudvmclustername, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkAddressImpl(inner1, this.manager())); } 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..422cb3389601 --- /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) AutoRest 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 { + /** + * Static value Succeeded for AddSubscriptionOperationState. + */ + public static final AddSubscriptionOperationState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Updating for AddSubscriptionOperationState. + */ + public static final AddSubscriptionOperationState UPDATING = fromString("Updating"); + + /** + * Static value Failed for AddSubscriptionOperationState. + */ + 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/AutonomousDatabase.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabase.java index b13a73ffb9dd..d012c81d1496 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 @@ -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 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. + */ + AutonomousDatabase changeDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails body); + + /** + * 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. + */ + AutonomousDatabase changeDisasterRecoveryConfiguration(DisasterRecoveryConfigurationDetails body, Context context); + /** * Perform failover action on Autonomous Database. * 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..5de60b8664c9 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 @@ -163,12 +163,12 @@ 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); + Update withProperties(AutonomousDatabaseBackupProperties properties); } } 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..048461703a5f 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 @@ -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/AutonomousDatabaseBackupUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdate.java index 683199e82006..92ebaa8d09d6 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 @@ -5,21 +5,42 @@ package com.azure.resourcemanager.oracledatabase.models; import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; /** - * The type used for update operations of the AutonomousDatabaseBackup. + * AutonomousDatabaseBackup resource definition. */ @Fluent -public final class AutonomousDatabaseBackupUpdate implements JsonSerializable { +public final class AutonomousDatabaseBackupUpdate extends ProxyResource { /* - * The updatable properties of the AutonomousDatabaseBackup. + * The resource-specific properties for this resource. */ - private AutonomousDatabaseBackupUpdateProperties properties; + private AutonomousDatabaseBackupProperties 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 AutonomousDatabaseBackupUpdate class. @@ -28,25 +49,64 @@ 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. */ - public AutonomousDatabaseBackupUpdateProperties properties() { + public AutonomousDatabaseBackupProperties properties() { return this.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. */ - public AutonomousDatabaseBackupUpdate withProperties(AutonomousDatabaseBackupUpdateProperties properties) { + public AutonomousDatabaseBackupUpdate withProperties(AutonomousDatabaseBackupProperties properties) { this.properties = properties; 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; + } + /** * Validates the instance. * @@ -74,6 +134,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AutonomousDatabaseBackupUpdate 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 AutonomousDatabaseBackupUpdate. */ public static AutonomousDatabaseBackupUpdate fromJson(JsonReader jsonReader) throws IOException { @@ -84,9 +145,17 @@ public static AutonomousDatabaseBackupUpdate fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("properties".equals(fieldName)) { + if ("id".equals(fieldName)) { + deserializedAutonomousDatabaseBackupUpdate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedAutonomousDatabaseBackupUpdate.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedAutonomousDatabaseBackupUpdate.type = reader.getString(); + } else if ("properties".equals(fieldName)) { deserializedAutonomousDatabaseBackupUpdate.properties - = AutonomousDatabaseBackupUpdateProperties.fromJson(reader); + = AutonomousDatabaseBackupProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedAutonomousDatabaseBackupUpdate.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 deleted file mode 100644 index 93fc10d79971..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseBackupUpdateProperties.java +++ /dev/null @@ -1,96 +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 updatable properties of the AutonomousDatabaseBackup. - */ -@Fluent -public final class AutonomousDatabaseBackupUpdateProperties - implements JsonSerializable { - /* - * Retention period, in days, for long-term backups. - */ - private Integer retentionPeriodInDays; - - /** - * Creates an instance of AutonomousDatabaseBackupUpdateProperties class. - */ - public AutonomousDatabaseBackupUpdateProperties() { - } - - /** - * Get the retentionPeriodInDays property: Retention period, in days, for long-term backups. - * - * @return the retentionPeriodInDays value. - */ - public Integer retentionPeriodInDays() { - return this.retentionPeriodInDays; - } - - /** - * Set the retentionPeriodInDays property: Retention period, in days, for long-term backups. - * - * @param retentionPeriodInDays the retentionPeriodInDays value to set. - * @return the AutonomousDatabaseBackupUpdateProperties object itself. - */ - public AutonomousDatabaseBackupUpdateProperties withRetentionPeriodInDays(Integer retentionPeriodInDays) { - this.retentionPeriodInDays = retentionPeriodInDays; - 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("retentionPeriodInDays", this.retentionPeriodInDays); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AutonomousDatabaseBackupUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AutonomousDatabaseBackupUpdateProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AutonomousDatabaseBackupUpdateProperties. - */ - public static AutonomousDatabaseBackupUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AutonomousDatabaseBackupUpdateProperties deserializedAutonomousDatabaseBackupUpdateProperties - = new AutonomousDatabaseBackupUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("retentionPeriodInDays".equals(fieldName)) { - deserializedAutonomousDatabaseBackupUpdateProperties.retentionPeriodInDays - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedAutonomousDatabaseBackupUpdateProperties; - }); - } -} 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..fd03dc10128e 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 @@ -23,8 +23,7 @@ public interface AutonomousDatabaseBackups { * @return the response of a AutonomousDatabaseBackup list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename); + PagedIterable listByParent(String resourceGroupName, String autonomousdatabasename); /** * List AutonomousDatabaseBackup resources by AutonomousDatabase. @@ -38,8 +37,8 @@ PagedIterable listByAutonomousDatabase(String resource * @return the response of a AutonomousDatabaseBackup list operation as paginated response with * {@link PagedIterable}. */ - PagedIterable listByAutonomousDatabase(String resourceGroupName, - String autonomousdatabasename, Context context); + PagedIterable listByParent(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..465c6b1ba40b 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 @@ -95,16 +95,15 @@ 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(); } @@ -2078,6 +2130,10 @@ 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 ("CrossRegionDisasterRecovery".equals(discriminatorValue)) { + return AutonomousDatabaseCrossRegionDisasterRecoveryProperties.fromJson(readerToUse.reset()); + } else if ("CloneFromBackupTimestamp".equals(discriminatorValue)) { + return AutonomousDatabaseFromBackupTimestampProperties.fromJson(readerToUse.reset()); } else if ("Regular".equals(discriminatorValue)) { return AutonomousDatabaseProperties.fromJson(readerToUse.reset()); } else { @@ -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/AutonomousDatabaseCharacterSetProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseCharacterSetProperties.java index 0025e4ea51e0..9a0cf0a1bc03 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 @@ -4,7 +4,8 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +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; @@ -14,7 +15,7 @@ /** * AutonomousDatabaseCharacterSet resource model. */ -@Immutable +@Fluent public final class AutonomousDatabaseCharacterSetProperties implements JsonSerializable { /* @@ -37,20 +38,39 @@ public String characterSet() { return this.characterSet; } + /** + * Set the characterSet property: The Oracle Autonomous Database supported character sets. + * + * @param characterSet the characterSet value to set. + * @return the AutonomousDatabaseCharacterSetProperties object itself. + */ + public AutonomousDatabaseCharacterSetProperties withCharacterSet(String characterSet) { + this.characterSet = characterSet; + return this; + } + /** * Validates the instance. * * @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 +80,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..84950cfa6a7a 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 @@ -13,7 +13,7 @@ */ public interface AutonomousDatabaseCharacterSets { /** - * 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. @@ -25,7 +25,7 @@ public interface AutonomousDatabaseCharacterSets { PagedIterable listByLocation(String location); /** - * 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. 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..3b43d84bd688 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 @@ -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} */ @@ -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); @@ -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..a8e34b8855cb --- /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) AutoRest 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 String source = "CrossRegionDisasterRecovery"; + + /* + * 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 String 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(Float 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); + 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::getFloat)); + } 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..82961c1cd505 --- /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) AutoRest 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 String source = "BackupFromTimestamp"; + + /* + * 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 String 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(Float 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); + 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::getFloat)); + } 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/AutonomousDatabaseNationalCharacterSetProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseNationalCharacterSetProperties.java index 8099383735a2..e0aba2c5c2c7 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 @@ -4,7 +4,8 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +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; @@ -14,7 +15,7 @@ /** * AutonomousDatabaseNationalCharacterSet resource model. */ -@Immutable +@Fluent public final class AutonomousDatabaseNationalCharacterSetProperties implements JsonSerializable { /* @@ -37,20 +38,39 @@ public String characterSet() { return this.characterSet; } + /** + * Set the characterSet property: The Oracle Autonomous Database supported national character sets. + * + * @param characterSet the characterSet value to set. + * @return the AutonomousDatabaseNationalCharacterSetProperties object itself. + */ + public AutonomousDatabaseNationalCharacterSetProperties withCharacterSet(String characterSet) { + this.characterSet = characterSet; + return this; + } + /** * Validates the instance. * * @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 +80,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..e8e5d6764729 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 @@ -13,7 +13,7 @@ */ public interface AutonomousDatabaseNationalCharacterSets { /** - * 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. @@ -25,7 +25,7 @@ public interface AutonomousDatabaseNationalCharacterSets { PagedIterable listByLocation(String location); /** - * 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. 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..c186a4f8d320 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 @@ -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} */ @@ -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(); + } } /** @@ -1089,24 +483,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 +519,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 +534,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/AutonomousDatabaseUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/AutonomousDatabaseUpdate.java index 9fed493d7322..97c4a6f35e7a 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 @@ -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..406d1083154d 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 @@ -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; @@ -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. 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..1993054c7b47 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 @@ -13,7 +13,7 @@ */ public interface AutonomousDatabaseVersions { /** - * 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. @@ -24,7 +24,7 @@ public interface AutonomousDatabaseVersions { PagedIterable listByLocation(String location); /** - * 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. 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..87fcbc6f7845 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 @@ -104,6 +104,35 @@ Response getByResourceGroupWithResponse(String resourceGroup */ void delete(String resourceGroupName, String autonomousdatabasename, Context context); + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + AutonomousDatabase changeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body); + + /** + * 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 com.azure.core.management.exception.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. + */ + AutonomousDatabase changeDisasterRecoveryConfiguration(String resourceGroupName, String autonomousdatabasename, + DisasterRecoveryConfigurationDetails body, Context context); + /** * Perform failover action on Autonomous Database. * 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..da78fb9200f9 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 @@ -4,7 +4,8 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +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; @@ -14,7 +15,7 @@ /** * AutonomousDbVersion resource model. */ -@Immutable +@Fluent public final class AutonomousDbVersionProperties implements JsonSerializable { /* * Supported Autonomous Db versions. @@ -61,6 +62,17 @@ public String version() { return this.version; } + /** + * Set the version property: Supported Autonomous Db versions. + * + * @param version the version value to set. + * @return the AutonomousDbVersionProperties object itself. + */ + public AutonomousDbVersionProperties withVersion(String version) { + this.version = version; + return this; + } + /** * Get the dbWorkload property: The Autonomous Database workload type. * @@ -70,6 +82,17 @@ public WorkloadType dbWorkload() { return this.dbWorkload; } + /** + * Set the dbWorkload property: The Autonomous Database workload type. + * + * @param dbWorkload the dbWorkload value to set. + * @return the AutonomousDbVersionProperties object itself. + */ + public AutonomousDbVersionProperties withDbWorkload(WorkloadType dbWorkload) { + this.dbWorkload = dbWorkload; + return this; + } + /** * Get the isDefaultForFree property: True if this version of the Oracle Database software's default is free. * @@ -79,6 +102,17 @@ public Boolean isDefaultForFree() { return this.isDefaultForFree; } + /** + * Set the isDefaultForFree property: True if this version of the Oracle Database software's default is free. + * + * @param isDefaultForFree the isDefaultForFree value to set. + * @return the AutonomousDbVersionProperties object itself. + */ + public AutonomousDbVersionProperties withIsDefaultForFree(Boolean isDefaultForFree) { + this.isDefaultForFree = isDefaultForFree; + return this; + } + /** * Get the isDefaultForPaid property: True if this version of the Oracle Database software's default is paid. * @@ -88,6 +122,17 @@ public Boolean isDefaultForPaid() { return this.isDefaultForPaid; } + /** + * Set the isDefaultForPaid property: True if this version of the Oracle Database software's default is paid. + * + * @param isDefaultForPaid the isDefaultForPaid value to set. + * @return the AutonomousDbVersionProperties object itself. + */ + public AutonomousDbVersionProperties withIsDefaultForPaid(Boolean isDefaultForPaid) { + this.isDefaultForPaid = isDefaultForPaid; + return this; + } + /** * Get the isFreeTierEnabled property: True if this version of the Oracle Database software can be used for * Always-Free Autonomous Databases. @@ -98,6 +143,18 @@ public Boolean isFreeTierEnabled() { return this.isFreeTierEnabled; } + /** + * Set the isFreeTierEnabled property: True if this version of the Oracle Database software can be used for + * Always-Free Autonomous Databases. + * + * @param isFreeTierEnabled the isFreeTierEnabled value to set. + * @return the AutonomousDbVersionProperties object itself. + */ + public AutonomousDbVersionProperties withIsFreeTierEnabled(Boolean isFreeTierEnabled) { + this.isFreeTierEnabled = isFreeTierEnabled; + return this; + } + /** * Get the isPaidEnabled property: True if this version of the Oracle Database software has payments enabled. * @@ -107,20 +164,44 @@ public Boolean isPaidEnabled() { return this.isPaidEnabled; } + /** + * Set the isPaidEnabled property: True if this version of the Oracle Database software has payments enabled. + * + * @param isPaidEnabled the isPaidEnabled value to set. + * @return the AutonomousDbVersionProperties object itself. + */ + public AutonomousDbVersionProperties withIsPaidEnabled(Boolean isPaidEnabled) { + this.isPaidEnabled = isPaidEnabled; + return this; + } + /** * 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 AutonomousDbVersionProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDbVersionProperties.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("dbWorkload", this.dbWorkload == null ? null : this.dbWorkload.toString()); + jsonWriter.writeBooleanField("isDefaultForFree", this.isDefaultForFree); + jsonWriter.writeBooleanField("isDefaultForPaid", this.isDefaultForPaid); + jsonWriter.writeBooleanField("isFreeTierEnabled", this.isFreeTierEnabled); + jsonWriter.writeBooleanField("isPaidEnabled", this.isPaidEnabled); return jsonWriter.writeEndObject(); } @@ -130,6 +211,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of AutonomousDbVersionProperties 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 AutonomousDbVersionProperties. */ public static AutonomousDbVersionProperties fromJson(JsonReader jsonReader) throws IOException { 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..e6a8f15dda04 --- /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) AutoRest 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/CloudExadataInfrastructure.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudExadataInfrastructure.java index 6680e051ff69..2bb1bb92e1f4 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 @@ -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); 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..27874e15da40 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 @@ -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..700c0a579c8d 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 @@ -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/CloudVmCluster.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/CloudVmCluster.java index 3b616fbd494e..db13555cdc80 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 @@ -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); 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..79c06dd2eac8 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 @@ -40,6 +40,11 @@ public final class CloudVmClusterProperties implements JsonSerializable fileSystemConfigurationDetails; + /* * The data disk group size to be allocated in TBs. */ @@ -276,6 +281,11 @@ 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. * @@ -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); @@ -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..9c6b18b7ef29 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 @@ -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..1db6f9579741 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 @@ -22,6 +22,11 @@ public final class CloudVmClusterUpdateProperties implements JsonSerializable fileSystemConfigurationDetails; + /* * The data disk group size to be allocated in TBs. */ @@ -100,6 +105,27 @@ public CloudVmClusterUpdateProperties withStorageSizeInGbs(Integer storageSizeIn return this; } + /** + * Get the fileSystemConfigurationDetails property: Array of mount path and size. + * + * @return the fileSystemConfigurationDetails value. + */ + public List 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. * @@ -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); 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..8e9435e3a4b8 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 @@ -21,6 +21,16 @@ public final class DataBaseType extends ExpandableStringEnum { */ public static final DataBaseType CLONE = fromString("Clone"); + /** + * Static value CloneFromBackupTimestamp for DataBaseType. + */ + public static final DataBaseType CLONE_FROM_BACKUP_TIMESTAMP = fromString("CloneFromBackupTimestamp"); + + /** + * Static value CrossRegionDisasterRecovery for DataBaseType. + */ + 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/DbActionResponse.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbActionResponse.java new file mode 100644 index 000000000000..7fc4eb620827 --- /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) AutoRest 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/DbNodeDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeDetails.java new file mode 100644 index 000000000000..63c946445d64 --- /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) AutoRest 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/DbNodeProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodeProperties.java index 5b27a0bc0f24..dcf871c94da8 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 @@ -4,19 +4,21 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * The properties of DbNodeResource. */ -@Immutable +@Fluent public final class DbNodeProperties implements JsonSerializable { /* * DbNode OCID @@ -149,6 +151,17 @@ public String ocid() { return this.ocid; } + /** + * Set the ocid property: DbNode OCID. + * + * @param ocid the ocid value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withOcid(String ocid) { + this.ocid = ocid; + return this; + } + /** * Get the additionalDetails property: Additional information about the planned maintenance. * @@ -158,6 +171,17 @@ public String additionalDetails() { return this.additionalDetails; } + /** + * Set the additionalDetails property: Additional information about the planned maintenance. + * + * @param additionalDetails the additionalDetails value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withAdditionalDetails(String additionalDetails) { + this.additionalDetails = additionalDetails; + return this; + } + /** * Get the backupIpId property: The OCID of the backup IP address associated with the database node. * @@ -167,6 +191,17 @@ public String backupIpId() { return this.backupIpId; } + /** + * Set the backupIpId property: The OCID of the backup IP address associated with the database node. + * + * @param backupIpId the backupIpId value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withBackupIpId(String backupIpId) { + this.backupIpId = backupIpId; + return this; + } + /** * Get the backupVnic2Id property: The OCID of the second backup VNIC. * @@ -176,6 +211,17 @@ public String backupVnic2Id() { return this.backupVnic2Id; } + /** + * Set the backupVnic2Id property: The OCID of the second backup VNIC. + * + * @param backupVnic2Id the backupVnic2Id value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withBackupVnic2Id(String backupVnic2Id) { + this.backupVnic2Id = backupVnic2Id; + return this; + } + /** * Get the backupVnicId property: The OCID of the backup VNIC. * @@ -185,6 +231,17 @@ public String backupVnicId() { return this.backupVnicId; } + /** + * Set the backupVnicId property: The OCID of the backup VNIC. + * + * @param backupVnicId the backupVnicId value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withBackupVnicId(String backupVnicId) { + this.backupVnicId = backupVnicId; + return this; + } + /** * Get the cpuCoreCount property: The number of CPU cores enabled on the Db node. * @@ -194,6 +251,17 @@ public Integer cpuCoreCount() { return this.cpuCoreCount; } + /** + * Set the cpuCoreCount property: The number of CPU cores enabled on the Db node. + * + * @param cpuCoreCount the cpuCoreCount value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withCpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + return this; + } + /** * Get the dbNodeStorageSizeInGbs property: The allocated local node storage in GBs on the Db node. * @@ -203,6 +271,17 @@ public Integer dbNodeStorageSizeInGbs() { return this.dbNodeStorageSizeInGbs; } + /** + * Set the dbNodeStorageSizeInGbs property: The allocated local node storage in GBs on the Db node. + * + * @param dbNodeStorageSizeInGbs the dbNodeStorageSizeInGbs value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withDbNodeStorageSizeInGbs(Integer dbNodeStorageSizeInGbs) { + this.dbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + return this; + } + /** * Get the dbServerId property: The OCID of the Exacc Db server associated with the database node. * @@ -212,6 +291,17 @@ public String dbServerId() { return this.dbServerId; } + /** + * Set the dbServerId property: The OCID of the Exacc Db server associated with the database node. + * + * @param dbServerId the dbServerId value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withDbServerId(String dbServerId) { + this.dbServerId = dbServerId; + return this; + } + /** * Get the dbSystemId property: The OCID of the DB system. * @@ -221,6 +311,17 @@ public String dbSystemId() { return this.dbSystemId; } + /** + * Set the dbSystemId property: The OCID of the DB system. + * + * @param dbSystemId the dbSystemId value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withDbSystemId(String dbSystemId) { + this.dbSystemId = dbSystemId; + return this; + } + /** * Get the faultDomain property: The name of the Fault Domain the instance is contained in. * @@ -230,6 +331,17 @@ public String faultDomain() { return this.faultDomain; } + /** + * Set the faultDomain property: The name of the Fault Domain the instance is contained in. + * + * @param faultDomain the faultDomain value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withFaultDomain(String faultDomain) { + this.faultDomain = faultDomain; + return this; + } + /** * Get the hostIpId property: The OCID of the host IP address associated with the database node. * @@ -239,6 +351,17 @@ public String hostIpId() { return this.hostIpId; } + /** + * Set the hostIpId property: The OCID of the host IP address associated with the database node. + * + * @param hostIpId the hostIpId value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withHostIpId(String hostIpId) { + this.hostIpId = hostIpId; + return this; + } + /** * Get the hostname property: The host name for the database node. * @@ -248,6 +371,17 @@ public String hostname() { return this.hostname; } + /** + * Set the hostname property: The host name for the database node. + * + * @param hostname the hostname value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withHostname(String hostname) { + this.hostname = hostname; + return this; + } + /** * Get the lifecycleState property: The current state of the database node. * @@ -257,6 +391,17 @@ public DbNodeProvisioningState lifecycleState() { return this.lifecycleState; } + /** + * Set the lifecycleState property: The current state of the database node. + * + * @param lifecycleState the lifecycleState value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withLifecycleState(DbNodeProvisioningState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + /** * Get the lifecycleDetails property: Lifecycle details of Db Node. * @@ -266,6 +411,17 @@ public String lifecycleDetails() { return this.lifecycleDetails; } + /** + * Set the lifecycleDetails property: Lifecycle details of Db Node. + * + * @param lifecycleDetails the lifecycleDetails value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withLifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + return this; + } + /** * Get the maintenanceType property: The type of database node maintenance. * @@ -275,6 +431,17 @@ public DbNodeMaintenanceType maintenanceType() { return this.maintenanceType; } + /** + * Set the maintenanceType property: The type of database node maintenance. + * + * @param maintenanceType the maintenanceType value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withMaintenanceType(DbNodeMaintenanceType maintenanceType) { + this.maintenanceType = maintenanceType; + return this; + } + /** * Get the memorySizeInGbs property: The allocated memory in GBs on the Db node. * @@ -284,6 +451,17 @@ public Integer memorySizeInGbs() { return this.memorySizeInGbs; } + /** + * Set the memorySizeInGbs property: The allocated memory in GBs on the Db node. + * + * @param memorySizeInGbs the memorySizeInGbs value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withMemorySizeInGbs(Integer memorySizeInGbs) { + this.memorySizeInGbs = memorySizeInGbs; + return this; + } + /** * 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. @@ -294,6 +472,18 @@ public Integer softwareStorageSizeInGb() { return this.softwareStorageSizeInGb; } + /** + * Set 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. + * + * @param softwareStorageSizeInGb the softwareStorageSizeInGb value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withSoftwareStorageSizeInGb(Integer softwareStorageSizeInGb) { + this.softwareStorageSizeInGb = softwareStorageSizeInGb; + return this; + } + /** * Get the timeCreated property: The date and time that the database node was created. * @@ -303,6 +493,17 @@ public OffsetDateTime timeCreated() { return this.timeCreated; } + /** + * Set the timeCreated property: The date and time that the database node was created. + * + * @param timeCreated the timeCreated value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withTimeCreated(OffsetDateTime timeCreated) { + this.timeCreated = timeCreated; + return this; + } + /** * Get the timeMaintenanceWindowEnd property: End date and time of maintenance window. * @@ -312,6 +513,17 @@ public OffsetDateTime timeMaintenanceWindowEnd() { return this.timeMaintenanceWindowEnd; } + /** + * Set the timeMaintenanceWindowEnd property: End date and time of maintenance window. + * + * @param timeMaintenanceWindowEnd the timeMaintenanceWindowEnd value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withTimeMaintenanceWindowEnd(OffsetDateTime timeMaintenanceWindowEnd) { + this.timeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + return this; + } + /** * Get the timeMaintenanceWindowStart property: Start date and time of maintenance window. * @@ -321,6 +533,17 @@ public OffsetDateTime timeMaintenanceWindowStart() { return this.timeMaintenanceWindowStart; } + /** + * Set the timeMaintenanceWindowStart property: Start date and time of maintenance window. + * + * @param timeMaintenanceWindowStart the timeMaintenanceWindowStart value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withTimeMaintenanceWindowStart(OffsetDateTime timeMaintenanceWindowStart) { + this.timeMaintenanceWindowStart = timeMaintenanceWindowStart; + return this; + } + /** * Get the vnic2Id property: The OCID of the second VNIC. * @@ -330,6 +553,17 @@ public String vnic2Id() { return this.vnic2Id; } + /** + * Set the vnic2Id property: The OCID of the second VNIC. + * + * @param vnic2Id the vnic2Id value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withVnic2Id(String vnic2Id) { + this.vnic2Id = vnic2Id; + return this; + } + /** * Get the vnicId property: The OCID of the VNIC. * @@ -339,6 +573,17 @@ public String vnicId() { return this.vnicId; } + /** + * Set the vnicId property: The OCID of the VNIC. + * + * @param vnicId the vnicId value to set. + * @return the DbNodeProperties object itself. + */ + public DbNodeProperties withVnicId(String vnicId) { + this.vnicId = vnicId; + return this; + } + /** * Get the provisioningState property: Azure resource provisioning state. * @@ -354,14 +599,68 @@ public ResourceProvisioningState provisioningState() { * @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 DbNodeProperties")); + } + if (dbSystemId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property dbSystemId in model DbNodeProperties")); + } + if (lifecycleState() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property lifecycleState in model DbNodeProperties")); + } + if (timeCreated() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property timeCreated in model DbNodeProperties")); + } + if (vnicId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property vnicId in model DbNodeProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(DbNodeProperties.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ocid", this.ocid); + jsonWriter.writeStringField("dbSystemId", this.dbSystemId); + jsonWriter.writeStringField("lifecycleState", + this.lifecycleState == null ? null : this.lifecycleState.toString()); + jsonWriter.writeStringField("timeCreated", + this.timeCreated == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timeCreated)); + jsonWriter.writeStringField("vnicId", this.vnicId); + jsonWriter.writeStringField("additionalDetails", this.additionalDetails); + jsonWriter.writeStringField("backupIpId", this.backupIpId); + jsonWriter.writeStringField("backupVnic2Id", this.backupVnic2Id); + jsonWriter.writeStringField("backupVnicId", this.backupVnicId); + jsonWriter.writeNumberField("cpuCoreCount", this.cpuCoreCount); + jsonWriter.writeNumberField("dbNodeStorageSizeInGbs", this.dbNodeStorageSizeInGbs); + jsonWriter.writeStringField("dbServerId", this.dbServerId); + jsonWriter.writeStringField("faultDomain", this.faultDomain); + jsonWriter.writeStringField("hostIpId", this.hostIpId); + jsonWriter.writeStringField("hostname", this.hostname); + jsonWriter.writeStringField("lifecycleDetails", this.lifecycleDetails); + jsonWriter.writeStringField("maintenanceType", + this.maintenanceType == null ? null : this.maintenanceType.toString()); + 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.writeStringField("vnic2Id", this.vnic2Id); return jsonWriter.writeEndObject(); } @@ -371,6 +670,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DbNodeProperties 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 DbNodeProperties. */ public static DbNodeProperties fromJson(JsonReader jsonReader) throws IOException { @@ -382,6 +682,16 @@ public static DbNodeProperties fromJson(JsonReader jsonReader) throws IOExceptio if ("ocid".equals(fieldName)) { deserializedDbNodeProperties.ocid = reader.getString(); + } else if ("dbSystemId".equals(fieldName)) { + deserializedDbNodeProperties.dbSystemId = reader.getString(); + } else if ("lifecycleState".equals(fieldName)) { + deserializedDbNodeProperties.lifecycleState + = DbNodeProvisioningState.fromString(reader.getString()); + } else if ("timeCreated".equals(fieldName)) { + deserializedDbNodeProperties.timeCreated = reader + .getNullable(nonNullReader -> 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 +706,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 +720,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 +728,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/DbNodes.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DbNodes.java index 89bb028c00ae..7e8cada1d8f7 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 @@ -22,7 +22,7 @@ public interface DbNodes { * @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}. */ - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + PagedIterable listByParent(String resourceGroupName, String cloudvmclustername); /** * List DbNode resources by CloudVmCluster. @@ -35,7 +35,7 @@ public interface DbNodes { * @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}. */ - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, Context context); + PagedIterable listByParent(String resourceGroupName, String cloudvmclustername, Context context); /** * Get a DbNode. 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..d5f1df92098c 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 @@ -119,6 +119,11 @@ public final class DbServerProperties implements JsonSerializable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename); + PagedIterable listByParent(String resourceGroupName, String cloudexadatainfrastructurename); /** * List DbServer resources by CloudExadataInfrastructure. @@ -36,8 +35,8 @@ PagedIterable listByCloudExadataInfrastructure(String resourceGroupNam * @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}. */ - PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, - String cloudexadatainfrastructurename, Context context); + PagedIterable listByParent(String resourceGroupName, String cloudexadatainfrastructurename, + Context context); /** * Get a DbServer. 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..f948369ce08b 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 @@ -4,7 +4,8 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +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; @@ -14,17 +15,22 @@ /** * DbSystemShape resource model. */ -@Immutable +@Fluent public final class DbSystemShapeProperties implements JsonSerializable { /* * The family of the shape used for the DB system. */ private String shapeFamily; + /* + * The shape used for the DB system. + */ + private String shapeName; + /* * The maximum number of CPU cores that can be enabled on the DB system for this shape. */ - private Integer availableCoreCount; + private int availableCoreCount; /* * The minimum number of CPU cores that can be enabled on the DB system for this shape. @@ -117,6 +123,21 @@ public final class DbSystemShapeProperties implements JsonSerializable listByLocation(String location); /** - * 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. * @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}. */ - PagedIterable listByLocation(String location, Context context); + PagedIterable listByLocation(String location, String zone, Context context); /** * Get a DbSystemShape. 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..a4cb79c1d8d8 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DefinedFileSystemConfiguration.java @@ -0,0 +1,179 @@ +// 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; + +/** + * Predefined configurations for the file system. + */ +@Fluent +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. + */ + public DefinedFileSystemConfiguration() { + } + + /** + * Get the isBackupPartition property: Checks if the data can be backed up. + * + * @return the isBackupPartition value. + */ + public Boolean isBackupPartition() { + return this.isBackupPartition; + } + + /** + * Set the isBackupPartition property: Checks if the data can be backed up. + * + * @param isBackupPartition the isBackupPartition value to set. + * @return the DefinedFileSystemConfiguration object itself. + */ + public DefinedFileSystemConfiguration withIsBackupPartition(Boolean isBackupPartition) { + this.isBackupPartition = isBackupPartition; + return this; + } + + /** + * Get the isResizable property: Checks if the mount path is resizable. + * + * @return the isResizable value. + */ + public Boolean isResizable() { + return this.isResizable; + } + + /** + * Set the isResizable property: Checks if the mount path is resizable. + * + * @param isResizable the isResizable value to set. + * @return the DefinedFileSystemConfiguration object itself. + */ + public DefinedFileSystemConfiguration withIsResizable(Boolean isResizable) { + this.isResizable = isResizable; + return this; + } + + /** + * Get the minSizeGb property: Minimum size of mount path in Gb. + * + * @return the minSizeGb value. + */ + public Integer minSizeGb() { + return this.minSizeGb; + } + + /** + * Set the minSizeGb property: Minimum size of mount path in Gb. + * + * @param minSizeGb the minSizeGb value to set. + * @return the DefinedFileSystemConfiguration object itself. + */ + public DefinedFileSystemConfiguration withMinSizeGb(Integer minSizeGb) { + this.minSizeGb = minSizeGb; + return this; + } + + /** + * Get the mountPoint property: Mount path for the file system. + * + * @return the mountPoint value. + */ + public String mountPoint() { + return this.mountPoint; + } + + /** + * Set the mountPoint property: Mount path for the file system. + * + * @param mountPoint the mountPoint value to set. + * @return the DefinedFileSystemConfiguration object itself. + */ + public DefinedFileSystemConfiguration withMountPoint(String mountPoint) { + this.mountPoint = mountPoint; + 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.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..81b44060a711 --- /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) AutoRest 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/DnsPrivateViewProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/DnsPrivateViewProperties.java index cc839d518303..4e28b5a37224 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 @@ -4,19 +4,21 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * Views resource model. */ -@Immutable +@Fluent public final class DnsPrivateViewProperties implements JsonSerializable { /* * The OCID of the view @@ -31,7 +33,7 @@ public final class DnsPrivateViewProperties implements JsonSerializable listByLocation(String location); /** - * 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. 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..4ac58e0c5a9f 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 @@ -4,19 +4,21 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; /** * Zones resource model. */ -@Immutable +@Fluent public final class DnsPrivateZoneProperties implements JsonSerializable { /* * The OCID of the Zone @@ -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..0e3bc1bdc7c3 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 @@ -13,7 +13,7 @@ */ public interface DnsPrivateZones { /** - * 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. @@ -24,7 +24,7 @@ public interface DnsPrivateZones { PagedIterable listByLocation(String location); /** - * 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. 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..e2204d11d49f --- /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) AutoRest 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 exadbVmCluster resource definition. + */ + 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 exadbVmCluster resource definition. + */ + 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..2ae265ef40ee --- /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) AutoRest 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 { + /** + * Static value Provisioning for ExadbVmClusterLifecycleState. + */ + public static final ExadbVmClusterLifecycleState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Available for ExadbVmClusterLifecycleState. + */ + public static final ExadbVmClusterLifecycleState AVAILABLE = fromString("Available"); + + /** + * Static value Updating for ExadbVmClusterLifecycleState. + */ + public static final ExadbVmClusterLifecycleState UPDATING = fromString("Updating"); + + /** + * Static value Terminating for ExadbVmClusterLifecycleState. + */ + public static final ExadbVmClusterLifecycleState TERMINATING = fromString("Terminating"); + + /** + * Static value Terminated for ExadbVmClusterLifecycleState. + */ + public static final ExadbVmClusterLifecycleState TERMINATED = fromString("Terminated"); + + /** + * Static value MaintenanceInProgress for ExadbVmClusterLifecycleState. + */ + public static final ExadbVmClusterLifecycleState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); + + /** + * Static value Failed for ExadbVmClusterLifecycleState. + */ + 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/ExadbVmClusterListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterListResult.java new file mode 100644 index 000000000000..f9092b36dc7d --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExadbVmClusterListResult.java @@ -0,0 +1,113 @@ +// 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.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/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..746386e834ac --- /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) AutoRest 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..924a25a2d8a5 --- /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) 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; + +/** + * 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..d8f270dc12e1 --- /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) 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; +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..c7b3ca48e6cb --- /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) 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 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..b183917b6672 --- /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) AutoRest 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); + + /** + * 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); + + /** + * 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); + + /** + * 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 exadbVmCluster resource definition. + */ + 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 exadbVmCluster resource definition. + */ + 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..bd748b68f3bc --- /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) AutoRest 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/ExascaleDbNodeListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodeListResult.java new file mode 100644 index 000000000000..c2d7e1fbffa6 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodeListResult.java @@ -0,0 +1,113 @@ +// 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.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/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..239a8968a0d0 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbNodeProperties.java @@ -0,0 +1,455 @@ +// 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.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. + */ +@Fluent +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. + */ + public ExascaleDbNodeProperties() { + } + + /** + * Get the ocid property: DbNode OCID. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Set the ocid property: DbNode OCID. + * + * @param ocid the ocid value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withOcid(String ocid) { + this.ocid = ocid; + return this; + } + + /** + * Get the additionalDetails property: Additional information about the planned maintenance. + * + * @return the additionalDetails value. + */ + public String additionalDetails() { + return this.additionalDetails; + } + + /** + * Set the additionalDetails property: Additional information about the planned maintenance. + * + * @param additionalDetails the additionalDetails value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withAdditionalDetails(String additionalDetails) { + this.additionalDetails = additionalDetails; + return this; + } + + /** + * Get the cpuCoreCount property: The number of CPU cores enabled on the Db node. + * + * @return the cpuCoreCount value. + */ + public Integer cpuCoreCount() { + return this.cpuCoreCount; + } + + /** + * Set the cpuCoreCount property: The number of CPU cores enabled on the Db node. + * + * @param cpuCoreCount the cpuCoreCount value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withCpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + return this; + } + + /** + * 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; + } + + /** + * Set the dbNodeStorageSizeInGbs property: The allocated local node storage in GBs on the Db node. + * + * @param dbNodeStorageSizeInGbs the dbNodeStorageSizeInGbs value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withDbNodeStorageSizeInGbs(Integer dbNodeStorageSizeInGbs) { + this.dbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + return this; + } + + /** + * 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; + } + + /** + * Set the faultDomain property: The name of the Fault Domain the instance is contained in. + * + * @param faultDomain the faultDomain value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withFaultDomain(String faultDomain) { + this.faultDomain = faultDomain; + return this; + } + + /** + * Get the hostname property: The host name for the database node. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: The host name for the database node. + * + * @param hostname the hostname value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the lifecycleState property: The current state of the database node. + * + * @return the lifecycleState value. + */ + public DbNodeProvisioningState lifecycleState() { + return this.lifecycleState; + } + + /** + * Set the lifecycleState property: The current state of the database node. + * + * @param lifecycleState the lifecycleState value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withLifecycleState(DbNodeProvisioningState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Get the maintenanceType property: The type of database node maintenance. + * + * @return the maintenanceType value. + */ + public String maintenanceType() { + return this.maintenanceType; + } + + /** + * Set the maintenanceType property: The type of database node maintenance. + * + * @param maintenanceType the maintenanceType value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withMaintenanceType(String maintenanceType) { + this.maintenanceType = maintenanceType; + return this; + } + + /** + * Get the memorySizeInGbs property: The allocated memory in GBs on the Db node. + * + * @return the memorySizeInGbs value. + */ + public Integer memorySizeInGbs() { + return this.memorySizeInGbs; + } + + /** + * Set the memorySizeInGbs property: The allocated memory in GBs on the Db node. + * + * @param memorySizeInGbs the memorySizeInGbs value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withMemorySizeInGbs(Integer memorySizeInGbs) { + this.memorySizeInGbs = memorySizeInGbs; + return this; + } + + /** + * 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; + } + + /** + * Set 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. + * + * @param softwareStorageSizeInGb the softwareStorageSizeInGb value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withSoftwareStorageSizeInGb(Integer softwareStorageSizeInGb) { + this.softwareStorageSizeInGb = softwareStorageSizeInGb; + return this; + } + + /** + * Get the timeMaintenanceWindowEnd property: End date and time of maintenance window. + * + * @return the timeMaintenanceWindowEnd value. + */ + public OffsetDateTime timeMaintenanceWindowEnd() { + return this.timeMaintenanceWindowEnd; + } + + /** + * Set the timeMaintenanceWindowEnd property: End date and time of maintenance window. + * + * @param timeMaintenanceWindowEnd the timeMaintenanceWindowEnd value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withTimeMaintenanceWindowEnd(OffsetDateTime timeMaintenanceWindowEnd) { + this.timeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + return this; + } + + /** + * Get the timeMaintenanceWindowStart property: Start date and time of maintenance window. + * + * @return the timeMaintenanceWindowStart value. + */ + public OffsetDateTime timeMaintenanceWindowStart() { + return this.timeMaintenanceWindowStart; + } + + /** + * Set the timeMaintenanceWindowStart property: Start date and time of maintenance window. + * + * @param timeMaintenanceWindowStart the timeMaintenanceWindowStart value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withTimeMaintenanceWindowStart(OffsetDateTime timeMaintenanceWindowStart) { + this.timeMaintenanceWindowStart = timeMaintenanceWindowStart; + return this; + } + + /** + * 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; + } + + /** + * Set the totalCpuCoreCount property: The total number of CPU cores reserved on the Db node. + * + * @param totalCpuCoreCount the totalCpuCoreCount value to set. + * @return the ExascaleDbNodeProperties object itself. + */ + public ExascaleDbNodeProperties withTotalCpuCoreCount(Integer totalCpuCoreCount) { + this.totalCpuCoreCount = totalCpuCoreCount; + return this; + } + + /** + * 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..fd8e84df82dc --- /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) AutoRest 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 { + /** + * 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); + + /** + * 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); + + /** + * 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 exascaleDbNode action 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 exascaleDbNode action 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..6a2b095e47ff --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageDetails.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Exadata Database Storage Details. + */ +@Fluent +public final class ExascaleDbStorageDetails implements JsonSerializable { + /* + * Available Capacity + */ + private Integer availableSizeInGbs; + + /* + * Total Capacity + */ + private Integer totalSizeInGbs; + + /** + * Creates an instance of ExascaleDbStorageDetails class. + */ + public ExascaleDbStorageDetails() { + } + + /** + * Get the availableSizeInGbs property: Available Capacity. + * + * @return the availableSizeInGbs value. + */ + public Integer availableSizeInGbs() { + return this.availableSizeInGbs; + } + + /** + * Set the availableSizeInGbs property: Available Capacity. + * + * @param availableSizeInGbs the availableSizeInGbs value to set. + * @return the ExascaleDbStorageDetails object itself. + */ + public ExascaleDbStorageDetails withAvailableSizeInGbs(Integer availableSizeInGbs) { + this.availableSizeInGbs = availableSizeInGbs; + return this; + } + + /** + * Get the totalSizeInGbs property: Total Capacity. + * + * @return the totalSizeInGbs value. + */ + public Integer totalSizeInGbs() { + return this.totalSizeInGbs; + } + + /** + * Set the totalSizeInGbs property: Total Capacity. + * + * @param totalSizeInGbs the totalSizeInGbs value to set. + * @return the ExascaleDbStorageDetails object itself. + */ + public ExascaleDbStorageDetails withTotalSizeInGbs(Integer 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.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..4b148cec30fc --- /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) 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; + +/** + * 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..9c9c66df5548 --- /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) AutoRest 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..cee13d73711e --- /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) AutoRest 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 { + /** + * Static value Provisioning for ExascaleDbStorageVaultLifecycleState. + */ + public static final ExascaleDbStorageVaultLifecycleState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Available for ExascaleDbStorageVaultLifecycleState. + */ + public static final ExascaleDbStorageVaultLifecycleState AVAILABLE = fromString("Available"); + + /** + * Static value Updating for ExascaleDbStorageVaultLifecycleState. + */ + public static final ExascaleDbStorageVaultLifecycleState UPDATING = fromString("Updating"); + + /** + * Static value Terminating for ExascaleDbStorageVaultLifecycleState. + */ + public static final ExascaleDbStorageVaultLifecycleState TERMINATING = fromString("Terminating"); + + /** + * Static value Terminated for ExascaleDbStorageVaultLifecycleState. + */ + public static final ExascaleDbStorageVaultLifecycleState TERMINATED = fromString("Terminated"); + + /** + * Static value Failed for ExascaleDbStorageVaultLifecycleState. + */ + 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/ExascaleDbStorageVaultListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultListResult.java new file mode 100644 index 000000000000..16281f9d1348 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ExascaleDbStorageVaultListResult.java @@ -0,0 +1,115 @@ +// 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.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/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..9561c58b4dbf --- /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) AutoRest 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..b1337de73413 --- /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) 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; +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..ba6702370f97 --- /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) AutoRest 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 { + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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..32cc9d22ee4b --- /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) 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; + +/** + * 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..86762c6832aa --- /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) AutoRest 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/FlexComponentListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponentListResult.java new file mode 100644 index 000000000000..fa9512c0a355 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/FlexComponentListResult.java @@ -0,0 +1,112 @@ +// 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.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/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..7496fd5cede7 --- /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) AutoRest 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. + */ + public 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..78a7640cdb11 --- /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) AutoRest 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 { + /** + * 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); + + /** + * 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); +} 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..b35b9bdf6cd9 --- /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) AutoRest 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/GiMinorVersionListResult.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersionListResult.java new file mode 100644 index 000000000000..9c08ae776e2e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersionListResult.java @@ -0,0 +1,113 @@ +// 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.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/GiMinorVersionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersionProperties.java new file mode 100644 index 000000000000..c113d61bd667 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiMinorVersionProperties.java @@ -0,0 +1,130 @@ +// 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.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. + */ +@Fluent +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. + */ + public GiMinorVersionProperties() { + } + + /** + * Get the version property: A valid Oracle Grid Infrastructure (GI) software version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: A valid Oracle Grid Infrastructure (GI) software version. + * + * @param version the version value to set. + * @return the GiMinorVersionProperties object itself. + */ + public GiMinorVersionProperties withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the gridImageOcid property: Grid Infrastructure Image Id. + * + * @return the gridImageOcid value. + */ + public String gridImageOcid() { + return this.gridImageOcid; + } + + /** + * Set the gridImageOcid property: Grid Infrastructure Image Id. + * + * @param gridImageOcid the gridImageOcid value to set. + * @return the GiMinorVersionProperties object itself. + */ + public GiMinorVersionProperties withGridImageOcid(String gridImageOcid) { + this.gridImageOcid = gridImageOcid; + return this; + } + + /** + * 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..466b2972e308 --- /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) AutoRest 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/GiVersionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersionProperties.java index fc42f2da25d3..763cebe7e3ff 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 @@ -4,7 +4,8 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +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; @@ -14,7 +15,7 @@ /** * GiVersion resource model. */ -@Immutable +@Fluent public final class GiVersionProperties implements JsonSerializable { /* * A valid Oracle Grid Infrastructure (GI) software version. @@ -36,20 +37,38 @@ public String version() { return this.version; } + /** + * Set the version property: A valid Oracle Grid Infrastructure (GI) software version. + * + * @param version the version value to set. + * @return the GiVersionProperties object itself. + */ + public GiVersionProperties withVersion(String version) { + this.version = version; + return this; + } + /** * 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 GiVersionProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(GiVersionProperties.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); return jsonWriter.writeEndObject(); } @@ -59,6 +78,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of GiVersionProperties 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 GiVersionProperties. */ public static GiVersionProperties fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersions.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersions.java index a3edbc909b84..2a108b8e13fc 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersions.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/GiVersions.java @@ -13,7 +13,7 @@ */ public interface GiVersions { /** - * List GiVersion resources by Location. + * List GiVersion resources by SubscriptionLocationResource. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,16 +24,18 @@ public interface GiVersions { PagedIterable listByLocation(String location); /** - * 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. * @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}. */ - PagedIterable listByLocation(String location, Context context); + PagedIterable listByLocation(String location, SystemShapes shape, String zone, Context context); /** * Get a GiVersion. 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..39af348a4698 --- /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) AutoRest 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 { + /** + * Static value ReleaseUpdate for GridImageType. + */ + public static final GridImageType RELEASE_UPDATE = fromString("ReleaseUpdate"); + + /** + * Static value CustomImage for GridImageType. + */ + 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..9a92124b62dd --- /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) AutoRest 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 { + /** + * Static value COMPUTE for HardwareType. + */ + public static final HardwareType COMPUTE = fromString("COMPUTE"); + + /** + * Static value CELL for HardwareType. + */ + 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/OracleSubscriptionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionProperties.java index 6f8c63c789b0..d88603acc161 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 @@ -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/OracleSubscriptionUpdate.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/OracleSubscriptionUpdate.java index f2325b9f35a5..6cb248c8ed88 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 @@ -22,7 +22,7 @@ public final class OracleSubscriptionUpdate 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/RemoveVirtualMachineFromExadbVmClusterDetails.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/RemoveVirtualMachineFromExadbVmClusterDetails.java new file mode 100644 index 000000000000..c1ec35db2b34 --- /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) AutoRest 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/ShapeFamily.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/ShapeFamily.java new file mode 100644 index 000000000000..c4fcd39e3d42 --- /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) AutoRest 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 { + /** + * Static value EXADATA for ShapeFamily. + */ + public static final ShapeFamily EXADATA = fromString("EXADATA"); + + /** + * Static value EXADB_XS for ShapeFamily. + */ + 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/SystemShapes.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemShapes.java new file mode 100644 index 000000000000..70aa8ef7611a --- /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) AutoRest 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 { + /** + * Static value Exadata.X9M for SystemShapes. + */ + public static final SystemShapes EXADATA_X9M = fromString("Exadata.X9M"); + + /** + * Static value Exadata.X11M for SystemShapes. + */ + public static final SystemShapes EXADATA_X11M = fromString("Exadata.X11M"); + + /** + * Static value ExaDbXS for SystemShapes. + */ + 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/SystemVersionProperties.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersionProperties.java index 0777faebd758..46911abcf84a 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 @@ -4,7 +4,8 @@ package com.azure.resourcemanager.oracledatabase.models; -import com.azure.core.annotation.Immutable; +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; @@ -14,7 +15,7 @@ /** * System Version Resource model. */ -@Immutable +@Fluent public final class SystemVersionProperties implements JsonSerializable { /* * A valid Oracle System Version @@ -36,20 +37,39 @@ public String systemVersion() { return this.systemVersion; } + /** + * Set the systemVersion property: A valid Oracle System Version. + * + * @param systemVersion the systemVersion value to set. + * @return the SystemVersionProperties object itself. + */ + public SystemVersionProperties withSystemVersion(String systemVersion) { + this.systemVersion = systemVersion; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (systemVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property systemVersion in model SystemVersionProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(SystemVersionProperties.class); + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("systemVersion", this.systemVersion); return jsonWriter.writeEndObject(); } @@ -59,6 +79,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SystemVersionProperties 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 SystemVersionProperties. */ public static SystemVersionProperties fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersions.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersions.java index 114a54bdcc38..274565428e06 100644 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersions.java +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/main/java/com/azure/resourcemanager/oracledatabase/models/SystemVersions.java @@ -13,7 +13,7 @@ */ public interface SystemVersions { /** - * 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. @@ -24,7 +24,7 @@ public interface SystemVersions { PagedIterable listByLocation(String location); /** - * 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. 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..712342f9ab0b 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 @@ -22,7 +22,7 @@ public interface VirtualNetworkAddresses { * @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}. */ - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + PagedIterable listByParent(String resourceGroupName, String cloudvmclustername); /** * List VirtualNetworkAddress resources by CloudVmCluster. @@ -35,7 +35,7 @@ public interface VirtualNetworkAddresses { * @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}. */ - PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + PagedIterable listByParent(String resourceGroupName, String cloudvmclustername, Context context); /** 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 index c1c630db5a37..519528be0c7e 100644 --- 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 @@ -12,7 +12,7 @@ public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_create. * json */ /** @@ -32,7 +32,7 @@ public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_create. * json */ /** 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 index d1972d1c9eaa..fe18b9b39d23 100644 --- 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 @@ -10,7 +10,7 @@ public final class AutonomousDatabaseBackupsDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_delete. * json */ /** @@ -26,7 +26,7 @@ public final class AutonomousDatabaseBackupsDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_delete. * json */ /** 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 index ffc17390874e..e2796dec8f3d 100644 --- 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 @@ -10,7 +10,7 @@ public final class AutonomousDatabaseBackupsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get. * json */ /** @@ -26,7 +26,7 @@ public final class AutonomousDatabaseBackupsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get. * json */ /** 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 deleted file mode 100644 index c613ee04e29b..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.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 AutonomousDatabaseBackups ListByAutonomousDatabase. - */ -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 - */ - /** - * 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); - } -} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByParentSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByParentSamples.java new file mode 100644 index 000000000000..81321d0c6019 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByParentSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for AutonomousDatabaseBackups ListByParent. + */ +public final class AutonomousDatabaseBackupsListByParentSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-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().listByParent("rg000", "databasedb1", com.azure.core.util.Context.NONE); + } +} 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..feef2dba718f 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 @@ -12,7 +12,7 @@ public final class AutonomousDatabaseBackupsUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_patch. * json */ /** @@ -30,7 +30,7 @@ public final class AutonomousDatabaseBackupsUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_patch. * json */ /** 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 index 67e57cd5f060..b3c42590fba2 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class AutonomousDatabaseCharacterSetsGetSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseCharacterSet_get.json */ /** 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 index 174598b0b98c..27e4e6e4377a 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class AutonomousDatabaseCharacterSetsListByLocationSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseCharacterSet_listByLocation.json */ /** 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 index f22d151ed0f5..fe14def4d022 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class AutonomousDatabaseNationalCharacterSetsGetSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseNationalCharacterSet_get.json */ /** 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 index 825a4ccb26fd..cb90a047651a 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class AutonomousDatabaseNationalCharacterSetsListByLocationSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseNationalCharacterSet_listByLocation.json */ /** 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 index ca5832f44611..0a165c90a693 100644 --- 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 @@ -10,7 +10,7 @@ public final class AutonomousDatabaseVersionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseVersion_get. * json */ /** 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 index e2425bb23ed8..ce225b9ed62a 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class AutonomousDatabaseVersionsListByLocationSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabaseVersion_listByLocation.json */ /** 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..0fa2d4c3d9dc --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples.java @@ -0,0 +1,49 @@ +// 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.DisasterRecoveryConfigurationDetails; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType; + +/** + * Samples for AutonomousDatabases ChangeDisasterRecoveryConfiguration. + */ +public final class AutonomousDatabasesChangeDisasterRecoveryConfigurationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * autonomousDatabase_changeDisasterRecoveryConfiguration.json + */ + /** + * Sample code: Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void performChangeDisasterRecoveryConfigurationActionOnAutonomousDatabase( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .changeDisasterRecoveryConfiguration("rg000", "databasedb1", + new DisasterRecoveryConfigurationDetails().withDisasterRecoveryType(DisasterRecoveryType.ADG) + .withIsReplicateAutomaticBackups(false), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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 index fd21c212aa5b..a76d3f7960f7 100644 --- 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 @@ -5,9 +5,11 @@ package com.azure.resourcemanager.oracledatabase.generated; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCloneProperties; +import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseCrossRegionDisasterRecoveryProperties; import com.azure.resourcemanager.oracledatabase.models.AutonomousDatabaseProperties; import com.azure.resourcemanager.oracledatabase.models.CloneType; import com.azure.resourcemanager.oracledatabase.models.ComputeModel; +import com.azure.resourcemanager.oracledatabase.models.DisasterRecoveryType; import java.util.HashMap; import java.util.Map; @@ -17,7 +19,7 @@ public final class AutonomousDatabasesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_create.json */ /** * Sample code: AutonomousDatabases_CreateOrUpdate. @@ -46,9 +48,38 @@ public final class AutonomousDatabasesCreateOrUpdateSamples { .create(); } + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * autonomousDatabaseCrossRegionPeer_create.json + */ + /** + * Sample code: AutonomousDatabases_CreateOrUpdate_CrossRegionPeer. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void autonomousDatabasesCreateOrUpdateCrossRegionPeer( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new AutonomousDatabaseCrossRegionDisasterRecoveryProperties().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") + .withSourceLocation("germanywestcentral") + .withSourceOcid("ocid1..aaaaa") + .withRemoteDisasterRecoveryType(DisasterRecoveryType.ADG) + .withIsReplicateAutomaticBackups(false)) + .create(); + } + /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_create.json */ /** * Sample code: Create Autonomous Database. @@ -79,7 +110,7 @@ public final class AutonomousDatabasesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseClone_create. * json */ /** @@ -113,7 +144,7 @@ public final class AutonomousDatabasesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseClone_create. * json */ /** 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 index 0c6748cc5e91..bd107b4d9a90 100644 --- 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 @@ -10,7 +10,7 @@ public final class AutonomousDatabasesDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_delete.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_delete.json */ /** * Sample code: Delete Autonomous Database. 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..1fc4c9208c9c 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 @@ -12,7 +12,7 @@ public final class AutonomousDatabasesFailoverSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_failover.json */ /** * Sample code: AutonomousDatabases_Failover. @@ -28,7 +28,7 @@ public final class AutonomousDatabasesFailoverSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_failover.json */ /** * Sample code: Perform failover action on Autonomous Database. 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..665be07c4acf 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 @@ -12,7 +12,7 @@ */ public final class AutonomousDatabasesGenerateWalletSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabase_generateWallet.json */ /** 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 index ed5524740ec9..7e1d0a1015a5 100644 --- 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 @@ -10,7 +10,7 @@ public final class AutonomousDatabasesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json */ /** * Sample code: Get Autonomous Database. @@ -24,7 +24,7 @@ public static void getAutonomousDatabase(com.azure.resourcemanager.oracledatabas /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json */ /** * Sample code: AutonomousDatabases_Get. 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 index 6757789c8559..763c90eafccb 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class AutonomousDatabasesListByResourceGroupSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabase_listByResourceGroup.json */ /** 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 index ce85e5d2e9a2..543c3f60f405 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class AutonomousDatabasesListSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * autonomousDatabase_listBySubscription.json */ /** 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..fabbb3b60d5d 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 @@ -13,7 +13,7 @@ public final class AutonomousDatabasesRestoreSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_restore.json */ /** * Sample code: AutonomousDatabases_Restore. @@ -30,7 +30,7 @@ public final class AutonomousDatabasesRestoreSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_restore.json */ /** * Sample code: Perform restore action on Autonomous Database. 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 index 912c18372290..856b7f590e21 100644 --- 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 @@ -10,7 +10,7 @@ public final class AutonomousDatabasesShrinkSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_shrink.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_shrink.json */ /** * Sample code: Perform shrink action on Autonomous Database. 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..a7b622798026 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 @@ -12,7 +12,7 @@ public final class AutonomousDatabasesSwitchoverSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_switchover. * json */ /** @@ -29,7 +29,7 @@ public static void performSwitchoverActionOnAutonomousDatabase( /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_switchover. * json */ /** 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 index 2a9089542541..7e48b14d222f 100644 --- 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 @@ -12,7 +12,7 @@ public final class AutonomousDatabasesUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_patch.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_patch.json */ /** * Sample code: Patch Autonomous Database. 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..e5684756fdf4 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 @@ -10,7 +10,7 @@ public final class CloudExadataInfrastructuresAddStorageCapacitySamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_addStorageCapacity.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_addStorageCapacity.json */ /** * Sample code: Perform add storage capacity on exadata infra. 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 index ea2a8fffa75d..df02d62fd484 100644 --- 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 @@ -15,7 +15,7 @@ public final class CloudExadataInfrastructuresCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_create.json */ /** * Sample code: Create Exadata Infrastructure. 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 index 04f1a87139e2..d00817a3e8a4 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudExadataInfrastructuresDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_delete.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_delete.json */ /** * Sample code: Delete Exadata Infrastructure. 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 index 02f9ac63a4d0..efc2f51ce4d8 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudExadataInfrastructuresGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_get.json */ /** * Sample code: Get Exadata Infrastructure. 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 index fc8bb7c737e5..4839e82cc878 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudExadataInfrastructuresListByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listByResourceGroup. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_listByResourceGroup. * json */ /** 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 index f24835759c81..404a7d814e5e 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudExadataInfrastructuresListSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listBySubscription.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_listBySubscription.json */ /** * Sample code: List Exadata Infrastructure by subscription. 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 index e1da02b7094f..274ac6dc6272 100644 --- 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 @@ -12,7 +12,7 @@ public final class CloudExadataInfrastructuresUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_patch.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_patch.json */ /** * Sample code: Patch Exadata Infrastructure. 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..f487a9d30323 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 @@ -13,7 +13,7 @@ public final class CloudVmClustersAddVmsSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_addVms.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_addVms.json */ /** * Sample code: Add VMs to VM Cluster. 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 index b6eaccdbfee5..36d713ad812c 100644 --- 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 @@ -19,7 +19,7 @@ public final class CloudVmClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_create.json */ /** * Sample code: Create VM Cluster. 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 index dd334d94eb59..536e2d5f5c17 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudVmClustersDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_delete.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_delete.json */ /** * Sample code: Delete VM Cluster. 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 index 1996de1e786f..2ce3276094f5 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudVmClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_get.json */ /** * Sample code: Get VM Cluster. 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 index 8cffe93c234f..4560ec0c556e 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudVmClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listByResourceGroup. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_listByResourceGroup. * json */ /** 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..2a95871e42e1 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 @@ -11,7 +11,7 @@ */ public final class CloudVmClustersListPrivateIpAddressesSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * vmClusters_listPrivateIpAddresses.json */ /** 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 index 65b478a59287..0ba74eb995cf 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudVmClustersListSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listBySubscription. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_listBySubscription. * json */ /** 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..66429ae7255d 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 @@ -13,7 +13,7 @@ public final class CloudVmClustersRemoveVmsSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_removeVms.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_removeVms.json */ /** * Sample code: Remove VMs from VM Cluster. 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 index 7e14997e8ba8..e5d885b402d1 100644 --- 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 @@ -12,7 +12,7 @@ public final class CloudVmClustersUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_patch.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_patch.json */ /** * Sample code: Patch VM Cluster. 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..1767bc7bbe16 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 @@ -13,7 +13,7 @@ public final class DbNodesActionSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_action.json */ /** * Sample code: DbNodes_Action. @@ -28,7 +28,7 @@ public static void dbNodesAction(com.azure.resourcemanager.oracledatabase.Oracle /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_action.json */ /** * Sample code: VM actions on DbNodes of VM Cluster. 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 index cab5c6a8e193..634fc8fc4a19 100644 --- 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 @@ -10,7 +10,7 @@ public final class DbNodesGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_get.json */ /** * Sample code: Get DbNode. 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/DbNodesListByParentSamples.java similarity index 69% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterSamples.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByParentSamples.java index b5662ed427c4..b5721adf21cd 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/DbNodesListByParentSamples.java @@ -5,12 +5,12 @@ package com.azure.resourcemanager.oracledatabase.generated; /** - * Samples for DbNodes ListByCloudVmCluster. + * Samples for DbNodes ListByParent. */ -public final class DbNodesListByCloudVmClusterSamples { +public final class DbNodesListByParentSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_listByParent.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_listByParent.json */ /** * Sample code: List DbNodes by VM Cluster. @@ -18,6 +18,6 @@ public final class DbNodesListByCloudVmClusterSamples { * @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); + manager.dbNodes().listByParent("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 index a4f490da1b22..87ab577a88dc 100644 --- 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 @@ -10,7 +10,7 @@ public final class DbServersGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_get.json */ /** * Sample code: Get DbServer by parent. 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/DbServersListByParentSamples.java similarity index 67% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureSamples.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByParentSamples.java index 73d9a6ac206f..1a59a88a8a9d 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/DbServersListByParentSamples.java @@ -5,12 +5,12 @@ package com.azure.resourcemanager.oracledatabase.generated; /** - * Samples for DbServers ListByCloudExadataInfrastructure. + * Samples for DbServers ListByParent. */ -public final class DbServersListByCloudExadataInfrastructureSamples { +public final class DbServersListByParentSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_listByParent.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_listByParent.json */ /** * Sample code: List DbServers by Exadata Infrastructure. @@ -19,6 +19,6 @@ public final class DbServersListByCloudExadataInfrastructureSamples { */ public static void listDbServersByExadataInfrastructure(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); + manager.dbServers().listByParent("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 index 0c0e72de6685..71985590a1ee 100644 --- 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 @@ -10,7 +10,7 @@ public final class DbSystemShapesGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_get.json */ /** * Sample code: Get a DbSystemShape by name. 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..21c05671f27a 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 @@ -10,7 +10,7 @@ public final class DbSystemShapesListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_listByLocation. * json */ /** @@ -20,6 +20,6 @@ public final class DbSystemShapesListByLocationSamples { */ public static void listDbSystemShapesByLocation(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.dbSystemShapes().listByLocation("eastus", com.azure.core.util.Context.NONE); + 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 index 964d314a074f..1fc3b1b06304 100644 --- 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 @@ -10,7 +10,7 @@ public final class DnsPrivateViewsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_get.json */ /** * Sample code: Get a DnsPrivateView by name. 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 index d903c9ae9062..1906cce6f99c 100644 --- 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 @@ -10,7 +10,7 @@ public final class DnsPrivateViewsListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_listByLocation. * json */ /** 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 index 28cd2c760bc7..09d4f2c34b0e 100644 --- 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 @@ -10,7 +10,7 @@ public final class DnsPrivateZonesGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_get.json */ /** * Sample code: Get a DnsPrivateZone by name. 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 index 47dff99e44f5..e005cd5a2d91 100644 --- 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 @@ -10,7 +10,7 @@ public final class DnsPrivateZonesListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_listByLocation. * json */ /** diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersCreateOrUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..26bcd71776da --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersCreateOrUpdateSamples.java @@ -0,0 +1,84 @@ +// 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.DataCollectionOptions; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterProperties; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterStorageDetails; +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 ExadbVmClusters CreateOrUpdate. + */ +public final class ExadbVmClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_CreateOrUpdate_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_CreateOrUpdate_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersCreateOrUpdateMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .define("clusterName") + .withRegion("xojp") + .withExistingResourceGroup("rgopenapi") + .withTags(mapOf("key9683", "fakeTokenPlaceholder")) + .withProperties(new ExadbVmClusterProperties().withClusterName("hssswln") + .withBackupSubnetCidr("fr") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(true) + .withIsHealthMonitoringEnabled(true) + .withIsIncidentLogsEnabled(true)) + .withDisplayName( + "dyhkncxzzgcwlfkfygvqlvqbxekvkbhjprmuxtaukewjnfrrnfqgrqsjfgsayrezkspqplrduuomuvtpkqurcoqjdnadlvedgfngglcgafbxtcewxlgckvehhqgfwkokbjoqftunjsgfjwbdaftxoytsphydwogtlnfxxuzzjvqcrin") + .withDomain("vzfak") + .withEnabledEcpuCount(0) + .withExascaleDbStorageVaultId( + "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/exascaleDbStorageVaults/storageVaultName") + .withGridImageOcid("ocid1.dbpatch.oc1..aaaaa3klq") + .withHostname("tdn") + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withNodeCount(8) + .withNsgCidrs(Arrays.asList(new NsgCidr().withSource("10.0.0.0/16") + .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)))) + .withPrivateZoneOcid("ocid1.autonomousdatabase.oc1..aaaaa3klq") + .withScanListenerPortTcp(9) + .withScanListenerPortTcpSsl(18) + .withShape("evenjblxxfsztdxlcr") + .withSshPublicKeys(Arrays.asList("wiseakllkohemfmnoyteg")) + .withSystemVersion( + "udwsykstqawwjrvzebfyyccnjzhxtijvywlgnrkqxnboibyppistnbvqqsnsxmjnzeumgnatmarzfnjhglmtrknszthrxtwewwqjbkwytbhtjbgondtktkpvjmxdcuyjupr") + .withTimeZone( + "ayuqnpfkasdzmxlfnkjzrenyogbvcysdbkstjhyjdgxygitlykihtwdiktilukyplgxovaonrqcqaviyaqgyrqfrklqvqyobnxgmzpqbgjhdtjdquhyqnvhavnqpfupaqhdedgdvfomeueeuwjjfiqiyxspybpyj") + .withTotalEcpuCount(56) + .withVmFileSystemStorage(new ExadbVmClusterStorageDetails().withTotalSizeInGbs(10))) + .withZones(Arrays.asList("iupjvcfsbvfhrebwf")) + .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/ExadbVmClustersDeleteSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersDeleteSamples.java new file mode 100644 index 000000000000..c41e3cdecdaa --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExadbVmClusters Delete. + */ +public final class ExadbVmClustersDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_Delete_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Delete_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersDeleteMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().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/ExadbVmClustersGetByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersGetByResourceGroupSamples.java new file mode 100644 index 000000000000..d743032671dc --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExadbVmClusters GetByResourceGroup. + */ +public final class ExadbVmClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_Get_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters() + .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/ExadbVmClustersListByResourceGroupSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersListByResourceGroupSamples.java new file mode 100644 index 000000000000..8b2958e06182 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersListByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExadbVmClusters ListByResourceGroup. + */ +public final class ExadbVmClustersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_ListByResourceGroup_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_ListByResourceGroup_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersListByResourceGroupMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().listByResourceGroup("rgopenapi", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersListSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersListSamples.java new file mode 100644 index 000000000000..fb458328350c --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExadbVmClusters List. + */ +public final class ExadbVmClustersListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_ListBySubscription_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_ListBySubscription_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void exadbVmClustersListBySubscriptionMaximumSet( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exadbVmClusters().list(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..4c481f898b2e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersRemoveVmsSamples.java @@ -0,0 +1,32 @@ +// 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.DbNodeDetails; +import com.azure.resourcemanager.oracledatabase.models.RemoveVirtualMachineFromExadbVmClusterDetails; +import java.util.Arrays; + +/** + * Samples for ExadbVmClusters RemoveVms. + */ +public final class ExadbVmClustersRemoveVmsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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/ExadbVmClustersUpdateSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersUpdateSamples.java new file mode 100644 index 000000000000..ed331f194695 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExadbVmClustersUpdateSamples.java @@ -0,0 +1,49 @@ +// 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.ExadbVmCluster; +import com.azure.resourcemanager.oracledatabase.models.ExadbVmClusterUpdateProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExadbVmClusters Update. + */ +public final class ExadbVmClustersUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExadbVmClusters_Update_MaximumSet_Gen.json + */ + /** + * Sample code: ExadbVmClusters_Update_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exadbVmClustersUpdateMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + ExadbVmCluster resource = manager.exadbVmClusters() + .getByResourceGroupWithResponse("rgopenapi", "vmClusterName", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("key6027", "fakeTokenPlaceholder")) + .withZones(Arrays.asList("zcqfxmpauiqjphmhwwt")) + .withProperties(new ExadbVmClusterUpdateProperties().withNodeCount(9)) + .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/ExascaleDbNodesActionSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesActionSamples.java new file mode 100644 index 000000000000..a9b4627dcb80 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesActionSamples.java @@ -0,0 +1,29 @@ +// 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.DbNodeAction; +import com.azure.resourcemanager.oracledatabase.models.DbNodeActionEnum; + +/** + * Samples for ExascaleDbNodes Action. + */ +public final class ExascaleDbNodesActionSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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/ExascaleDbNodesGetSamples.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesGetSamples.java new file mode 100644 index 000000000000..e1a6b7b7a1d6 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbNodes Get. + */ +public final class ExascaleDbNodesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * ExascaleDbNodes_Get_MaximumSet_Gen.json + */ + /** + * Sample code: ExascaleDbNodes_Get_MaximumSet. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void + exascaleDbNodesGetMaximumSet(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.exascaleDbNodes() + .getWithResponse("rgopenapi", "vmClusterName", "dbNodeName", 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..9167e73b143e --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbNodesListByParentSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbNodes ListByParent. + */ +public final class ExascaleDbNodesListByParentSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..ad89e72541cb --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsCreateSamples.java @@ -0,0 +1,55 @@ +// 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.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: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..f8a86689d300 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbStorageVaults Delete. + */ +public final class ExascaleDbStorageVaultsDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..395a7d25706a --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbStorageVaults GetByResourceGroup. + */ +public final class ExascaleDbStorageVaultsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..87f65c29dad7 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbStorageVaults ListByResourceGroup. + */ +public final class ExascaleDbStorageVaultsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..50e724da4236 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for ExascaleDbStorageVaults List. + */ +public final class ExascaleDbStorageVaultsListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..10ac5785e6a2 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/ExascaleDbStorageVaultsUpdateSamples.java @@ -0,0 +1,43 @@ +// 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.ExascaleDbStorageVault; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ExascaleDbStorageVaults Update. + */ +public final class ExascaleDbStorageVaultsUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..be0cee911e16 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for FlexComponents Get. + */ +public final class FlexComponentsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..6118862114d4 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/FlexComponentsListByParentSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.SystemShapes; + +/** + * Samples for FlexComponents ListByParent. + */ +public final class FlexComponentsListByParentSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..60d504176096 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +/** + * Samples for GiMinorVersions Get. + */ +public final class GiMinorVersionsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..4ceb7dfb6c12 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/GiMinorVersionsListByParentSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracledatabase.generated; + +import com.azure.resourcemanager.oracledatabase.models.ShapeFamily; + +/** + * Samples for GiMinorVersions ListByParent. + */ +public final class GiMinorVersionsListByParentSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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 index 531713978fdc..e96ffcba31c9 100644 --- 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 @@ -10,7 +10,22 @@ public final class GiVersionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MinimumSet_Gen. + * json + */ + /** + * Sample code: Get a GiVersion by name - generated by [MinimumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAGiVersionByNameGeneratedByMinimumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().getWithResponse("eastus", "giVersionName", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/giVersions_get.json */ /** * Sample code: Get a GiVersion by name. @@ -20,4 +35,19 @@ public final class GiVersionsGetSamples { public static void getAGiVersionByName(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { manager.giVersions().getWithResponse("eastus", "19.0.0.0", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MaximumSet_Gen. + * json + */ + /** + * Sample code: Get a GiVersion by name - generated by [MaximumSet] rule. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void getAGiVersionByNameGeneratedByMaximumSetRule( + com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { + manager.giVersions().getWithResponse("eastus", "giVersionName", 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..de97e18913e7 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 @@ -4,21 +4,40 @@ 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: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * 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..484637112c68 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 @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/operations_list.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/operations_list.json */ /** * Sample code: List Operations. 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..ae0c60d3f845 --- /dev/null +++ b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsAddAzureSubscriptionsSamples.java @@ -0,0 +1,29 @@ +// 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.AzureSubscriptions; +import java.util.Arrays; + +/** + * Samples for OracleSubscriptions AddAzureSubscriptions. + */ +public final class OracleSubscriptionsAddAzureSubscriptionsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ + * oracleSubscriptions_addAzureSubscriptions.json + */ + /** + * Sample code: Add Azure Subscriptions to the OracleSubscription. + * + * @param manager Entry point to OracleDatabaseManager. + */ + public static void addAzureSubscriptionsToTheOracleSubscription( + 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 index 3725152c6459..94f37e19f417 100644 --- 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 @@ -14,7 +14,7 @@ public final class OracleSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_create.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_create.json */ /** * Sample code: Create or Update Oracle Subscription. 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 index 588c82efdac5..2b9a0d90d223 100644 --- 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 @@ -10,7 +10,7 @@ public final class OracleSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_delete.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_delete.json */ /** * Sample code: Delete Oracle Subscription. 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 index 3340f16d7cc7..bc0b1c9dc137 100644 --- 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 @@ -10,7 +10,7 @@ public final class OracleSubscriptionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_get.json */ /** * Sample code: Get Oracle Subscription. 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..72b3e77b1ddb 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 @@ -9,7 +9,7 @@ */ public final class OracleSubscriptionsListActivationLinksSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * oracleSubscriptions_listActivationLinks.json */ /** 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..2636dc02cff5 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 @@ -9,7 +9,7 @@ */ public final class OracleSubscriptionsListCloudAccountDetailsSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * oracleSubscriptions_listCloudAccountDetails.json */ /** 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..7aec4d0bf071 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 @@ -9,7 +9,7 @@ */ public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * oracleSubscriptions_listSaasSubscriptionDetails.json */ /** 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 index 3257644d9ecd..e01ce0a131e2 100644 --- 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 @@ -9,7 +9,7 @@ */ public final class OracleSubscriptionsListSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * oracleSubscriptions_listBySubscription.json */ /** 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..8ef571c2feae 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 @@ -12,7 +12,7 @@ public final class OracleSubscriptionsUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_patch.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_patch.json */ /** * Sample code: Patch Oracle Subscription. 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 index 6b76df6ff46d..34a64d1955cd 100644 --- 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 @@ -10,7 +10,7 @@ public final class SystemVersionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json */ /** * Sample code: systemVersions_listSystemVersions. @@ -24,7 +24,7 @@ public final class SystemVersionsGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json */ /** * Sample code: Get Exadata System Version. 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 index bb8546bf9f16..3f7749c74710 100644 --- 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 @@ -10,7 +10,7 @@ public final class SystemVersionsListByLocationSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_listByLocation. * json */ /** @@ -25,7 +25,7 @@ public static void listExadataSystemVersionsByTheProvidedFilter( /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_listByLocation. * json */ /** 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 index 122dfe5bbc1e..afe28a89cb28 100644 --- 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 @@ -12,7 +12,7 @@ public final class VirtualNetworkAddressesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_create. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_create. * json */ /** 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 index d70247485ec5..b0cc401c296c 100644 --- 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 @@ -10,7 +10,7 @@ public final class VirtualNetworkAddressesDeleteSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_delete. + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_delete. * json */ /** 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 index 63040040f64d..3b0f1dc0eb04 100644 --- 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 @@ -10,7 +10,7 @@ public final class VirtualNetworkAddressesGetSamples { /* * x-ms-original-file: - * specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + * specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_get.json */ /** * Sample code: Get Virtual Network Address. 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/VirtualNetworkAddressesListByParentSamples.java similarity index 68% rename from sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java rename to sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/samples/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByParentSamples.java index 4de7f7977cbc..677b2795d130 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/VirtualNetworkAddressesListByParentSamples.java @@ -5,11 +5,11 @@ package com.azure.resourcemanager.oracledatabase.generated; /** - * Samples for VirtualNetworkAddresses ListByCloudVmCluster. + * Samples for VirtualNetworkAddresses ListByParent. */ -public final class VirtualNetworkAddressesListByCloudVmClusterSamples { +public final class VirtualNetworkAddressesListByParentSamples { /* - * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/ + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ * virtualNetworkAddresses_listByParent.json */ /** @@ -19,6 +19,6 @@ public final class VirtualNetworkAddressesListByCloudVmClusterSamples { */ public static void listVirtualNetworkAddressesByVMCluster(com.azure.resourcemanager.oracledatabase.OracleDatabaseManager manager) { - manager.virtualNetworkAddresses().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); + manager.virtualNetworkAddresses().listByParent("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 deleted file mode 100644 index a1fdc71ef600..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseMockTests.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.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.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 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\"}]}"; - - 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.autonomousDatabaseBackups() - .listByAutonomousDatabase("tmkzjvkviirhgfgr", "sdp", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xff", response.iterator().next().properties().displayName()); - Assertions.assertEquals(357864069, 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/AutonomousDatabaseCharacterSetsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsGetWithResponseMockTests.java deleted file mode 100644 index 832bd73f9988..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseCharacterSetsGetWithResponseMockTests.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.AutonomousDatabaseCharacterSet; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AutonomousDatabaseCharacterSetsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"characterSet\":\"lewjwiuubwef\"},\"id\":\"fapaqtfer\",\"name\":\"q\",\"type\":\"ex\"}"; - - 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)); - - AutonomousDatabaseCharacterSet response = manager.autonomousDatabaseCharacterSets() - .getWithResponse("pcpil", "hahzvechndbnwi", com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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/AutonomousDatabaseNationalCharacterSetsGetWithResponseMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsGetWithResponseMockTests.java deleted file mode 100644 index 38eeb24dae70..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/AutonomousDatabaseNationalCharacterSetsGetWithResponseMockTests.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.AutonomousDatabaseNationalCharacterSet; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AutonomousDatabaseNationalCharacterSetsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"characterSet\":\"sdaultxij\"},\"id\":\"mfqwa\",\"name\":\"lnqnmcjn\",\"type\":\"zqdqxt\"}"; - - 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)); - - AutonomousDatabaseNationalCharacterSet response = manager.autonomousDatabaseNationalCharacterSets() - .getWithResponse("yexaoguy", "i", com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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 deleted file mode 100644 index cc54b8311963..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudExadataInfrastructuresAddStorageCapacityMockTests.java +++ /dev/null @@ -1,60 +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 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\"}"; - - 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() - .addStorageCapacity("oaimlnw", "aaomylweazu", 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, - 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(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)); - } -} 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 deleted file mode 100644 index e43febddcecd..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/CloudVmClustersListPrivateIpAddressesWithResponseMockTests.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.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.PrivateIpAddressesFilter; -import com.azure.resourcemanager.oracledatabase.models.PrivateIpAddressProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -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\"}]"; - - 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)); - - List response = manager.cloudVmClusters() - .listPrivateIpAddressesWithResponse("kcdqzhlct", "dunqnd", - new PrivateIpAddressesFilter().withSubnetId("fpch").withVnicId("qbnj"), - 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()); - } -} 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 deleted file mode 100644 index ec81caa408d6..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesActionMockTests.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.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 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.Test; -import reactor.core.publisher.Mono; - -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\"}"; - - 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() - .action("byrplrohkpig", "fusuckzmkwklsno", "axmqeqal", - new DbNodeAction().withAction(DbNodeActionEnum.RESET), com.azure.core.util.Context.NONE); - - } -} 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 deleted file mode 100644 index c1a3ce93ad62..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbNodesListByCloudVmClusterMockTests.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.DbNode; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -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\"}]}"; - - 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.dbNodes().listByCloudVmCluster("o", "gebx", com.azure.core.util.Context.NONE); - - } -} 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 deleted file mode 100644 index 9449f03ad17d..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbServersListByCloudExadataInfrastructureMockTests.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.DbServer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -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\"}]}"; - - 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.dbServers() - .listByCloudExadataInfrastructure("neiknpg", "xgjiuqh", 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 deleted file mode 100644 index 25313ffaf17b..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DbSystemShapesListByLocationMockTests.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.DbSystemShape; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -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\"}]}"; - - 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.dbSystemShapes().listByLocation("ojphslhc", com.azure.core.util.Context.NONE); - - } -} 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/DnsPrivateZonesListByLocationMockTests.java b/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesListByLocationMockTests.java deleted file mode 100644 index 89cce4de5c12..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/DnsPrivateZonesListByLocationMockTests.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.DnsPrivateZone; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DnsPrivateZonesListByLocationMockTests { - @Test - public void testListByLocation() 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\"}]}"; - - 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.dnsPrivateZones().listByLocation("pv", com.azure.core.util.Context.NONE); - - } -} 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/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 deleted file mode 100644 index fec4b792bf54..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/GiVersionsListByLocationMockTests.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.GiVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GiVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"hkfkimrtixokf\"},\"id\":\"yinljqe\",\"name\":\"qwhix\",\"type\":\"onsts\"}]}"; - - 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.giVersions().listByLocation("wemxswvruunzz", com.azure.core.util.Context.NONE); - - } -} 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 deleted file mode 100644 index e82e71b117fe..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OperationsListMockTests.java +++ /dev/null @@ -1,36 +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.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -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\"}]}"; - - 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.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 deleted file mode 100644 index 62efec19e807..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListActivationLinksMockTests.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.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.ActivationLinks; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OracleSubscriptionsListActivationLinksMockTests { - @Test - public void testListActivationLinks() throws Exception { - String responseStr - = "{\"newCloudAccountActivationLink\":\"lgouwtlmjj\",\"existingCloudAccountActivationLink\":\"ojqtobaxk\"}"; - - 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)); - - 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 deleted file mode 100644 index 4f3a5f97c9d5..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListCloudAccountDetailsMockTests.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.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.CloudAccountDetails; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OracleSubscriptionsListCloudAccountDetailsMockTests { - @Test - public void testListCloudAccountDetails() throws Exception { - String responseStr = "{\"cloudAccountName\":\"ytunlbfjkwr\",\"cloudAccountHomeRegion\":\"nkqbhsyrq\"}"; - - 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)); - - 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 deleted file mode 100644 index df12b2983d61..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/OracleSubscriptionsListSaasSubscriptionDetailsMockTests.java +++ /dev/null @@ -1,36 +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.SaasSubscriptionDetails; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -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}"; - - 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)); - - 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 deleted file mode 100644 index 0b9d19ed9e5e..000000000000 --- a/sdk/oracledatabase/azure-resourcemanager-oracledatabase/src/test/java/com/azure/resourcemanager/oracledatabase/generated/VirtualNetworkAddressesListByCloudVmClusterMockTests.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.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.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 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\"}]}"; - - 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.virtualNetworkAddresses().listByCloudVmCluster("bdxxe", "unin", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bchaqd", response.iterator().next().properties().ipAddress()); - Assertions.assertEquals("qecrqctmxx", response.iterator().next().properties().vmOcid()); - } -}