From e8dd30e363009d2d5ab4a2cc3ca9c377197f3d4c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 14 May 2024 08:46:24 +0000 Subject: [PATCH] CodeGen from PR 28980 in Azure/azure-rest-api-specs Merge e23546dc961836d2a87a6cb014aadcaa8648ed9b into e07876f350e66c07b7d914e432c8e7ac6e435222 --- eng/versioning/version_client.txt | 1 + pom.xml | 3 +- sdk/clientcore/http-stress/pom.xml | 4 +- .../azure-resourcemanager-oracle/CHANGELOG.md | 5 + .../azure-resourcemanager-oracle/README.md | 107 + .../azure-resourcemanager-oracle/SAMPLE.md | 1669 ++++++++++++++ .../azure-resourcemanager-oracle/pom.xml | 62 + .../resourcemanager/oracle/OracleManager.java | 520 +++++ .../AutonomousDatabaseBackupsClient.java | 275 +++ ...AutonomousDatabaseCharacterSetsClient.java | 72 + ...usDatabaseNationalCharacterSetsClient.java | 73 + .../AutonomousDatabaseVersionsClient.java | 70 + .../fluent/AutonomousDatabasesClient.java | 428 ++++ .../CloudExadataInfrastructuresClient.java | 335 +++ .../oracle/fluent/CloudVmClustersClient.java | 428 ++++ .../oracle/fluent/DbNodesClient.java | 143 ++ .../oracle/fluent/DbServersClient.java | 76 + .../oracle/fluent/DbSystemShapesClient.java | 69 + .../oracle/fluent/DnsPrivateViewsClient.java | 69 + .../oracle/fluent/DnsPrivateZonesClient.java | 69 + .../oracle/fluent/GiVersionsClient.java | 69 + .../oracle/fluent/OperationsClient.java | 40 + .../fluent/OracleDatabaseResourceManager.java | 160 ++ .../fluent/OracleSubscriptionsClient.java | 348 +++ .../fluent/VirtualNetworkAddressesClient.java | 204 ++ .../fluent/models/ActivationLinksInner.java | 58 + .../models/AutonomousDatabaseBackupInner.java | 75 + .../AutonomousDatabaseCharacterSetInner.java | 75 + .../models/AutonomousDatabaseInner.java | 94 + ...mousDatabaseNationalCharacterSetInner.java | 76 + .../AutonomousDatabaseWalletFileInner.java | 62 + .../models/AutonomousDbVersionInner.java | 75 + .../models/CloudAccountDetailsInner.java | 58 + .../CloudExadataInfrastructureInner.java | 129 ++ .../fluent/models/CloudVmClusterInner.java | 94 + .../oracle/fluent/models/DbNodeInner.java | 75 + .../oracle/fluent/models/DbServerInner.java | 75 + .../fluent/models/DbSystemShapeInner.java | 75 + .../fluent/models/DnsPrivateViewInner.java | 75 + .../fluent/models/DnsPrivateZoneInner.java | 75 + .../oracle/fluent/models/GiVersionInner.java | 75 + .../oracle/fluent/models/OperationInner.java | 126 ++ .../models/OracleSubscriptionInner.java | 105 + .../PrivateIpAddressPropertiesInner.java | 186 ++ .../models/SaasSubscriptionDetailsInner.java | 209 ++ .../models/VirtualNetworkAddressInner.java | 75 + .../oracle/fluent/models/package-info.java | 9 + .../oracle/fluent/package-info.java | 9 + .../implementation/ActivationLinksImpl.java | 36 + .../AutonomousDatabaseBackupImpl.java | 142 ++ .../AutonomousDatabaseBackupsClientImpl.java | 1226 +++++++++++ .../AutonomousDatabaseBackupsImpl.java | 161 ++ .../AutonomousDatabaseCharacterSetImpl.java | 50 + ...nomousDatabaseCharacterSetsClientImpl.java | 397 ++++ .../AutonomousDatabaseCharacterSetsImpl.java | 71 + .../AutonomousDatabaseImpl.java | 216 ++ ...omousDatabaseNationalCharacterSetImpl.java | 50 + ...tabaseNationalCharacterSetsClientImpl.java | 406 ++++ ...mousDatabaseNationalCharacterSetsImpl.java | 72 + .../AutonomousDatabaseVersionsClientImpl.java | 394 ++++ .../AutonomousDatabaseVersionsImpl.java | 68 + .../AutonomousDatabaseWalletFileImpl.java | 32 + .../AutonomousDatabasesClientImpl.java | 1944 +++++++++++++++++ .../AutonomousDatabasesImpl.java | 216 ++ .../AutonomousDbVersionImpl.java | 50 + .../CloudAccountDetailsImpl.java | 36 + .../CloudExadataInfrastructureImpl.java | 215 ++ ...CloudExadataInfrastructuresClientImpl.java | 1561 +++++++++++++ .../CloudExadataInfrastructuresImpl.java | 181 ++ .../implementation/CloudVmClusterImpl.java | 213 ++ .../CloudVmClustersClientImpl.java | 1934 ++++++++++++++++ .../implementation/CloudVmClustersImpl.java | 220 ++ .../oracle/implementation/DbNodeImpl.java | 49 + .../implementation/DbNodesClientImpl.java | 696 ++++++ .../oracle/implementation/DbNodesImpl.java | 91 + .../oracle/implementation/DbServerImpl.java | 49 + .../implementation/DbServersClientImpl.java | 439 ++++ .../oracle/implementation/DbServersImpl.java | 71 + .../implementation/DbSystemShapeImpl.java | 49 + .../DbSystemShapesClientImpl.java | 389 ++++ .../implementation/DbSystemShapesImpl.java | 66 + .../implementation/DnsPrivateViewImpl.java | 49 + .../DnsPrivateViewsClientImpl.java | 389 ++++ .../implementation/DnsPrivateViewsImpl.java | 67 + .../implementation/DnsPrivateZoneImpl.java | 49 + .../DnsPrivateZonesClientImpl.java | 389 ++++ .../implementation/DnsPrivateZonesImpl.java | 67 + .../oracle/implementation/GiVersionImpl.java | 49 + .../implementation/GiVersionsClientImpl.java | 386 ++++ .../oracle/implementation/GiVersionsImpl.java | 65 + .../oracle/implementation/OperationImpl.java | 50 + .../implementation/OperationsClientImpl.java | 239 ++ .../oracle/implementation/OperationsImpl.java | 44 + .../OracleDatabaseResourceManagerBuilder.java | 138 ++ .../OracleDatabaseResourceManagerImpl.java | 528 +++++ .../OracleSubscriptionImpl.java | 55 + .../OracleSubscriptionsClientImpl.java | 1434 ++++++++++++ .../OracleSubscriptionsImpl.java | 171 ++ .../PrivateIpAddressPropertiesImpl.java | 48 + .../implementation/ResourceManagerUtils.java | 195 ++ .../SaasSubscriptionDetailsImpl.java | 77 + .../VirtualNetworkAddressImpl.java | 135 ++ .../VirtualNetworkAddressesClientImpl.java | 967 ++++++++ .../VirtualNetworkAddressesImpl.java | 164 ++ .../oracle/implementation/package-info.java | 9 + .../oracle/models/ActionType.java | 48 + .../oracle/models/ActivationLinks.java | 33 + .../oracle/models/AddRemoveDbNode.java | 62 + .../models/AllConnectionStringType.java | 113 + .../oracle/models/ApexDetailsType.java | 80 + .../oracle/models/AutonomousDatabase.java | 336 +++ .../models/AutonomousDatabaseBackup.java | 189 ++ ...utonomousDatabaseBackupLifecycleState.java | 69 + .../AutonomousDatabaseBackupListResult.java | 81 + .../AutonomousDatabaseBackupProperties.java | 277 +++ .../models/AutonomousDatabaseBackupType.java | 58 + .../AutonomousDatabaseBackupUpdate.java | 57 + ...onomousDatabaseBackupUpdateProperties.java | 54 + .../models/AutonomousDatabaseBackups.java | 148 ++ .../AutonomousDatabaseBaseProperties.java | 1569 +++++++++++++ .../AutonomousDatabaseCharacterSet.java | 55 + ...onomousDatabaseCharacterSetListResult.java | 81 + ...onomousDatabaseCharacterSetProperties.java | 43 + .../AutonomousDatabaseCharacterSets.java | 64 + .../AutonomousDatabaseCloneProperties.java | 551 +++++ .../AutonomousDatabaseLifecycleState.java | 149 ++ .../models/AutonomousDatabaseListResult.java | 81 + ...utonomousDatabaseNationalCharacterSet.java | 55 + ...atabaseNationalCharacterSetListResult.java | 82 + ...atabaseNationalCharacterSetProperties.java | 43 + ...tonomousDatabaseNationalCharacterSets.java | 65 + .../models/AutonomousDatabaseProperties.java | 357 +++ .../AutonomousDatabaseStandbySummary.java | 165 ++ .../models/AutonomousDatabaseUpdate.java | 86 + .../AutonomousDatabaseUpdateProperties.java | 635 ++++++ .../models/AutonomousDatabaseVersions.java | 62 + .../models/AutonomousDatabaseWalletFile.java | 26 + .../oracle/models/AutonomousDatabases.java | 243 +++ .../oracle/models/AutonomousDbVersion.java | 55 + .../models/AutonomousDbVersionListResult.java | 81 + .../models/AutonomousDbVersionProperties.java | 119 + .../AutonomousMaintenanceScheduleType.java | 53 + .../AzureResourceProvisioningState.java | 63 + .../oracle/models/CloneType.java | 53 + .../oracle/models/CloudAccountDetails.java | 33 + .../models/CloudAccountProvisioningState.java | 58 + .../models/CloudExadataInfrastructure.java | 319 +++ ...udExadataInfrastructureLifecycleState.java | 80 + .../CloudExadataInfrastructureListResult.java | 81 + .../CloudExadataInfrastructureProperties.java | 597 +++++ .../CloudExadataInfrastructureUpdate.java | 113 + ...ExadataInfrastructureUpdateProperties.java | 173 ++ .../models/CloudExadataInfrastructures.java | 188 ++ .../oracle/models/CloudVmCluster.java | 337 +++ .../models/CloudVmClusterLifecycleState.java | 78 + .../models/CloudVmClusterListResult.java | 80 + .../models/CloudVmClusterProperties.java | 1145 ++++++++++ .../oracle/models/CloudVmClusterUpdate.java | 86 + .../CloudVmClusterUpdateProperties.java | 326 +++ .../oracle/models/CloudVmClusters.java | 243 +++ .../oracle/models/ComputeModel.java | 53 + .../oracle/models/ConnectionStringType.java | 203 ++ .../oracle/models/ConnectionUrlType.java | 213 ++ .../oracle/models/ConsumerGroup.java | 68 + .../oracle/models/CustomerContact.java | 63 + .../oracle/models/DataBaseType.java | 53 + .../oracle/models/DataCollectionOptions.java | 112 + .../oracle/models/DataSafeStatusType.java | 68 + .../oracle/models/DatabaseEditionType.java | 53 + .../oracle/models/DayOfWeek.java | 61 + .../oracle/models/DayOfWeekName.java | 78 + .../oracle/models/DayOfWeekUpdate.java | 54 + .../oracle/models/DbIormConfig.java | 108 + .../resourcemanager/oracle/models/DbNode.java | 55 + .../oracle/models/DbNodeAction.java | 61 + .../oracle/models/DbNodeActionEnum.java | 63 + .../oracle/models/DbNodeListResult.java | 80 + .../oracle/models/DbNodeMaintenanceType.java | 48 + .../oracle/models/DbNodeProperties.java | 375 ++++ .../models/DbNodeProvisioningState.java | 88 + .../oracle/models/DbNodes.java | 97 + .../oracle/models/DbServer.java | 55 + .../oracle/models/DbServerListResult.java | 80 + .../models/DbServerPatchingDetails.java | 89 + .../oracle/models/DbServerPatchingStatus.java | 63 + .../oracle/models/DbServerProperties.java | 336 +++ .../models/DbServerProvisioningState.java | 73 + .../oracle/models/DbServers.java | 69 + .../oracle/models/DbSystemShape.java | 55 + .../models/DbSystemShapeListResult.java | 80 + .../models/DbSystemShapeProperties.java | 340 +++ .../oracle/models/DbSystemShapes.java | 62 + .../oracle/models/DisasterRecoveryType.java | 53 + .../oracle/models/DiskRedundancy.java | 53 + .../oracle/models/DnsPrivateView.java | 55 + .../models/DnsPrivateViewListResult.java | 80 + .../models/DnsPrivateViewProperties.java | 150 ++ .../oracle/models/DnsPrivateViews.java | 62 + .../models/DnsPrivateViewsLifecycleState.java | 63 + .../oracle/models/DnsPrivateZone.java | 55 + .../models/DnsPrivateZoneListResult.java | 80 + .../models/DnsPrivateZoneProperties.java | 183 ++ .../oracle/models/DnsPrivateZones.java | 62 + .../models/DnsPrivateZonesLifecycleState.java | 68 + .../oracle/models/EstimatedPatchingTime.java | 93 + .../oracle/models/ExadataIormConfig.java | 136 ++ ...nerateAutonomousDatabaseWalletDetails.java | 116 + .../oracle/models/GenerateType.java | 53 + .../oracle/models/GiVersion.java | 55 + .../oracle/models/GiVersionListResult.java | 80 + .../oracle/models/GiVersionProperties.java | 43 + .../oracle/models/GiVersions.java | 62 + .../oracle/models/HostFormatType.java | 53 + .../resourcemanager/oracle/models/Intent.java | 53 + .../oracle/models/IormLifecycleState.java | 68 + .../oracle/models/LicenseModel.java | 53 + .../oracle/models/MaintenanceWindow.java | 319 +++ .../resourcemanager/oracle/models/Month.java | 60 + .../oracle/models/MonthName.java | 103 + .../oracle/models/NsgCidr.java | 94 + .../oracle/models/Objective.java | 68 + .../oracle/models/OpenModeType.java | 53 + .../oracle/models/Operation.java | 58 + .../oracle/models/OperationDisplay.java | 92 + .../oracle/models/OperationListResult.java | 64 + .../oracle/models/Operations.java | 35 + .../models/OperationsInsightsStatusType.java | 73 + .../oracle/models/OracleSubscription.java | 62 + .../models/OracleSubscriptionListResult.java | 81 + .../models/OracleSubscriptionProperties.java | 166 ++ .../OracleSubscriptionProvisioningState.java | 59 + .../models/OracleSubscriptionUpdate.java | 86 + .../OracleSubscriptionUpdateProperties.java | 80 + .../oracle/models/OracleSubscriptions.java | 179 ++ .../resourcemanager/oracle/models/Origin.java | 59 + .../oracle/models/PatchingMode.java | 53 + .../oracle/models/PeerDbDetails.java | 56 + .../oracle/models/PermissionLevelType.java | 53 + .../resourcemanager/oracle/models/Plan.java | 175 ++ .../oracle/models/PortRange.java | 82 + .../oracle/models/Preference.java | 53 + .../models/PrivateIpAddressProperties.java | 54 + .../models/PrivateIpAddressesFilter.java | 93 + .../oracle/models/ProfileType.java | 296 +++ .../oracle/models/ProtocolType.java | 53 + .../oracle/models/RefreshableModelType.java | 53 + .../oracle/models/RefreshableStatusType.java | 53 + .../oracle/models/ResourcePlanTypeUpdate.java | 162 ++ .../models/ResourceProvisioningState.java | 58 + .../oracle/models/RoleType.java | 68 + .../models/SaasSubscriptionDetails.java | 104 + .../models/ScheduledOperationsType.java | 116 + .../models/ScheduledOperationsTypeUpdate.java | 109 + .../oracle/models/SessionModeType.java | 53 + .../oracle/models/SourceType.java | 78 + .../oracle/models/SyntaxFormatType.java | 58 + .../oracle/models/TlsAuthenticationType.java | 53 + .../oracle/models/VirtualNetworkAddress.java | 177 ++ .../VirtualNetworkAddressLifecycleState.java | 69 + .../VirtualNetworkAddressListResult.java | 81 + .../VirtualNetworkAddressProperties.java | 173 ++ .../models/VirtualNetworkAddresses.java | 145 ++ .../oracle/models/WorkloadType.java | 63 + .../oracle/models/ZoneType.java | 53 + .../oracle/models/package-info.java | 9 + .../resourcemanager/oracle/package-info.java | 9 + .../src/main/java/module-info.java | 13 + .../proxy-config.json | 1 + .../reflect-config.json | 716 ++++++ ...sDatabaseBackupsCreateOrUpdateSamples.java | 29 + ...utonomousDatabaseBackupsDeleteSamples.java | 23 + .../AutonomousDatabaseBackupsGetSamples.java | 23 + ...ackupsListByAutonomousDatabaseSamples.java | 24 + ...utonomousDatabaseBackupsUpdateSamples.java | 27 + ...nomousDatabaseCharacterSetsGetSamples.java | 23 + ...aseCharacterSetsListByLocationSamples.java | 22 + ...tabaseNationalCharacterSetsGetSamples.java | 23 + ...nalCharacterSetsListByLocationSamples.java | 23 + .../AutonomousDatabaseVersionsGetSamples.java | 22 + ...DatabaseVersionsListByLocationSamples.java | 22 + ...onomousDatabasesCreateOrUpdateSamples.java | 89 + .../AutonomousDatabasesDeleteSamples.java | 22 + .../AutonomousDatabasesFailoverSamples.java | 27 + ...onomousDatabasesGenerateWalletSamples.java | 31 + ...ousDatabasesGetByResourceGroupSamples.java | 23 + ...usDatabasesListByResourceGroupSamples.java | 22 + .../AutonomousDatabasesListSamples.java | 22 + .../AutonomousDatabasesSwitchoverSamples.java | 27 + .../AutonomousDatabasesUpdateSamples.java | 27 + ...rastructuresAddStorageCapacitySamples.java | 22 + ...aInfrastructuresCreateOrUpdateSamples.java | 49 + ...udExadataInfrastructuresDeleteSamples.java | 22 + ...rastructuresGetByResourceGroupSamples.java | 23 + ...astructuresListByResourceGroupSamples.java | 23 + ...loudExadataInfrastructuresListSamples.java | 22 + ...udExadataInfrastructuresUpdateSamples.java | 27 + .../CloudVmClustersAddVmsSamples.java | 28 + .../CloudVmClustersCreateOrUpdateSamples.java | 81 + .../CloudVmClustersDeleteSamples.java | 22 + ...udVmClustersGetByResourceGroupSamples.java | 22 + ...dVmClustersListByResourceGroupSamples.java | 22 + ...ClustersListPrivateIpAddressesSamples.java | 27 + .../generated/CloudVmClustersListSamples.java | 22 + .../CloudVmClustersRemoveVmsSamples.java | 27 + .../CloudVmClustersUpdateSamples.java | 27 + .../generated/DbNodesActionSamples.java | 27 + .../oracle/generated/DbNodesGetSamples.java | 22 + .../DbNodesListByCloudVmClusterSamples.java | 22 + .../oracle/generated/DbServersGetSamples.java | 22 + ...stByCloudExadataInfrastructureSamples.java | 22 + .../generated/DbSystemShapesGetSamples.java | 22 + .../DbSystemShapesListByLocationSamples.java | 22 + .../generated/DnsPrivateViewsGetSamples.java | 22 + .../DnsPrivateViewsListByLocationSamples.java | 22 + .../generated/DnsPrivateZonesGetSamples.java | 23 + .../DnsPrivateZonesListByLocationSamples.java | 22 + .../generated/GiVersionsGetSamples.java | 22 + .../GiVersionsListByLocationSamples.java | 22 + .../generated/OperationsListSamples.java | 22 + ...cleSubscriptionsCreateOrUpdateSamples.java | 33 + .../OracleSubscriptionsDeleteSamples.java | 22 + .../OracleSubscriptionsGetSamples.java | 22 + ...bscriptionsListActivationLinksSamples.java | 23 + ...iptionsListCloudAccountDetailsSamples.java | 23 + ...onsListSaasSubscriptionDetailsSamples.java | 23 + .../OracleSubscriptionsListSamples.java | 22 + .../OracleSubscriptionsUpdateSamples.java | 24 + ...NetworkAddressesCreateOrUpdateSamples.java | 29 + .../VirtualNetworkAddressesDeleteSamples.java | 22 + .../VirtualNetworkAddressesGetSamples.java | 23 + ...kAddressesListByCloudVmClusterSamples.java | 22 + sdk/oracle/ci.yml | 47 + sdk/oracle/pom.xml | 15 + 333 files changed, 47292 insertions(+), 3 deletions(-) create mode 100644 sdk/oracle/azure-resourcemanager-oracle/CHANGELOG.md create mode 100644 sdk/oracle/azure-resourcemanager-oracle/README.md create mode 100644 sdk/oracle/azure-resourcemanager-oracle/SAMPLE.md create mode 100644 sdk/oracle/azure-resourcemanager-oracle/pom.xml create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/OracleManager.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseBackupsClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseCharacterSetsClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseNationalCharacterSetsClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseVersionsClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabasesClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/CloudExadataInfrastructuresClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/CloudVmClustersClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbNodesClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbServersClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbSystemShapesClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DnsPrivateViewsClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DnsPrivateZonesClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/GiVersionsClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OperationsClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OracleDatabaseResourceManager.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OracleSubscriptionsClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/VirtualNetworkAddressesClient.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/ActivationLinksInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseBackupInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseCharacterSetInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseNationalCharacterSetInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseWalletFileInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDbVersionInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudAccountDetailsInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudExadataInfrastructureInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudVmClusterInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbNodeInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbServerInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbSystemShapeInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DnsPrivateViewInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DnsPrivateZoneInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/GiVersionInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/OperationInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/OracleSubscriptionInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/PrivateIpAddressPropertiesInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/SaasSubscriptionDetailsInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/VirtualNetworkAddressInner.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/package-info.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/package-info.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/ActivationLinksImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupsClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetsClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetsClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseVersionsClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseVersionsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseWalletFileImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabasesClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabasesImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDbVersionImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudAccountDetailsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructureImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructuresClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructuresImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClusterImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClustersClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClustersImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodeImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodesClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodesImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServerImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServersClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServersImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapeImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapesClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapesImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewsClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZoneImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZonesClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZonesImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionsClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationsClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleDatabaseResourceManagerBuilder.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleDatabaseResourceManagerImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionsClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/PrivateIpAddressPropertiesImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/ResourceManagerUtils.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/SaasSubscriptionDetailsImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressesClientImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressesImpl.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/package-info.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ActionType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ActivationLinks.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AddRemoveDbNode.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AllConnectionStringType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ApexDetailsType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabase.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackup.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupLifecycleState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupUpdate.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupUpdateProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackups.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBaseProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSet.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSetListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSetProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSets.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCloneProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseLifecycleState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSet.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSetListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSetProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSets.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseStandbySummary.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseUpdate.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseUpdateProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseVersions.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseWalletFile.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabases.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersion.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersionListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersionProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousMaintenanceScheduleType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AzureResourceProvisioningState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloneType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudAccountDetails.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudAccountProvisioningState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructure.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureLifecycleState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureUpdate.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureUpdateProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructures.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmCluster.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterLifecycleState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterUpdate.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterUpdateProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusters.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ComputeModel.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConnectionStringType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConnectionUrlType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConsumerGroup.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CustomerContact.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataBaseType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataCollectionOptions.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataSafeStatusType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DatabaseEditionType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeek.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeekName.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeekUpdate.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbIormConfig.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNode.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeAction.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeActionEnum.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeMaintenanceType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeProvisioningState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodes.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServer.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerPatchingDetails.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerPatchingStatus.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerProvisioningState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServers.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShape.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapeListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapeProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapes.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DisasterRecoveryType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DiskRedundancy.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateView.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViews.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewsLifecycleState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZone.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZoneListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZoneProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZones.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZonesLifecycleState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/EstimatedPatchingTime.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ExadataIormConfig.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GenerateAutonomousDatabaseWalletDetails.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GenerateType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersion.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersionListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersionProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersions.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/HostFormatType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Intent.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/IormLifecycleState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/LicenseModel.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/MaintenanceWindow.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Month.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/MonthName.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/NsgCidr.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Objective.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OpenModeType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Operation.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationDisplay.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Operations.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationsInsightsStatusType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscription.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionProvisioningState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionUpdate.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionUpdateProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptions.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Origin.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PatchingMode.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PeerDbDetails.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PermissionLevelType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Plan.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PortRange.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Preference.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PrivateIpAddressProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PrivateIpAddressesFilter.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ProfileType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ProtocolType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RefreshableModelType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RefreshableStatusType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ResourcePlanTypeUpdate.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ResourceProvisioningState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RoleType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SaasSubscriptionDetails.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ScheduledOperationsType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ScheduledOperationsTypeUpdate.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SessionModeType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SourceType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SyntaxFormatType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/TlsAuthenticationType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddress.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressLifecycleState.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressListResult.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressProperties.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddresses.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/WorkloadType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ZoneType.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/package-info.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/package-info.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/java/module-info.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracle/proxy-config.json create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracle/reflect-config.json create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsCreateOrUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsDeleteSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseCharacterSetsGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseCharacterSetsListByLocationSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseNationalCharacterSetsGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseNationalCharacterSetsListByLocationSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseVersionsGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseVersionsListByLocationSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesCreateOrUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesDeleteSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesFailoverSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesGenerateWalletSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesGetByResourceGroupSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesListByResourceGroupSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesListSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesSwitchoverSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresAddStorageCapacitySamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresCreateOrUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresDeleteSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresGetByResourceGroupSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresListByResourceGroupSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresListSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersAddVmsSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersCreateOrUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersDeleteSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersGetByResourceGroupSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListByResourceGroupSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListPrivateIpAddressesSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersRemoveVmsSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesActionSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesListByCloudVmClusterSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbServersGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbServersListByCloudExadataInfrastructureSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbSystemShapesGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbSystemShapesListByLocationSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateViewsGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateViewsListByLocationSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateZonesGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateZonesListByLocationSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/GiVersionsGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/GiVersionsListByLocationSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OperationsListSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsCreateOrUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsDeleteSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListActivationLinksSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListCloudAccountDetailsSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListSaasSubscriptionDetailsSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesCreateOrUpdateSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesDeleteSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesGetSamples.java create mode 100644 sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java create mode 100644 sdk/oracle/ci.yml create mode 100644 sdk/oracle/pom.xml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 02d09967aef0..30f60b8e9a6b 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -459,6 +459,7 @@ com.azure.resourcemanager:azure-resourcemanager-storageactions;1.0.0-beta.1;1.0. com.azure.resourcemanager:azure-resourcemanager-deviceregistry;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-standbypool;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-edgezones;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-oracle;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1 com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1 io.clientcore:clientcore-parent;1.0.0-beta.1;1.0.0-beta.1 diff --git a/pom.xml b/pom.xml index 5afc9c9ad847..8737903e15a2 100644 --- a/pom.xml +++ b/pom.xml @@ -40,6 +40,7 @@ sdk/botservice sdk/changeanalysis sdk/chaos + sdk/clientcore sdk/cognitiveservices sdk/commerce sdk/communication @@ -92,7 +93,6 @@ sdk/fluidrelay sdk/formrecognizer sdk/frontdoor - sdk/clientcore sdk/graphservices sdk/hanaonazure sdk/hardwaresecuritymodules @@ -147,6 +147,7 @@ sdk/oep sdk/openai sdk/operationsmanagement + sdk/oracle sdk/orbital sdk/paloaltonetworks sdk/parents diff --git a/sdk/clientcore/http-stress/pom.xml b/sdk/clientcore/http-stress/pom.xml index 5092f4964c0a..7637b6e3b6a2 100644 --- a/sdk/clientcore/http-stress/pom.xml +++ b/sdk/clientcore/http-stress/pom.xml @@ -55,7 +55,7 @@ com.azure azure-monitor-opentelemetry-exporter - 1.0.0-beta.21 + 1.0.0-beta.22 io.opentelemetry.instrumentation @@ -80,7 +80,7 @@ com.azure:perf-test-core:[1.0.0-beta.1] - com.azure:azure-monitor-opentelemetry-exporter:[1.0.0-beta.21] + com.azure:azure-monitor-opentelemetry-exporter:[1.0.0-beta.22] io.opentelemetry.instrumentation:opentelemetry-runtime-telemetry-java8:[2.2.0-alpha] io.opentelemetry.instrumentation:opentelemetry-logback-appender-1.0:[2.2.0-alpha] io.opentelemetry:opentelemetry-api:[1.36.0] diff --git a/sdk/oracle/azure-resourcemanager-oracle/CHANGELOG.md b/sdk/oracle/azure-resourcemanager-oracle/CHANGELOG.md new file mode 100644 index 000000000000..b60b4209e330 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2024-05-14) + +- Azure Resource Manager Oracle client library for Java. This package contains Microsoft Azure SDK for Oracle Management SDK. Package tag package-2023-09-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/oracle/azure-resourcemanager-oracle/README.md b/sdk/oracle/azure-resourcemanager-oracle/README.md new file mode 100644 index 000000000000..7687c79167e9 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/README.md @@ -0,0 +1,107 @@ +# Azure Resource Manager Oracle client library for Java + +Azure Resource Manager Oracle client library for Java. + +This package contains Microsoft Azure SDK for Oracle Management SDK. Package tag package-2023-09-01-preview. 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 + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-oracle;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-oracle + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. + +### Authentication + +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. + +With above configuration, `azure` client can be authenticated using the following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +OracleManager manager = OracleManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/oracle/azure-resourcemanager-oracle/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide][cg]. + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[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/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Foracle%2Fazure-resourcemanager-oracle%2FREADME.png) diff --git a/sdk/oracle/azure-resourcemanager-oracle/SAMPLE.md b/sdk/oracle/azure-resourcemanager-oracle/SAMPLE.md new file mode 100644 index 000000000000..c495e5fbad69 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/SAMPLE.md @@ -0,0 +1,1669 @@ +# Code snippets and samples + + +## AutonomousDatabaseBackups + +- [CreateOrUpdate](#autonomousdatabasebackups_createorupdate) +- [Delete](#autonomousdatabasebackups_delete) +- [Get](#autonomousdatabasebackups_get) +- [ListByAutonomousDatabase](#autonomousdatabasebackups_listbyautonomousdatabase) +- [Update](#autonomousdatabasebackups_update) + +## AutonomousDatabaseCharacterSets + +- [Get](#autonomousdatabasecharactersets_get) +- [ListByLocation](#autonomousdatabasecharactersets_listbylocation) + +## AutonomousDatabaseNationalCharacterSets + +- [Get](#autonomousdatabasenationalcharactersets_get) +- [ListByLocation](#autonomousdatabasenationalcharactersets_listbylocation) + +## AutonomousDatabaseVersions + +- [Get](#autonomousdatabaseversions_get) +- [ListByLocation](#autonomousdatabaseversions_listbylocation) + +## AutonomousDatabases + +- [CreateOrUpdate](#autonomousdatabases_createorupdate) +- [Delete](#autonomousdatabases_delete) +- [Failover](#autonomousdatabases_failover) +- [GenerateWallet](#autonomousdatabases_generatewallet) +- [GetByResourceGroup](#autonomousdatabases_getbyresourcegroup) +- [List](#autonomousdatabases_list) +- [ListByResourceGroup](#autonomousdatabases_listbyresourcegroup) +- [Switchover](#autonomousdatabases_switchover) +- [Update](#autonomousdatabases_update) + +## CloudExadataInfrastructures + +- [AddStorageCapacity](#cloudexadatainfrastructures_addstoragecapacity) +- [CreateOrUpdate](#cloudexadatainfrastructures_createorupdate) +- [Delete](#cloudexadatainfrastructures_delete) +- [GetByResourceGroup](#cloudexadatainfrastructures_getbyresourcegroup) +- [List](#cloudexadatainfrastructures_list) +- [ListByResourceGroup](#cloudexadatainfrastructures_listbyresourcegroup) +- [Update](#cloudexadatainfrastructures_update) + +## CloudVmClusters + +- [AddVms](#cloudvmclusters_addvms) +- [CreateOrUpdate](#cloudvmclusters_createorupdate) +- [Delete](#cloudvmclusters_delete) +- [GetByResourceGroup](#cloudvmclusters_getbyresourcegroup) +- [List](#cloudvmclusters_list) +- [ListByResourceGroup](#cloudvmclusters_listbyresourcegroup) +- [ListPrivateIpAddresses](#cloudvmclusters_listprivateipaddresses) +- [RemoveVms](#cloudvmclusters_removevms) +- [Update](#cloudvmclusters_update) + +## DbNodes + +- [Action](#dbnodes_action) +- [Get](#dbnodes_get) +- [ListByCloudVmCluster](#dbnodes_listbycloudvmcluster) + +## DbServers + +- [Get](#dbservers_get) +- [ListByCloudExadataInfrastructure](#dbservers_listbycloudexadatainfrastructure) + +## DbSystemShapes + +- [Get](#dbsystemshapes_get) +- [ListByLocation](#dbsystemshapes_listbylocation) + +## DnsPrivateViews + +- [Get](#dnsprivateviews_get) +- [ListByLocation](#dnsprivateviews_listbylocation) + +## DnsPrivateZones + +- [Get](#dnsprivatezones_get) +- [ListByLocation](#dnsprivatezones_listbylocation) + +## GiVersions + +- [Get](#giversions_get) +- [ListByLocation](#giversions_listbylocation) + +## Operations + +- [List](#operations_list) + +## OracleSubscriptions + +- [CreateOrUpdate](#oraclesubscriptions_createorupdate) +- [Delete](#oraclesubscriptions_delete) +- [Get](#oraclesubscriptions_get) +- [List](#oraclesubscriptions_list) +- [ListActivationLinks](#oraclesubscriptions_listactivationlinks) +- [ListCloudAccountDetails](#oraclesubscriptions_listcloudaccountdetails) +- [ListSaasSubscriptionDetails](#oraclesubscriptions_listsaassubscriptiondetails) +- [Update](#oraclesubscriptions_update) + +## VirtualNetworkAddresses + +- [CreateOrUpdate](#virtualnetworkaddresses_createorupdate) +- [Delete](#virtualnetworkaddresses_delete) +- [Get](#virtualnetworkaddresses_get) +- [ListByCloudVmCluster](#virtualnetworkaddresses_listbycloudvmcluster) +### AutonomousDatabaseBackups_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupProperties; + +/** + * Samples for AutonomousDatabaseBackups CreateOrUpdate. + */ +public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_create.json + */ + /** + * Sample code: Create Autonomous Database Backup. + * + * @param manager Entry point to OracleManager. + */ + public static void createAutonomousDatabaseBackup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseBackups() + .define("1711644130") + .withExistingAutonomousDatabase("rg000", "databasedb1") + .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("Nightly Backup") + .withRetentionPeriodInDays(365)) + .create(); + } +} +``` + +### AutonomousDatabaseBackups_Delete + +```java +/** + * Samples for AutonomousDatabaseBackups Delete. + */ +public final class AutonomousDatabaseBackupsDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_delete.json + */ + /** + * Sample code: Delete Autonomous Database Backup. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteAutonomousDatabaseBackup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseBackups() + .delete("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseBackups_Get + +```java +/** + * Samples for AutonomousDatabaseBackups Get. + */ +public final class AutonomousDatabaseBackupsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_get.json + */ + /** + * Sample code: Get Autonomous Database Backup. + * + * @param manager Entry point to OracleManager. + */ + public static void getAutonomousDatabaseBackup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseBackups() + .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseBackups_ListByAutonomousDatabase + +```java +/** + * Samples for AutonomousDatabaseBackups ListByAutonomousDatabase. + */ +public final class AutonomousDatabaseBackupsListByAutonomousDatabaseSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_listByParent.json + */ + /** + * Sample code: List Autonomous Database Backups by Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void + listAutonomousDatabaseBackupsByAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseBackups() + .listByAutonomousDatabase("rg000", "databasedb1", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseBackups_Update + +```java +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackup; + +/** + * Samples for AutonomousDatabaseBackups Update. + */ +public final class AutonomousDatabaseBackupsUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_patch.json + */ + /** + * Sample code: Patch Autonomous Database Backup. + * + * @param manager Entry point to OracleManager. + */ + public static void patchAutonomousDatabaseBackup(com.azure.resourcemanager.oracle.OracleManager manager) { + AutonomousDatabaseBackup resource = manager.autonomousDatabaseBackups() + .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### AutonomousDatabaseCharacterSets_Get + +```java +/** + * Samples for AutonomousDatabaseCharacterSets Get. + */ +public final class AutonomousDatabaseCharacterSetsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_get.json + */ + /** + * Sample code: Get autonomous db character set. + * + * @param manager Entry point to OracleManager. + */ + public static void getAutonomousDbCharacterSet(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseCharacterSets() + .getWithResponse("eastus", "DATABASE", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseCharacterSets_ListByLocation + +```java +/** + * Samples for AutonomousDatabaseCharacterSets ListByLocation. + */ +public final class AutonomousDatabaseCharacterSetsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_listByLocation.json + */ + /** + * Sample code: List autonomous db character sets by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listAutonomousDbCharacterSetsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseNationalCharacterSets_Get + +```java +/** + * Samples for AutonomousDatabaseNationalCharacterSets Get. + */ +public final class AutonomousDatabaseNationalCharacterSetsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_get.json + */ + /** + * Sample code: Get autonomous db national character set. + * + * @param manager Entry point to OracleManager. + */ + public static void getAutonomousDbNationalCharacterSet(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseNationalCharacterSets() + .getWithResponse("eastus", "NATIONAL", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseNationalCharacterSets_ListByLocation + +```java +/** + * Samples for AutonomousDatabaseNationalCharacterSets ListByLocation. + */ +public final class AutonomousDatabaseNationalCharacterSetsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json + */ + /** + * Sample code: List autonomous db national character sets by location. + * + * @param manager Entry point to OracleManager. + */ + public static void + listAutonomousDbNationalCharacterSetsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseNationalCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseVersions_Get + +```java +/** + * Samples for AutonomousDatabaseVersions Get. + */ +public final class AutonomousDatabaseVersionsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_get.json + */ + /** + * Sample code: Get an autonomous version. + * + * @param manager Entry point to OracleManager. + */ + public static void getAnAutonomousVersion(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseVersions().getWithResponse("eastus", "18.4.0.0", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabaseVersions_ListByLocation + +```java +/** + * Samples for AutonomousDatabaseVersions ListByLocation. + */ +public final class AutonomousDatabaseVersionsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_listByLocation.json + */ + /** + * Sample code: List an autonomous versions by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listAnAutonomousVersionsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCloneProperties; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseProperties; +import com.azure.resourcemanager.oracle.models.CloneType; +import com.azure.resourcemanager.oracle.models.ComputeModel; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AutonomousDatabases CreateOrUpdate. + */ +public final class AutonomousDatabasesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_create.json + */ + /** + * Sample code: Create Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void createAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new AutonomousDatabaseProperties().withAdminPassword("fakeTokenPlaceholder") + .withCharacterSet("AL32UTF8") + .withComputeCount(2.0F) + .withComputeModel(ComputeModel.ECPU) + .withDataStorageSizeInTbs(1) + .withDbVersion("18.4.0.0") + .withDisplayName("example_autonomous_databasedb1") + .withNcharacterSet("AL16UTF16") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1")) + .create(); + } + + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseClone_create.json + */ + /** + * Sample code: Create clone Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void createCloneAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new AutonomousDatabaseCloneProperties().withAdminPassword("fakeTokenPlaceholder") + .withCharacterSet("AL32UTF8") + .withComputeCount(2.0F) + .withComputeModel(ComputeModel.ECPU) + .withDataStorageSizeInTbs(1) + .withDisplayName("example_autonomous_databasedb1_clone") + .withNcharacterSet("AL16UTF16") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withSourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1") + .withCloneType(CloneType.FULL)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### AutonomousDatabases_Delete + +```java +/** + * Samples for AutonomousDatabases Delete. + */ +public final class AutonomousDatabasesDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_delete.json + */ + /** + * Sample code: Delete Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases().delete("rg000", "databasedb1", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_Failover + +```java +import com.azure.resourcemanager.oracle.models.PeerDbDetails; + +/** + * Samples for AutonomousDatabases Failover. + */ +public final class AutonomousDatabasesFailoverSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_failover.json + */ + /** + * Sample code: Perform failover action on Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void + performFailoverActionOnAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), + com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_GenerateWallet + +```java +import com.azure.resourcemanager.oracle.models.GenerateAutonomousDatabaseWalletDetails; +import com.azure.resourcemanager.oracle.models.GenerateType; + +/** + * Samples for AutonomousDatabases GenerateWallet. + */ +public final class AutonomousDatabasesGenerateWalletSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_generateWallet.json + */ + /** + * Sample code: Generate wallet action on Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void + generateWalletActionOnAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .generateWalletWithResponse("rg000", "databasedb1", + new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) + .withIsRegional(false) + .withPassword("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_GetByResourceGroup + +```java +/** + * Samples for AutonomousDatabases GetByResourceGroup. + */ +public final class AutonomousDatabasesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_get.json + */ + /** + * Sample code: Get Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void getAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_List + +```java +/** + * Samples for AutonomousDatabases List. + */ +public final class AutonomousDatabasesListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listBySubscription.json + */ + /** + * Sample code: List Autonomous Database by subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void listAutonomousDatabaseBySubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases().list(com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_ListByResourceGroup + +```java +/** + * Samples for AutonomousDatabases ListByResourceGroup. + */ +public final class AutonomousDatabasesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listByResourceGroup.json + */ + /** + * Sample code: List Autonomous Database by resource group. + * + * @param manager Entry point to OracleManager. + */ + public static void listAutonomousDatabaseByResourceGroup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_Switchover + +```java +import com.azure.resourcemanager.oracle.models.PeerDbDetails; + +/** + * Samples for AutonomousDatabases Switchover. + */ +public final class AutonomousDatabasesSwitchoverSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_switchover.json + */ + /** + * Sample code: Perform switchover action on Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void + performSwitchoverActionOnAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .switchover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), + com.azure.core.util.Context.NONE); + } +} +``` + +### AutonomousDatabases_Update + +```java +import com.azure.resourcemanager.oracle.models.AutonomousDatabase; + +/** + * Samples for AutonomousDatabases Update. + */ +public final class AutonomousDatabasesUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_patch.json + */ + /** + * Sample code: Patch Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void patchAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + AutonomousDatabase resource = manager.autonomousDatabases() + .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### CloudExadataInfrastructures_AddStorageCapacity + +```java +/** + * Samples for CloudExadataInfrastructures AddStorageCapacity. + */ +public final class CloudExadataInfrastructuresAddStorageCapacitySamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_addStorageCapacity.json + */ + /** + * Sample code: Perform add storage capacity on exadata infra. + * + * @param manager Entry point to OracleManager. + */ + public static void performAddStorageCapacityOnExadataInfra(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures().addStorageCapacity("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CloudExadataInfrastructures CreateOrUpdate. + */ +public final class CloudExadataInfrastructuresCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_create.json + */ + /** + * Sample code: Create Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void createExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures() + .define("infra1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withZones(Arrays.asList("1")) + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new CloudExadataInfrastructureProperties().withComputeCount(100) + .withStorageCount(10) + .withShape("EXADATA.X9M") + .withDisplayName("infra 1")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### CloudExadataInfrastructures_Delete + +```java +/** + * Samples for CloudExadataInfrastructures Delete. + */ +public final class CloudExadataInfrastructuresDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_delete.json + */ + /** + * Sample code: Delete Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures().delete("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_GetByResourceGroup + +```java +/** + * Samples for CloudExadataInfrastructures GetByResourceGroup. + */ +public final class CloudExadataInfrastructuresGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_get.json + */ + /** + * Sample code: Get Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void getExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_List + +```java +/** + * Samples for CloudExadataInfrastructures List. + */ +public final class CloudExadataInfrastructuresListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listBySubscription.json + */ + /** + * Sample code: List Exadata Infrastructure by subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void listExadataInfrastructureBySubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures().list(com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_ListByResourceGroup + +```java +/** + * Samples for CloudExadataInfrastructures ListByResourceGroup. + */ +public final class CloudExadataInfrastructuresListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listByResourceGroup.json + */ + /** + * Sample code: List Exadata Infrastructure by resource group. + * + * @param manager Entry point to OracleManager. + */ + public static void + listExadataInfrastructureByResourceGroup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudExadataInfrastructures_Update + +```java +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructure; + +/** + * Samples for CloudExadataInfrastructures Update. + */ +public final class CloudExadataInfrastructuresUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_patch.json + */ + /** + * Sample code: Patch Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void patchExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + CloudExadataInfrastructure resource = manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### CloudVmClusters_AddVms + +```java +import com.azure.resourcemanager.oracle.models.AddRemoveDbNode; +import java.util.Arrays; + +/** + * Samples for CloudVmClusters AddVms. + */ +public final class CloudVmClustersAddVmsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_addVms.json + */ + /** + * Sample code: Add VMs to VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void addVMsToVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters() + .addVms("rg000", "cluster1", + new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracle.models.CloudVmClusterProperties; +import com.azure.resourcemanager.oracle.models.DataCollectionOptions; +import com.azure.resourcemanager.oracle.models.LicenseModel; +import com.azure.resourcemanager.oracle.models.NsgCidr; +import com.azure.resourcemanager.oracle.models.PortRange; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CloudVmClusters CreateOrUpdate. + */ +public final class CloudVmClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_create.json + */ + /** + * Sample code: Create VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void createVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters() + .define("cluster1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new CloudVmClusterProperties().withDataStorageSizeInTbs(1000.0D) + .withDbNodeStorageSizeInGbs(1000) + .withMemorySizeInGbs(1000) + .withTimeZone("UTC") + .withHostname("hostname1") + .withDomain("domain1") + .withCpuCoreCount(2) + .withOcpuCount(3.0F) + .withClusterName("cluster1") + .withDataStoragePercentage(100) + .withIsLocalBackupEnabled(false) + .withCloudExadataInfrastructureId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/cloudExadataInfrastructures/infra1") + .withIsSparseDiskgroupEnabled(false) + .withSshPublicKeys(Arrays.asList("ssh-key 1")) + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withScanListenerPortTcp(1050) + .withScanListenerPortTcpSsl(1025) + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withGiVersion("19.0.0.0") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withBackupSubnetCidr("172.17.5.0/24") + .withNsgCidrs(Arrays.asList( + new NsgCidr().withSource("10.0.0.0/16") + .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)), + new NsgCidr().withSource("10.10.0.0/24"))) + .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(false) + .withIsHealthMonitoringEnabled(false) + .withIsIncidentLogsEnabled(false)) + .withDisplayName("cluster 1") + .withDbServers(Arrays.asList("ocid1..aaaa"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### CloudVmClusters_Delete + +```java +/** + * Samples for CloudVmClusters Delete. + */ +public final class CloudVmClustersDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_delete.json + */ + /** + * Sample code: Delete VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters().delete("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_GetByResourceGroup + +```java +/** + * Samples for CloudVmClusters GetByResourceGroup. + */ +public final class CloudVmClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_get.json + */ + /** + * Sample code: Get VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void getVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters().getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_List + +```java +/** + * Samples for CloudVmClusters List. + */ +public final class CloudVmClustersListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listBySubscription.json + */ + /** + * Sample code: List VM Clusters by subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void listVMClustersBySubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters().list(com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_ListByResourceGroup + +```java +/** + * Samples for CloudVmClusters ListByResourceGroup. + */ +public final class CloudVmClustersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listByResourceGroup.json + */ + /** + * Sample code: List VM Clusters by resource group. + * + * @param manager Entry point to OracleManager. + */ + public static void listVMClustersByResourceGroup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_ListPrivateIpAddresses + +```java +import com.azure.resourcemanager.oracle.models.PrivateIpAddressesFilter; + +/** + * Samples for CloudVmClusters ListPrivateIpAddresses. + */ +public final class CloudVmClustersListPrivateIpAddressesSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listPrivateIpAddresses.json + */ + /** + * Sample code: List Private IP Addresses for VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void listPrivateIPAddressesForVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters() + .listPrivateIpAddressesWithResponse("rg000", "cluster1", + new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_RemoveVms + +```java +import com.azure.resourcemanager.oracle.models.AddRemoveDbNode; +import java.util.Arrays; + +/** + * Samples for CloudVmClusters RemoveVms. + */ +public final class CloudVmClustersRemoveVmsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_removeVms.json + */ + /** + * Sample code: Remove VMs from VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void removeVMsFromVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters() + .removeVms("rg000", "cluster1", new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa")), + com.azure.core.util.Context.NONE); + } +} +``` + +### CloudVmClusters_Update + +```java +import com.azure.resourcemanager.oracle.models.CloudVmCluster; + +/** + * Samples for CloudVmClusters Update. + */ +public final class CloudVmClustersUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_patch.json + */ + /** + * Sample code: Patch VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void patchVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + CloudVmCluster resource = manager.cloudVmClusters() + .getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### DbNodes_Action + +```java +import com.azure.resourcemanager.oracle.models.DbNodeAction; +import com.azure.resourcemanager.oracle.models.DbNodeActionEnum; + +/** + * Samples for DbNodes Action. + */ +public final class DbNodesActionSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_action.json + */ + /** + * Sample code: VM actions on DbNodes of VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void vmActionsOnDbNodesOfVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbNodes() + .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), + com.azure.core.util.Context.NONE); + } +} +``` + +### DbNodes_Get + +```java +/** + * Samples for DbNodes Get. + */ +public final class DbNodesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_get.json + */ + /** + * Sample code: Get DbNode. + * + * @param manager Entry point to OracleManager. + */ + public static void getDbNode(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbNodes().getWithResponse("rg000", "cluster1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } +} +``` + +### DbNodes_ListByCloudVmCluster + +```java +/** + * Samples for DbNodes ListByCloudVmCluster. + */ +public final class DbNodesListByCloudVmClusterSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_listByParent.json + */ + /** + * Sample code: List DbNodes by VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void listDbNodesByVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbNodes().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} +``` + +### DbServers_Get + +```java +/** + * Samples for DbServers Get. + */ +public final class DbServersGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbServers_get.json + */ + /** + * Sample code: Get DbServer by parent. + * + * @param manager Entry point to OracleManager. + */ + public static void getDbServerByParent(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbServers().getWithResponse("rg000", "infra1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } +} +``` + +### DbServers_ListByCloudExadataInfrastructure + +```java +/** + * Samples for DbServers ListByCloudExadataInfrastructure. + */ +public final class DbServersListByCloudExadataInfrastructureSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbServers_listByParent.json + */ + /** + * Sample code: List DbServers by Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void listDbServersByExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystemShapes_Get + +```java +/** + * Samples for DbSystemShapes Get. + */ +public final class DbSystemShapesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbSystemShapes_get.json + */ + /** + * Sample code: Get a DbSystemShape by name. + * + * @param manager Entry point to OracleManager. + */ + public static void getADbSystemShapeByName(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbSystemShapes().getWithResponse("eastus", "EXADATA.X9M", com.azure.core.util.Context.NONE); + } +} +``` + +### DbSystemShapes_ListByLocation + +```java +/** + * Samples for DbSystemShapes ListByLocation. + */ +public final class DbSystemShapesListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbSystemShapes_listByLocation.json + */ + /** + * Sample code: List DbSystemShapes by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listDbSystemShapesByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbSystemShapes().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### DnsPrivateViews_Get + +```java +/** + * Samples for DnsPrivateViews Get. + */ +public final class DnsPrivateViewsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateViews_get.json + */ + /** + * Sample code: Get a DnsPrivateView by name. + * + * @param manager Entry point to OracleManager. + */ + public static void getADnsPrivateViewByName(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dnsPrivateViews().getWithResponse("eastus", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } +} +``` + +### DnsPrivateViews_ListByLocation + +```java +/** + * Samples for DnsPrivateViews ListByLocation. + */ +public final class DnsPrivateViewsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateViews_listByLocation.json + */ + /** + * Sample code: List DnsPrivateViews by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listDnsPrivateViewsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dnsPrivateViews().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### DnsPrivateZones_Get + +```java +/** + * Samples for DnsPrivateZones Get. + */ +public final class DnsPrivateZonesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateZones_get.json + */ + /** + * Sample code: Get a DnsPrivateZone by name. + * + * @param manager Entry point to OracleManager. + */ + public static void getADnsPrivateZoneByName(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dnsPrivateZones() + .getWithResponse("eastus", "example-dns-private-zone", com.azure.core.util.Context.NONE); + } +} +``` + +### DnsPrivateZones_ListByLocation + +```java +/** + * Samples for DnsPrivateZones ListByLocation. + */ +public final class DnsPrivateZonesListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateZones_listByLocation.json + */ + /** + * Sample code: List DnsPrivateZones by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listDnsPrivateZonesByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dnsPrivateZones().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### GiVersions_Get + +```java +/** + * Samples for GiVersions Get. + */ +public final class GiVersionsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/giVersions_get.json + */ + /** + * Sample code: Get a GiVersion by name. + * + * @param manager Entry point to OracleManager. + */ + public static void getAGiVersionByName(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.giVersions().getWithResponse("eastus", "19.0.0.0", com.azure.core.util.Context.NONE); + } +} +``` + +### GiVersions_ListByLocation + +```java +/** + * Samples for GiVersions ListByLocation. + */ +public final class GiVersionsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/giVersions_listByLocation.json + */ + /** + * Sample code: List GiVersions by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listGiVersionsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.giVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} +``` + +### Operations_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/operations_list.json + */ + /** + * Sample code: List Operations. + * + * @param manager Entry point to OracleManager. + */ + public static void listOperations(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### OracleSubscriptions_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; +import com.azure.resourcemanager.oracle.models.OracleSubscriptionProperties; +import com.azure.resourcemanager.oracle.models.Plan; + +/** + * Samples for OracleSubscriptions CreateOrUpdate. + */ +public final class OracleSubscriptionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_create.json + */ + /** + * Sample code: Create or Update Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void createOrUpdateOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions() + .createOrUpdate(new OracleSubscriptionInner().withProperties(new OracleSubscriptionProperties()) + .withPlan(new Plan().withName("plan1") + .withPublisher("publisher1") + .withProduct("product1") + .withPromotionCode("fakeTokenPlaceholder") + .withVersion("alpha")), + com.azure.core.util.Context.NONE); + } +} +``` + +### OracleSubscriptions_Delete + +```java +/** + * Samples for OracleSubscriptions Delete. + */ +public final class OracleSubscriptionsDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_delete.json + */ + /** + * Sample code: Delete Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().delete(com.azure.core.util.Context.NONE); + } +} +``` + +### OracleSubscriptions_Get + +```java +/** + * Samples for OracleSubscriptions Get. + */ +public final class OracleSubscriptionsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_get.json + */ + /** + * Sample code: Get Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void getOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().getWithResponse(com.azure.core.util.Context.NONE); + } +} +``` + +### OracleSubscriptions_List + +```java +/** + * Samples for OracleSubscriptions List. + */ +public final class OracleSubscriptionsListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listBySubscription.json + */ + /** + * Sample code: List Oracle Subscriptions by subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void listOracleSubscriptionsBySubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().list(com.azure.core.util.Context.NONE); + } +} +``` + +### OracleSubscriptions_ListActivationLinks + +```java +/** + * Samples for OracleSubscriptions ListActivationLinks. + */ +public final class OracleSubscriptionsListActivationLinksSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listActivationLinks.json + */ + /** + * Sample code: List Activation Links for the Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void + listActivationLinksForTheOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); + } +} +``` + +### OracleSubscriptions_ListCloudAccountDetails + +```java +/** + * Samples for OracleSubscriptions ListCloudAccountDetails. + */ +public final class OracleSubscriptionsListCloudAccountDetailsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listCloudAccountDetails.json + */ + /** + * Sample code: List Cloud Account details for the Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void + listCloudAccountDetailsForTheOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); + } +} +``` + +### OracleSubscriptions_ListSaasSubscriptionDetails + +```java +/** + * Samples for OracleSubscriptions ListSaasSubscriptionDetails. + */ +public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listSaasSubscriptionDetails.json + */ + /** + * Sample code: List Saas Subscription details for the Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void + listSaasSubscriptionDetailsForTheOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); + } +} +``` + +### OracleSubscriptions_Update + +```java +import com.azure.resourcemanager.oracle.models.OracleSubscriptionUpdate; + +/** + * Samples for OracleSubscriptions Update. + */ +public final class OracleSubscriptionsUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_patch.json + */ + /** + * Sample code: Patch Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void patchOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworkAddresses_CreateOrUpdate + +```java +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddressProperties; + +/** + * Samples for VirtualNetworkAddresses CreateOrUpdate. + */ +public final class VirtualNetworkAddressesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_create.json + */ + /** + * Sample code: Create Virtual Network Address. + * + * @param manager Entry point to OracleManager. + */ + public static void createVirtualNetworkAddress(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.virtualNetworkAddresses() + .define("hostname1") + .withExistingCloudVmCluster("rg000", "cluster1") + .withProperties( + new VirtualNetworkAddressProperties().withIpAddress("192.168.0.1").withVmOcid("ocid1..aaaa")) + .create(); + } +} +``` + +### VirtualNetworkAddresses_Delete + +```java +/** + * Samples for VirtualNetworkAddresses Delete. + */ +public final class VirtualNetworkAddressesDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_delete.json + */ + /** + * Sample code: Delete Virtual Network Address. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteVirtualNetworkAddress(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.virtualNetworkAddresses().delete("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworkAddresses_Get + +```java +/** + * Samples for VirtualNetworkAddresses Get. + */ +public final class VirtualNetworkAddressesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_get.json + */ + /** + * Sample code: Get Virtual Network Address. + * + * @param manager Entry point to OracleManager. + */ + public static void getVirtualNetworkAddress(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.virtualNetworkAddresses() + .getWithResponse("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); + } +} +``` + +### VirtualNetworkAddresses_ListByCloudVmCluster + +```java +/** + * Samples for VirtualNetworkAddresses ListByCloudVmCluster. + */ +public final class VirtualNetworkAddressesListByCloudVmClusterSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_listByParent.json + */ + /** + * Sample code: List Virtual Network Addresses by VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void listVirtualNetworkAddressesByVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.virtualNetworkAddresses().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/oracle/azure-resourcemanager-oracle/pom.xml b/sdk/oracle/azure-resourcemanager-oracle/pom.xml new file mode 100644 index 000000000000..33e60f10d601 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-oracle + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for Oracle Management + This package contains Microsoft Azure SDK for Oracle Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-09-01-preview. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + 0 + 0 + true + + + + com.azure + azure-core + 1.49.0 + + + com.azure + azure-core-management + 1.14.0 + + + diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/OracleManager.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/OracleManager.java new file mode 100644 index 000000000000..a9c376470f84 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/OracleManager.java @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.OracleDatabaseResourceManager; +import com.azure.resourcemanager.oracle.implementation.AutonomousDatabaseBackupsImpl; +import com.azure.resourcemanager.oracle.implementation.AutonomousDatabaseCharacterSetsImpl; +import com.azure.resourcemanager.oracle.implementation.AutonomousDatabaseNationalCharacterSetsImpl; +import com.azure.resourcemanager.oracle.implementation.AutonomousDatabasesImpl; +import com.azure.resourcemanager.oracle.implementation.AutonomousDatabaseVersionsImpl; +import com.azure.resourcemanager.oracle.implementation.CloudExadataInfrastructuresImpl; +import com.azure.resourcemanager.oracle.implementation.CloudVmClustersImpl; +import com.azure.resourcemanager.oracle.implementation.DbNodesImpl; +import com.azure.resourcemanager.oracle.implementation.DbServersImpl; +import com.azure.resourcemanager.oracle.implementation.DbSystemShapesImpl; +import com.azure.resourcemanager.oracle.implementation.DnsPrivateViewsImpl; +import com.azure.resourcemanager.oracle.implementation.DnsPrivateZonesImpl; +import com.azure.resourcemanager.oracle.implementation.GiVersionsImpl; +import com.azure.resourcemanager.oracle.implementation.OperationsImpl; +import com.azure.resourcemanager.oracle.implementation.OracleDatabaseResourceManagerBuilder; +import com.azure.resourcemanager.oracle.implementation.OracleSubscriptionsImpl; +import com.azure.resourcemanager.oracle.implementation.VirtualNetworkAddressesImpl; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackups; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSets; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSets; +import com.azure.resourcemanager.oracle.models.AutonomousDatabases; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseVersions; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructures; +import com.azure.resourcemanager.oracle.models.CloudVmClusters; +import com.azure.resourcemanager.oracle.models.DbNodes; +import com.azure.resourcemanager.oracle.models.DbServers; +import com.azure.resourcemanager.oracle.models.DbSystemShapes; +import com.azure.resourcemanager.oracle.models.DnsPrivateViews; +import com.azure.resourcemanager.oracle.models.DnsPrivateZones; +import com.azure.resourcemanager.oracle.models.GiVersions; +import com.azure.resourcemanager.oracle.models.Operations; +import com.azure.resourcemanager.oracle.models.OracleSubscriptions; +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddresses; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Entry point to OracleManager. + */ +public final class OracleManager { + private Operations operations; + + private AutonomousDatabases autonomousDatabases; + + private CloudExadataInfrastructures cloudExadataInfrastructures; + + private CloudVmClusters cloudVmClusters; + + private AutonomousDatabaseCharacterSets autonomousDatabaseCharacterSets; + + private AutonomousDatabaseNationalCharacterSets autonomousDatabaseNationalCharacterSets; + + private AutonomousDatabaseVersions autonomousDatabaseVersions; + + private DbSystemShapes dbSystemShapes; + + private DnsPrivateViews dnsPrivateViews; + + private DnsPrivateZones dnsPrivateZones; + + private GiVersions giVersions; + + private OracleSubscriptions oracleSubscriptions; + + private AutonomousDatabaseBackups autonomousDatabaseBackups; + + private DbServers dbServers; + + private DbNodes dbNodes; + + private VirtualNetworkAddresses virtualNetworkAddresses; + + private final OracleDatabaseResourceManager clientObject; + + private OracleManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = new OracleDatabaseResourceManagerBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of Oracle service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the Oracle service API instance. + */ + public static OracleManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Creates an instance of Oracle service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the Oracle service API instance. + */ + public static OracleManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new OracleManager(httpPipeline, profile, null); + } + + /** + * Gets a Configurable instance that can be used to create OracleManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new OracleManager.Configurable(); + } + + /** + * The Configurable allowing configurations to be set. + */ + public static final class Configurable { + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private RetryOptions retryOptions; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the retry options for the HTTP pipeline retry policy. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of Oracle service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the Oracle service API instance. + */ + public OracleManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.oracle") + .append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); + policies.add(new RequestIdPolicy()); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new OracleManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of AutonomousDatabases. It manages AutonomousDatabase. + * + * @return Resource collection API of AutonomousDatabases. + */ + public AutonomousDatabases autonomousDatabases() { + if (this.autonomousDatabases == null) { + this.autonomousDatabases = new AutonomousDatabasesImpl(clientObject.getAutonomousDatabases(), this); + } + return autonomousDatabases; + } + + /** + * Gets the resource collection API of CloudExadataInfrastructures. It manages CloudExadataInfrastructure. + * + * @return Resource collection API of CloudExadataInfrastructures. + */ + public CloudExadataInfrastructures cloudExadataInfrastructures() { + if (this.cloudExadataInfrastructures == null) { + this.cloudExadataInfrastructures + = new CloudExadataInfrastructuresImpl(clientObject.getCloudExadataInfrastructures(), this); + } + return cloudExadataInfrastructures; + } + + /** + * Gets the resource collection API of CloudVmClusters. It manages CloudVmCluster. + * + * @return Resource collection API of CloudVmClusters. + */ + public CloudVmClusters cloudVmClusters() { + if (this.cloudVmClusters == null) { + this.cloudVmClusters = new CloudVmClustersImpl(clientObject.getCloudVmClusters(), this); + } + return cloudVmClusters; + } + + /** + * Gets the resource collection API of AutonomousDatabaseCharacterSets. + * + * @return Resource collection API of AutonomousDatabaseCharacterSets. + */ + public AutonomousDatabaseCharacterSets autonomousDatabaseCharacterSets() { + if (this.autonomousDatabaseCharacterSets == null) { + this.autonomousDatabaseCharacterSets + = new AutonomousDatabaseCharacterSetsImpl(clientObject.getAutonomousDatabaseCharacterSets(), this); + } + return autonomousDatabaseCharacterSets; + } + + /** + * Gets the resource collection API of AutonomousDatabaseNationalCharacterSets. + * + * @return Resource collection API of AutonomousDatabaseNationalCharacterSets. + */ + public AutonomousDatabaseNationalCharacterSets autonomousDatabaseNationalCharacterSets() { + if (this.autonomousDatabaseNationalCharacterSets == null) { + this.autonomousDatabaseNationalCharacterSets = new AutonomousDatabaseNationalCharacterSetsImpl( + clientObject.getAutonomousDatabaseNationalCharacterSets(), this); + } + return autonomousDatabaseNationalCharacterSets; + } + + /** + * Gets the resource collection API of AutonomousDatabaseVersions. + * + * @return Resource collection API of AutonomousDatabaseVersions. + */ + public AutonomousDatabaseVersions autonomousDatabaseVersions() { + if (this.autonomousDatabaseVersions == null) { + this.autonomousDatabaseVersions + = new AutonomousDatabaseVersionsImpl(clientObject.getAutonomousDatabaseVersions(), this); + } + return autonomousDatabaseVersions; + } + + /** + * Gets the resource collection API of DbSystemShapes. + * + * @return Resource collection API of DbSystemShapes. + */ + public DbSystemShapes dbSystemShapes() { + if (this.dbSystemShapes == null) { + this.dbSystemShapes = new DbSystemShapesImpl(clientObject.getDbSystemShapes(), this); + } + return dbSystemShapes; + } + + /** + * Gets the resource collection API of DnsPrivateViews. + * + * @return Resource collection API of DnsPrivateViews. + */ + public DnsPrivateViews dnsPrivateViews() { + if (this.dnsPrivateViews == null) { + this.dnsPrivateViews = new DnsPrivateViewsImpl(clientObject.getDnsPrivateViews(), this); + } + return dnsPrivateViews; + } + + /** + * Gets the resource collection API of DnsPrivateZones. + * + * @return Resource collection API of DnsPrivateZones. + */ + public DnsPrivateZones dnsPrivateZones() { + if (this.dnsPrivateZones == null) { + this.dnsPrivateZones = new DnsPrivateZonesImpl(clientObject.getDnsPrivateZones(), this); + } + return dnsPrivateZones; + } + + /** + * Gets the resource collection API of GiVersions. + * + * @return Resource collection API of GiVersions. + */ + public GiVersions giVersions() { + if (this.giVersions == null) { + this.giVersions = new GiVersionsImpl(clientObject.getGiVersions(), this); + } + return giVersions; + } + + /** + * Gets the resource collection API of OracleSubscriptions. + * + * @return Resource collection API of OracleSubscriptions. + */ + public OracleSubscriptions oracleSubscriptions() { + if (this.oracleSubscriptions == null) { + this.oracleSubscriptions = new OracleSubscriptionsImpl(clientObject.getOracleSubscriptions(), this); + } + return oracleSubscriptions; + } + + /** + * Gets the resource collection API of AutonomousDatabaseBackups. It manages AutonomousDatabaseBackup. + * + * @return Resource collection API of AutonomousDatabaseBackups. + */ + public AutonomousDatabaseBackups autonomousDatabaseBackups() { + if (this.autonomousDatabaseBackups == null) { + this.autonomousDatabaseBackups + = new AutonomousDatabaseBackupsImpl(clientObject.getAutonomousDatabaseBackups(), this); + } + return autonomousDatabaseBackups; + } + + /** + * Gets the resource collection API of DbServers. + * + * @return Resource collection API of DbServers. + */ + public DbServers dbServers() { + if (this.dbServers == null) { + this.dbServers = new DbServersImpl(clientObject.getDbServers(), this); + } + return dbServers; + } + + /** + * Gets the resource collection API of DbNodes. + * + * @return Resource collection API of DbNodes. + */ + public DbNodes dbNodes() { + if (this.dbNodes == null) { + this.dbNodes = new DbNodesImpl(clientObject.getDbNodes(), this); + } + return dbNodes; + } + + /** + * Gets the resource collection API of VirtualNetworkAddresses. It manages VirtualNetworkAddress. + * + * @return Resource collection API of VirtualNetworkAddresses. + */ + public VirtualNetworkAddresses virtualNetworkAddresses() { + if (this.virtualNetworkAddresses == null) { + this.virtualNetworkAddresses + = new VirtualNetworkAddressesImpl(clientObject.getVirtualNetworkAddresses(), this); + } + return virtualNetworkAddresses; + } + + /** + * Gets wrapped service client OracleDatabaseResourceManager providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. + * + * @return Wrapped service client OracleDatabaseResourceManager. + */ + public OracleDatabaseResourceManager serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseBackupsClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseBackupsClient.java new file mode 100644 index 000000000000..c94ef3b54731 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseBackupsClient.java @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.AutonomousDatabaseBackupInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupUpdate; + +/** + * An instance of this class provides access to all the operations defined in AutonomousDatabaseBackupsClient. + */ +public interface AutonomousDatabaseBackupsClient { + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename); + + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename, Context context); + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context); + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseBackupInner get(String resourceGroupName, String autonomousdatabasename, String adbbackupid); + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource); + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource, Context context); + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource); + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource, Context context); + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseBackupInner> beginUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupUpdate properties); + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseBackupInner> beginUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupUpdate properties, Context context); + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseBackupInner update(String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupUpdate properties); + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseBackupInner update(String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupUpdate properties, Context context); + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + String adbbackupid); + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context); + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid); + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseCharacterSetsClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseCharacterSetsClient.java new file mode 100644 index 000000000000..f76fc9c5055e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseCharacterSetsClient.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.oracle.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.oracle.fluent.models.AutonomousDatabaseCharacterSetInner; + +/** + * An instance of this class provides access to all the operations defined in AutonomousDatabaseCharacterSetsClient. + */ +public interface AutonomousDatabaseCharacterSetsClient { + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @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 AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); + + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String adbscharsetname, + Context context); + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseCharacterSetInner get(String location, String adbscharsetname); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseNationalCharacterSetsClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseNationalCharacterSetsClient.java new file mode 100644 index 000000000000..f3c034d0d577 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseNationalCharacterSetsClient.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.AutonomousDatabaseNationalCharacterSetInner; + +/** + * An instance of this class provides access to all the operations defined in + * AutonomousDatabaseNationalCharacterSetsClient. + */ +public interface AutonomousDatabaseNationalCharacterSetsClient { + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @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 AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); + + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String adbsncharsetname, + Context context); + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseNationalCharacterSetInner get(String location, String adbsncharsetname); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseVersionsClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseVersionsClient.java new file mode 100644 index 000000000000..e7d478fbcb48 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabaseVersionsClient.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.AutonomousDbVersionInner; + +/** + * An instance of this class provides access to all the operations defined in AutonomousDatabaseVersionsClient. + */ +public interface AutonomousDatabaseVersionsClient { + /** + * List AutonomousDbVersion resources by Location. + * + * @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 AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); + + /** + * List AutonomousDbVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String autonomousdbversionsname, + Context context); + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDbVersionInner get(String location, String autonomousdbversionsname); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabasesClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabasesClient.java new file mode 100644 index 000000000000..a217d09d2773 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/AutonomousDatabasesClient.java @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.AutonomousDatabaseInner; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseWalletFileInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseUpdate; +import com.azure.resourcemanager.oracle.models.GenerateAutonomousDatabaseWalletDetails; +import com.azure.resourcemanager.oracle.models.PeerDbDetails; + +/** + * An instance of this class provides access to all the operations defined in AutonomousDatabasesClient. + */ +public interface AutonomousDatabasesClient { + /** + * List AutonomousDatabase 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 AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List AutonomousDatabase 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 AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String autonomousdatabasename, Context context); + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseInner getByResourceGroup(String resourceGroupName, String autonomousdatabasename); + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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> + beginCreateOrUpdate(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource); + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource, Context context); + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 createOrUpdate(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource); + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 createOrUpdate(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource, Context context); + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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> beginUpdate(String resourceGroupName, + String autonomousdatabasename, AutonomousDatabaseUpdate properties); + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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> beginUpdate(String resourceGroupName, + String autonomousdatabasename, AutonomousDatabaseUpdate properties, Context context); + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 update(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties); + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 update(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties, Context context); + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename); + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + Context context); + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 autonomousdatabasename); + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String autonomousdatabasename, Context context); + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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> beginFailover(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body); + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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> beginFailover(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body, Context context); + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context); + + /** + * Generate wallet action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database Wallet File resource model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateWalletWithResponse(String resourceGroupName, + String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body, Context context); + + /** + * Generate wallet action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database Wallet File resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseWalletFileInner generateWallet(String resourceGroupName, String autonomousdatabasename, + GenerateAutonomousDatabaseWalletDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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> beginSwitchover(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AutonomousDatabaseInner> beginSwitchover(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body, Context context); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/CloudExadataInfrastructuresClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/CloudExadataInfrastructuresClient.java new file mode 100644 index 000000000000..eacbd7960ecd --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/CloudExadataInfrastructuresClient.java @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.CloudExadataInfrastructureInner; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureUpdate; + +/** + * An instance of this class provides access to all the operations defined in CloudExadataInfrastructuresClient. + */ +public interface CloudExadataInfrastructuresClient { + /** + * List CloudExadataInfrastructure 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 CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List CloudExadataInfrastructure 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 CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, Context context); + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudExadataInfrastructureInner getByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @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 cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudExadataInfrastructureInner> beginCreateOrUpdate( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource); + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudExadataInfrastructureInner> beginCreateOrUpdate( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, + Context context); + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @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 cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureInner resource); + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureInner resource, Context context); + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudExadataInfrastructureInner> beginUpdate( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties); + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudExadataInfrastructureInner> beginUpdate( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, + Context context); + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudExadataInfrastructureInner update(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureUpdate properties); + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudExadataInfrastructureInner update(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureUpdate properties, Context context); + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String cloudexadatainfrastructurename); + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String cloudexadatainfrastructurename, + Context context); + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String cloudexadatainfrastructurename); + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context); + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudExadataInfrastructureInner> + beginAddStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename); + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudExadataInfrastructureInner> + beginAddStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename, Context context); + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename); + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename, + Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/CloudVmClustersClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/CloudVmClustersClient.java new file mode 100644 index 000000000000..41f632936781 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/CloudVmClustersClient.java @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.CloudVmClusterInner; +import com.azure.resourcemanager.oracle.fluent.models.PrivateIpAddressPropertiesInner; +import com.azure.resourcemanager.oracle.models.AddRemoveDbNode; +import com.azure.resourcemanager.oracle.models.CloudVmClusterUpdate; +import com.azure.resourcemanager.oracle.models.PrivateIpAddressesFilter; +import java.util.List; + +/** + * An instance of this class provides access to all the operations defined in CloudVmClustersClient. + */ +public interface CloudVmClustersClient { + /** + * List CloudVmCluster 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 CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List CloudVmCluster 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 CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, + Context context); + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner getByResourceGroup(String resourceGroupName, String cloudvmclustername); + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginCreateOrUpdate(String resourceGroupName, + String cloudvmclustername, CloudVmClusterInner resource); + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginCreateOrUpdate(String resourceGroupName, + String cloudvmclustername, CloudVmClusterInner resource, Context context); + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource); + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource, Context context); + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginUpdate(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties); + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginUpdate(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties, Context context); + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner update(String resourceGroupName, String cloudvmclustername, CloudVmClusterUpdate properties); + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner update(String resourceGroupName, String cloudvmclustername, CloudVmClusterUpdate properties, + Context context); + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 cloudvmclustername); + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, + Context context); + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 cloudvmclustername); + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String cloudvmclustername, Context context); + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body); + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context); + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context); + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> listPrivateIpAddressesWithResponse(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body, Context context); + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List listPrivateIpAddresses(String resourceGroupName, String cloudvmclustername, + PrivateIpAddressesFilter body); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbNodesClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbNodesClient.java new file mode 100644 index 000000000000..bdb2a5685c7a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbNodesClient.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.DbNodeInner; +import com.azure.resourcemanager.oracle.models.DbNodeAction; + +/** + * An instance of this class provides access to all the operations defined in DbNodesClient. + */ +public interface DbNodesClient { + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context); + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + Context context); + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DbNodeInner get(String resourceGroupName, String cloudvmclustername, String dbnodeocid); + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DbNodeInner> beginAction(String resourceGroupName, String cloudvmclustername, + String dbnodeocid, DbNodeAction body); + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DbNodeInner> beginAction(String resourceGroupName, String cloudvmclustername, + String dbnodeocid, DbNodeAction body, Context context); + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DbNodeInner action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body); + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DbNodeInner action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body, + Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbServersClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbServersClient.java new file mode 100644 index 000000000000..c8fc78c88eec --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbServersClient.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.oracle.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.oracle.fluent.models.DbServerInner; + +/** + * An instance of this class provides access to all the operations defined in DbServersClient. + */ +public interface DbServersClient { + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename); + + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename, Context context); + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid, Context context); + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DbServerInner get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbSystemShapesClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbSystemShapesClient.java new file mode 100644 index 000000000000..911d76627354 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DbSystemShapesClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.DbSystemShapeInner; + +/** + * An instance of this class provides access to all the operations defined in DbSystemShapesClient. + */ +public interface DbSystemShapesClient { + /** + * List DbSystemShape resources by Location. + * + * @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 DbSystemShape list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); + + /** + * List DbSystemShape resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String dbsystemshapename, Context context); + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DbSystemShapeInner get(String location, String dbsystemshapename); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DnsPrivateViewsClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DnsPrivateViewsClient.java new file mode 100644 index 000000000000..dc2b0221108a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DnsPrivateViewsClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.DnsPrivateViewInner; + +/** + * An instance of this class provides access to all the operations defined in DnsPrivateViewsClient. + */ +public interface DnsPrivateViewsClient { + /** + * List DnsPrivateView resources by Location. + * + * @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 DnsPrivateView list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); + + /** + * List DnsPrivateView resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String dnsprivateviewocid, Context context); + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DnsPrivateViewInner get(String location, String dnsprivateviewocid); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DnsPrivateZonesClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DnsPrivateZonesClient.java new file mode 100644 index 000000000000..6e3012d0d107 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/DnsPrivateZonesClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.DnsPrivateZoneInner; + +/** + * An instance of this class provides access to all the operations defined in DnsPrivateZonesClient. + */ +public interface DnsPrivateZonesClient { + /** + * List DnsPrivateZone resources by Location. + * + * @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 DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); + + /** + * List DnsPrivateZone resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String dnsprivatezonename, Context context); + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DnsPrivateZoneInner get(String location, String dnsprivatezonename); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/GiVersionsClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/GiVersionsClient.java new file mode 100644 index 000000000000..40d88842c3c0 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/GiVersionsClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.GiVersionInner; + +/** + * An instance of this class provides access to all the operations defined in GiVersionsClient. + */ +public interface GiVersionsClient { + /** + * List GiVersion resources by Location. + * + * @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 GiVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); + + /** + * List GiVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); + + /** + * Get a GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, String giversionname, Context context); + + /** + * Get a 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 a GiVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GiVersionInner get(String location, String giversionname); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OperationsClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OperationsClient.java new file mode 100644 index 000000000000..0540824dadd3 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OperationsClient.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.OperationInner; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public interface OperationsClient { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OracleDatabaseResourceManager.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OracleDatabaseResourceManager.java new file mode 100644 index 000000000000..9cdb2c1d9c85 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OracleDatabaseResourceManager.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for OracleDatabaseResourceManager class. + */ +public interface OracleDatabaseResourceManager { + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the AutonomousDatabasesClient object to access its operations. + * + * @return the AutonomousDatabasesClient object. + */ + AutonomousDatabasesClient getAutonomousDatabases(); + + /** + * Gets the CloudExadataInfrastructuresClient object to access its operations. + * + * @return the CloudExadataInfrastructuresClient object. + */ + CloudExadataInfrastructuresClient getCloudExadataInfrastructures(); + + /** + * Gets the CloudVmClustersClient object to access its operations. + * + * @return the CloudVmClustersClient object. + */ + CloudVmClustersClient getCloudVmClusters(); + + /** + * Gets the AutonomousDatabaseCharacterSetsClient object to access its operations. + * + * @return the AutonomousDatabaseCharacterSetsClient object. + */ + AutonomousDatabaseCharacterSetsClient getAutonomousDatabaseCharacterSets(); + + /** + * Gets the AutonomousDatabaseNationalCharacterSetsClient object to access its operations. + * + * @return the AutonomousDatabaseNationalCharacterSetsClient object. + */ + AutonomousDatabaseNationalCharacterSetsClient getAutonomousDatabaseNationalCharacterSets(); + + /** + * Gets the AutonomousDatabaseVersionsClient object to access its operations. + * + * @return the AutonomousDatabaseVersionsClient object. + */ + AutonomousDatabaseVersionsClient getAutonomousDatabaseVersions(); + + /** + * Gets the DbSystemShapesClient object to access its operations. + * + * @return the DbSystemShapesClient object. + */ + DbSystemShapesClient getDbSystemShapes(); + + /** + * Gets the DnsPrivateViewsClient object to access its operations. + * + * @return the DnsPrivateViewsClient object. + */ + DnsPrivateViewsClient getDnsPrivateViews(); + + /** + * Gets the DnsPrivateZonesClient object to access its operations. + * + * @return the DnsPrivateZonesClient object. + */ + DnsPrivateZonesClient getDnsPrivateZones(); + + /** + * Gets the GiVersionsClient object to access its operations. + * + * @return the GiVersionsClient object. + */ + GiVersionsClient getGiVersions(); + + /** + * Gets the OracleSubscriptionsClient object to access its operations. + * + * @return the OracleSubscriptionsClient object. + */ + OracleSubscriptionsClient getOracleSubscriptions(); + + /** + * Gets the AutonomousDatabaseBackupsClient object to access its operations. + * + * @return the AutonomousDatabaseBackupsClient object. + */ + AutonomousDatabaseBackupsClient getAutonomousDatabaseBackups(); + + /** + * Gets the DbServersClient object to access its operations. + * + * @return the DbServersClient object. + */ + DbServersClient getDbServers(); + + /** + * Gets the DbNodesClient object to access its operations. + * + * @return the DbNodesClient object. + */ + DbNodesClient getDbNodes(); + + /** + * Gets the VirtualNetworkAddressesClient object to access its operations. + * + * @return the VirtualNetworkAddressesClient object. + */ + VirtualNetworkAddressesClient getVirtualNetworkAddresses(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OracleSubscriptionsClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OracleSubscriptionsClient.java new file mode 100644 index 000000000000..3add0b94d90c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/OracleSubscriptionsClient.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.oracle.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.oracle.fluent.models.ActivationLinksInner; +import com.azure.resourcemanager.oracle.fluent.models.CloudAccountDetailsInner; +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; +import com.azure.resourcemanager.oracle.fluent.models.SaasSubscriptionDetailsInner; +import com.azure.resourcemanager.oracle.models.OracleSubscriptionUpdate; + +/** + * An instance of this class provides access to all the operations defined in OracleSubscriptionsClient. + */ +public interface OracleSubscriptionsClient { + /** + * List OracleSubscription 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 OracleSubscription list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List OracleSubscription 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 OracleSubscription list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Get a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(Context context); + + /** + * Get a OracleSubscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OracleSubscriptionInner get(); + + /** + * Create a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OracleSubscriptionInner> + beginCreateOrUpdate(OracleSubscriptionInner resource); + + /** + * Create a OracleSubscription. + * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OracleSubscriptionInner> + beginCreateOrUpdate(OracleSubscriptionInner resource, Context context); + + /** + * Create a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OracleSubscriptionInner createOrUpdate(OracleSubscriptionInner resource); + + /** + * Create a OracleSubscription. + * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OracleSubscriptionInner createOrUpdate(OracleSubscriptionInner resource, Context context); + + /** + * Update a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OracleSubscriptionInner> + beginUpdate(OracleSubscriptionUpdate properties); + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OracleSubscriptionInner> + beginUpdate(OracleSubscriptionUpdate properties, Context context); + + /** + * Update a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OracleSubscriptionInner update(OracleSubscriptionUpdate properties); + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OracleSubscriptionInner update(OracleSubscriptionUpdate properties, Context context); + + /** + * Delete a OracleSubscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(); + + /** + * Delete a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(Context context); + + /** + * Delete a OracleSubscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(); + + /** + * Delete a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(Context context); + + /** + * List Activation Links. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActivationLinksInner> beginListActivationLinks(); + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ActivationLinksInner> beginListActivationLinks(Context context); + + /** + * List Activation Links. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActivationLinksInner listActivationLinks(); + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ActivationLinksInner listActivationLinks(Context context); + + /** + * List Cloud Account Details. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudAccountDetailsInner> beginListCloudAccountDetails(); + + /** + * List Cloud Account Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CloudAccountDetailsInner> + beginListCloudAccountDetails(Context context); + + /** + * List Cloud Account Details. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudAccountDetailsInner listCloudAccountDetails(); + + /** + * List Cloud Account Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CloudAccountDetailsInner listCloudAccountDetails(Context context); + + /** + * List Saas Subscription Details. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetails(); + + /** + * List Saas Subscription Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetails(Context context); + + /** + * List Saas Subscription Details. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SaasSubscriptionDetailsInner listSaasSubscriptionDetails(); + + /** + * List Saas Subscription Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SaasSubscriptionDetailsInner listSaasSubscriptionDetails(Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/VirtualNetworkAddressesClient.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/VirtualNetworkAddressesClient.java new file mode 100644 index 000000000000..662783ad3dba --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/VirtualNetworkAddressesClient.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.models.VirtualNetworkAddressInner; + +/** + * An instance of this class provides access to all the operations defined in VirtualNetworkAddressesClient. + */ +public interface VirtualNetworkAddressesClient { + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context); + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context); + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkAddressInner get(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname); + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkAddressInner> beginCreateOrUpdate( + String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + VirtualNetworkAddressInner resource); + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, VirtualNetworkAddressInner> beginCreateOrUpdate( + String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + VirtualNetworkAddressInner resource, Context context); + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource); + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource, Context context); + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 cloudvmclustername, + String virtualnetworkaddressname); + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context); + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 cloudvmclustername, String virtualnetworkaddressname); + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/ActivationLinksInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/ActivationLinksInner.java new file mode 100644 index 000000000000..1cd99fe3761c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/ActivationLinksInner.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Activation Links model. + */ +@Immutable +public final class ActivationLinksInner { + /* + * New Cloud Account Activation Link + */ + @JsonProperty(value = "newCloudAccountActivationLink", access = JsonProperty.Access.WRITE_ONLY) + private String newCloudAccountActivationLink; + + /* + * Existing Cloud Account Activation Link + */ + @JsonProperty(value = "existingCloudAccountActivationLink", access = JsonProperty.Access.WRITE_ONLY) + private String existingCloudAccountActivationLink; + + /** + * Creates an instance of ActivationLinksInner class. + */ + public ActivationLinksInner() { + } + + /** + * Get the newCloudAccountActivationLink property: New Cloud Account Activation Link. + * + * @return the newCloudAccountActivationLink value. + */ + public String newCloudAccountActivationLink() { + return this.newCloudAccountActivationLink; + } + + /** + * Get the existingCloudAccountActivationLink property: Existing Cloud Account Activation Link. + * + * @return the existingCloudAccountActivationLink value. + */ + public String existingCloudAccountActivationLink() { + return this.existingCloudAccountActivationLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseBackupInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseBackupInner.java new file mode 100644 index 000000000000..19448a50d69b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseBackupInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutonomousDatabaseBackup resource definition. + */ +@Fluent +public final class AutonomousDatabaseBackupInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private AutonomousDatabaseBackupProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AutonomousDatabaseBackupInner class. + */ + public AutonomousDatabaseBackupInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public AutonomousDatabaseBackupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the AutonomousDatabaseBackupInner object itself. + */ + public AutonomousDatabaseBackupInner 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseCharacterSetInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseCharacterSetInner.java new file mode 100644 index 000000000000..17504a328c40 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseCharacterSetInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSetProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutonomousDatabaseCharacterSets resource definition. + */ +@Fluent +public final class AutonomousDatabaseCharacterSetInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private AutonomousDatabaseCharacterSetProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AutonomousDatabaseCharacterSetInner class. + */ + public AutonomousDatabaseCharacterSetInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public AutonomousDatabaseCharacterSetProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the AutonomousDatabaseCharacterSetInner object itself. + */ + public AutonomousDatabaseCharacterSetInner withProperties(AutonomousDatabaseCharacterSetProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseInner.java new file mode 100644 index 000000000000..0336f0e931a4 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseInner.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.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBaseProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Autonomous Database resource model. + */ +@Fluent +public final class AutonomousDatabaseInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private AutonomousDatabaseBaseProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AutonomousDatabaseInner class. + */ + public AutonomousDatabaseInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public AutonomousDatabaseBaseProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the AutonomousDatabaseInner object itself. + */ + public AutonomousDatabaseInner withProperties(AutonomousDatabaseBaseProperties 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; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseInner 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(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseNationalCharacterSetInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseNationalCharacterSetInner.java new file mode 100644 index 000000000000..5f5d067f9a80 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseNationalCharacterSetInner.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.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSetProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutonomousDatabaseNationalCharacterSets resource definition. + */ +@Fluent +public final class AutonomousDatabaseNationalCharacterSetInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private AutonomousDatabaseNationalCharacterSetProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AutonomousDatabaseNationalCharacterSetInner class. + */ + public AutonomousDatabaseNationalCharacterSetInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public AutonomousDatabaseNationalCharacterSetProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the AutonomousDatabaseNationalCharacterSetInner object itself. + */ + public AutonomousDatabaseNationalCharacterSetInner + withProperties(AutonomousDatabaseNationalCharacterSetProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseWalletFileInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseWalletFileInner.java new file mode 100644 index 000000000000..3bfbf94ff622 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDatabaseWalletFileInner.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Autonomous Database Wallet File resource model. + */ +@Fluent +public final class AutonomousDatabaseWalletFileInner { + /* + * The base64 encoded wallet files + */ + @JsonProperty(value = "walletFiles", required = true) + private String walletFiles; + + /** + * Creates an instance of AutonomousDatabaseWalletFileInner class. + */ + public AutonomousDatabaseWalletFileInner() { + } + + /** + * Get the walletFiles property: The base64 encoded wallet files. + * + * @return the walletFiles value. + */ + public String walletFiles() { + return this.walletFiles; + } + + /** + * Set the walletFiles property: The base64 encoded wallet files. + * + * @param walletFiles the walletFiles value to set. + * @return the AutonomousDatabaseWalletFileInner object itself. + */ + public AutonomousDatabaseWalletFileInner withWalletFiles(String walletFiles) { + this.walletFiles = walletFiles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (walletFiles() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property walletFiles in model AutonomousDatabaseWalletFileInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseWalletFileInner.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDbVersionInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDbVersionInner.java new file mode 100644 index 000000000000..22183e4b4dc8 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/AutonomousDbVersionInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.AutonomousDbVersionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutonomousDbVersion resource definition. + */ +@Fluent +public final class AutonomousDbVersionInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private AutonomousDbVersionProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AutonomousDbVersionInner class. + */ + public AutonomousDbVersionInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public AutonomousDbVersionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the AutonomousDbVersionInner object itself. + */ + public AutonomousDbVersionInner withProperties(AutonomousDbVersionProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudAccountDetailsInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudAccountDetailsInner.java new file mode 100644 index 000000000000..e219b6744590 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudAccountDetailsInner.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cloud Account Details model. + */ +@Immutable +public final class CloudAccountDetailsInner { + /* + * Cloud Account name + */ + @JsonProperty(value = "cloudAccountName", access = JsonProperty.Access.WRITE_ONLY) + private String cloudAccountName; + + /* + * Cloud Account Home region + */ + @JsonProperty(value = "cloudAccountHomeRegion", access = JsonProperty.Access.WRITE_ONLY) + private String cloudAccountHomeRegion; + + /** + * Creates an instance of CloudAccountDetailsInner class. + */ + public CloudAccountDetailsInner() { + } + + /** + * Get the cloudAccountName property: Cloud Account name. + * + * @return the cloudAccountName value. + */ + public String cloudAccountName() { + return this.cloudAccountName; + } + + /** + * Get the cloudAccountHomeRegion property: Cloud Account Home region. + * + * @return the cloudAccountHomeRegion value. + */ + public String cloudAccountHomeRegion() { + return this.cloudAccountHomeRegion; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudExadataInfrastructureInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudExadataInfrastructureInner.java new file mode 100644 index 000000000000..795069320637 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudExadataInfrastructureInner.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * CloudExadataInfrastructure resource definition. + */ +@Fluent +public final class CloudExadataInfrastructureInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private CloudExadataInfrastructureProperties properties; + + /* + * CloudExadataInfrastructure zones + */ + @JsonProperty(value = "zones", required = true) + private List zones; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of CloudExadataInfrastructureInner class. + */ + public CloudExadataInfrastructureInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public CloudExadataInfrastructureProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the CloudExadataInfrastructureInner object itself. + */ + public CloudExadataInfrastructureInner withProperties(CloudExadataInfrastructureProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the zones property: CloudExadataInfrastructure zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: CloudExadataInfrastructure zones. + * + * @param zones the zones value to set. + * @return the CloudExadataInfrastructureInner object itself. + */ + public CloudExadataInfrastructureInner 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; + } + + /** + * {@inheritDoc} + */ + @Override + public CloudExadataInfrastructureInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CloudExadataInfrastructureInner 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(); + } + if (zones() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property zones in model CloudExadataInfrastructureInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudExadataInfrastructureInner.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudVmClusterInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudVmClusterInner.java new file mode 100644 index 000000000000..75eb7a290016 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/CloudVmClusterInner.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.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.CloudVmClusterProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * CloudVmCluster resource definition. + */ +@Fluent +public final class CloudVmClusterInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private CloudVmClusterProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of CloudVmClusterInner class. + */ + public CloudVmClusterInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public CloudVmClusterProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the CloudVmClusterInner object itself. + */ + public CloudVmClusterInner withProperties(CloudVmClusterProperties 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; + } + + /** + * {@inheritDoc} + */ + @Override + public CloudVmClusterInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CloudVmClusterInner 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(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbNodeInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbNodeInner.java new file mode 100644 index 000000000000..e362634255fa --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbNodeInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.DbNodeProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The DbNode resource belonging to vmCluster. + */ +@Fluent +public final class DbNodeInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DbNodeProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DbNodeInner class. + */ + public DbNodeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DbNodeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DbNodeInner object itself. + */ + public DbNodeInner withProperties(DbNodeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbServerInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbServerInner.java new file mode 100644 index 000000000000..62d6ac94c3a2 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbServerInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.DbServerProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DbServer resource model. + */ +@Fluent +public final class DbServerInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DbServerProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DbServerInner class. + */ + public DbServerInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DbServerProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DbServerInner object itself. + */ + public DbServerInner withProperties(DbServerProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbSystemShapeInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbSystemShapeInner.java new file mode 100644 index 000000000000..3475598ec39d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DbSystemShapeInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.DbSystemShapeProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DbSystemShape resource definition. + */ +@Fluent +public final class DbSystemShapeInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DbSystemShapeProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DbSystemShapeInner class. + */ + public DbSystemShapeInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DbSystemShapeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DbSystemShapeInner object itself. + */ + public DbSystemShapeInner withProperties(DbSystemShapeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DnsPrivateViewInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DnsPrivateViewInner.java new file mode 100644 index 000000000000..86097c375629 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DnsPrivateViewInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.DnsPrivateViewProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DnsPrivateView resource definition. + */ +@Fluent +public final class DnsPrivateViewInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DnsPrivateViewProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DnsPrivateViewInner class. + */ + public DnsPrivateViewInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DnsPrivateViewProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DnsPrivateViewInner object itself. + */ + public DnsPrivateViewInner withProperties(DnsPrivateViewProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DnsPrivateZoneInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DnsPrivateZoneInner.java new file mode 100644 index 000000000000..b7b933ef9133 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/DnsPrivateZoneInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.DnsPrivateZoneProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DnsPrivateZone resource definition. + */ +@Fluent +public final class DnsPrivateZoneInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private DnsPrivateZoneProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DnsPrivateZoneInner class. + */ + public DnsPrivateZoneInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public DnsPrivateZoneProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the DnsPrivateZoneInner object itself. + */ + public DnsPrivateZoneInner withProperties(DnsPrivateZoneProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/GiVersionInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/GiVersionInner.java new file mode 100644 index 000000000000..77b7c9aec2f5 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/GiVersionInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.GiVersionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * GiVersion resource definition. + */ +@Fluent +public final class GiVersionInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private GiVersionProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of GiVersionInner class. + */ + public GiVersionInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public GiVersionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the GiVersionInner object itself. + */ + public GiVersionInner withProperties(GiVersionProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/OperationInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/OperationInner.java new file mode 100644 index 000000000000..8c161356a4e0 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/OperationInner.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.oracle.models.ActionType; +import com.azure.resourcemanager.oracle.models.OperationDisplay; +import com.azure.resourcemanager.oracle.models.Origin; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * REST API Operation + * + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ +@Fluent +public final class OperationInner { + /* + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. + */ + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; + + /* + * Localized display information for this particular operation. + */ + @JsonProperty(value = "display") + private OperationDisplay display; + + /* + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" + */ + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; + + /* + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; + + /** + * Creates an instance of OperationInner class. + */ + public OperationInner() { + } + + /** + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + public OperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. + * @return the OperationInner object itself. + */ + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + public Origin origin() { + return this.origin; + } + + /** + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + public ActionType actionType() { + return this.actionType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/OracleSubscriptionInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/OracleSubscriptionInner.java new file mode 100644 index 000000000000..9f90a74b040d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/OracleSubscriptionInner.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.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.OracleSubscriptionProperties; +import com.azure.resourcemanager.oracle.models.Plan; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * OracleSubscription resource definition. + */ +@Fluent +public final class OracleSubscriptionInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private OracleSubscriptionProperties properties; + + /* + * Details of the resource plan. + */ + @JsonProperty(value = "plan") + private Plan plan; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of OracleSubscriptionInner class. + */ + public OracleSubscriptionInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public OracleSubscriptionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the OracleSubscriptionInner object itself. + */ + public OracleSubscriptionInner withProperties(OracleSubscriptionProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the plan property: Details of the resource plan. + * + * @return the plan value. + */ + public Plan plan() { + return this.plan; + } + + /** + * Set the plan property: Details of the resource plan. + * + * @param plan the plan value to set. + * @return the OracleSubscriptionInner object itself. + */ + public OracleSubscriptionInner withPlan(Plan plan) { + this.plan = plan; + 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (plan() != null) { + plan().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/PrivateIpAddressPropertiesInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/PrivateIpAddressPropertiesInner.java new file mode 100644 index 000000000000..cb01fb8d8a36 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/PrivateIpAddressPropertiesInner.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * PrivateIpAddress resource properties. + */ +@Fluent +public final class PrivateIpAddressPropertiesInner { + /* + * PrivateIpAddresses displayName + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * PrivateIpAddresses hostnameLabel + */ + @JsonProperty(value = "hostnameLabel", required = true) + private String hostnameLabel; + + /* + * PrivateIpAddresses Id + */ + @JsonProperty(value = "ocid", required = true) + private String ocid; + + /* + * PrivateIpAddresses ipAddress + */ + @JsonProperty(value = "ipAddress", required = true) + private String ipAddress; + + /* + * PrivateIpAddresses subnetId + */ + @JsonProperty(value = "subnetId", required = true) + private String subnetId; + + /** + * Creates an instance of PrivateIpAddressPropertiesInner class. + */ + public PrivateIpAddressPropertiesInner() { + } + + /** + * Get the displayName property: PrivateIpAddresses displayName. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: PrivateIpAddresses displayName. + * + * @param displayName the displayName value to set. + * @return the PrivateIpAddressPropertiesInner object itself. + */ + public PrivateIpAddressPropertiesInner withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the hostnameLabel property: PrivateIpAddresses hostnameLabel. + * + * @return the hostnameLabel value. + */ + public String hostnameLabel() { + return this.hostnameLabel; + } + + /** + * Set the hostnameLabel property: PrivateIpAddresses hostnameLabel. + * + * @param hostnameLabel the hostnameLabel value to set. + * @return the PrivateIpAddressPropertiesInner object itself. + */ + public PrivateIpAddressPropertiesInner withHostnameLabel(String hostnameLabel) { + this.hostnameLabel = hostnameLabel; + return this; + } + + /** + * Get the ocid property: PrivateIpAddresses Id. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Set the ocid property: PrivateIpAddresses Id. + * + * @param ocid the ocid value to set. + * @return the PrivateIpAddressPropertiesInner object itself. + */ + public PrivateIpAddressPropertiesInner withOcid(String ocid) { + this.ocid = ocid; + return this; + } + + /** + * Get the ipAddress property: PrivateIpAddresses ipAddress. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: PrivateIpAddresses ipAddress. + * + * @param ipAddress the ipAddress value to set. + * @return the PrivateIpAddressPropertiesInner object itself. + */ + public PrivateIpAddressPropertiesInner withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the subnetId property: PrivateIpAddresses subnetId. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: PrivateIpAddresses subnetId. + * + * @param subnetId the subnetId value to set. + * @return the PrivateIpAddressPropertiesInner object itself. + */ + public PrivateIpAddressPropertiesInner withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * 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 PrivateIpAddressPropertiesInner")); + } + if (hostnameLabel() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property hostnameLabel in model PrivateIpAddressPropertiesInner")); + } + if (ocid() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ocid in model PrivateIpAddressPropertiesInner")); + } + if (ipAddress() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ipAddress in model PrivateIpAddressPropertiesInner")); + } + if (subnetId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetId in model PrivateIpAddressPropertiesInner")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateIpAddressPropertiesInner.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/SaasSubscriptionDetailsInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/SaasSubscriptionDetailsInner.java new file mode 100644 index 000000000000..fe86f446a173 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/SaasSubscriptionDetailsInner.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * SaaS Subscription Details model. + */ +@Immutable +public final class SaasSubscriptionDetailsInner { + /* + * Purchased SaaS subscription ID + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * SaaS subscription name + */ + @JsonProperty(value = "subscriptionName", access = JsonProperty.Access.WRITE_ONLY) + private String subscriptionName; + + /* + * Creation Date and Time + */ + @JsonProperty(value = "timeCreated", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeCreated; + + /* + * Purchased offer ID + */ + @JsonProperty(value = "offerId", access = JsonProperty.Access.WRITE_ONLY) + private String offerId; + + /* + * Purchased offer's plan ID + */ + @JsonProperty(value = "planId", access = JsonProperty.Access.WRITE_ONLY) + private String planId; + + /* + * Indicates the status of the Subscription. + */ + @JsonProperty(value = "saasSubscriptionStatus", access = JsonProperty.Access.WRITE_ONLY) + private String saasSubscriptionStatus; + + /* + * Publisher ID + */ + @JsonProperty(value = "publisherId", access = JsonProperty.Access.WRITE_ONLY) + private String publisherId; + + /* + * Purchaser Email ID + */ + @JsonProperty(value = "purchaserEmailId", access = JsonProperty.Access.WRITE_ONLY) + private String purchaserEmailId; + + /* + * Purchaser Tenant ID + */ + @JsonProperty(value = "purchaserTenantId", access = JsonProperty.Access.WRITE_ONLY) + private String purchaserTenantId; + + /* + * Purchase Term Unit + */ + @JsonProperty(value = "termUnit", access = JsonProperty.Access.WRITE_ONLY) + private String termUnit; + + /* + * AutoRenew flag + */ + @JsonProperty(value = "isAutoRenew", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isAutoRenew; + + /* + * FreeTrial flag + */ + @JsonProperty(value = "isFreeTrial", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isFreeTrial; + + /** + * Creates an instance of SaasSubscriptionDetailsInner class. + */ + public SaasSubscriptionDetailsInner() { + } + + /** + * Get the id property: Purchased SaaS subscription ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the subscriptionName property: SaaS subscription name. + * + * @return the subscriptionName value. + */ + public String subscriptionName() { + return this.subscriptionName; + } + + /** + * Get the timeCreated property: Creation Date and Time. + * + * @return the timeCreated value. + */ + public OffsetDateTime timeCreated() { + return this.timeCreated; + } + + /** + * Get the offerId property: Purchased offer ID. + * + * @return the offerId value. + */ + public String offerId() { + return this.offerId; + } + + /** + * Get the planId property: Purchased offer's plan ID. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Get the saasSubscriptionStatus property: Indicates the status of the Subscription. + * + * @return the saasSubscriptionStatus value. + */ + public String saasSubscriptionStatus() { + return this.saasSubscriptionStatus; + } + + /** + * Get the publisherId property: Publisher ID. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * Get the purchaserEmailId property: Purchaser Email ID. + * + * @return the purchaserEmailId value. + */ + public String purchaserEmailId() { + return this.purchaserEmailId; + } + + /** + * Get the purchaserTenantId property: Purchaser Tenant ID. + * + * @return the purchaserTenantId value. + */ + public String purchaserTenantId() { + return this.purchaserTenantId; + } + + /** + * Get the termUnit property: Purchase Term Unit. + * + * @return the termUnit value. + */ + public String termUnit() { + return this.termUnit; + } + + /** + * Get the isAutoRenew property: AutoRenew flag. + * + * @return the isAutoRenew value. + */ + public Boolean isAutoRenew() { + return this.isAutoRenew; + } + + /** + * Get the isFreeTrial property: FreeTrial flag. + * + * @return the isFreeTrial value. + */ + public Boolean isFreeTrial() { + return this.isFreeTrial; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/VirtualNetworkAddressInner.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/VirtualNetworkAddressInner.java new file mode 100644 index 000000000000..7b031a6f4ca7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/VirtualNetworkAddressInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddressProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual IP resource belonging to a vm cluster resource. + */ +@Fluent +public final class VirtualNetworkAddressInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private VirtualNetworkAddressProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of VirtualNetworkAddressInner class. + */ + public VirtualNetworkAddressInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public VirtualNetworkAddressProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the VirtualNetworkAddressInner object itself. + */ + public VirtualNetworkAddressInner withProperties(VirtualNetworkAddressProperties 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/package-info.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/package-info.java new file mode 100644 index 000000000000..67b26dd09440 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the inner data models for OracleDatabaseResourceManager. + * null. + */ +package com.azure.resourcemanager.oracle.fluent.models; diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/package-info.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/package-info.java new file mode 100644 index 000000000000..00362edaef3b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/fluent/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the service clients for OracleDatabaseResourceManager. + * null. + */ +package com.azure.resourcemanager.oracle.fluent; diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/ActivationLinksImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/ActivationLinksImpl.java new file mode 100644 index 000000000000..40546c83315f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/ActivationLinksImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.resourcemanager.oracle.fluent.models.ActivationLinksInner; +import com.azure.resourcemanager.oracle.models.ActivationLinks; + +public final class ActivationLinksImpl implements ActivationLinks { + private ActivationLinksInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + ActivationLinksImpl(ActivationLinksInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String newCloudAccountActivationLink() { + return this.innerModel().newCloudAccountActivationLink(); + } + + public String existingCloudAccountActivationLink() { + return this.innerModel().existingCloudAccountActivationLink(); + } + + public ActivationLinksInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupImpl.java new file mode 100644 index 000000000000..2a7be6f9b4d6 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseBackupInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackup; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupProperties; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupUpdate; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupUpdateProperties; + +public final class AutonomousDatabaseBackupImpl + implements AutonomousDatabaseBackup, AutonomousDatabaseBackup.Definition, AutonomousDatabaseBackup.Update { + private AutonomousDatabaseBackupInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public AutonomousDatabaseBackupProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AutonomousDatabaseBackupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String autonomousdatabasename; + + private String adbbackupid; + + private AutonomousDatabaseBackupUpdate updateProperties; + + public AutonomousDatabaseBackupImpl withExistingAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename) { + this.resourceGroupName = resourceGroupName; + this.autonomousdatabasename = autonomousdatabasename; + return this; + } + + public AutonomousDatabaseBackup create() { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabaseBackups() + .createOrUpdate(resourceGroupName, autonomousdatabasename, adbbackupid, this.innerModel(), Context.NONE); + return this; + } + + public AutonomousDatabaseBackup create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabaseBackups() + .createOrUpdate(resourceGroupName, autonomousdatabasename, adbbackupid, this.innerModel(), context); + return this; + } + + AutonomousDatabaseBackupImpl(String name, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = new AutonomousDatabaseBackupInner(); + this.serviceManager = serviceManager; + this.adbbackupid = name; + } + + public AutonomousDatabaseBackupImpl update() { + this.updateProperties = new AutonomousDatabaseBackupUpdate(); + return this; + } + + public AutonomousDatabaseBackup apply() { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabaseBackups() + .update(resourceGroupName, autonomousdatabasename, adbbackupid, updateProperties, Context.NONE); + return this; + } + + public AutonomousDatabaseBackup apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabaseBackups() + .update(resourceGroupName, autonomousdatabasename, adbbackupid, updateProperties, context); + return this; + } + + AutonomousDatabaseBackupImpl(AutonomousDatabaseBackupInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.autonomousdatabasename + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "autonomousDatabases"); + this.adbbackupid = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "autonomousDatabaseBackups"); + } + + public AutonomousDatabaseBackup refresh() { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabaseBackups() + .getWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, Context.NONE) + .getValue(); + return this; + } + + public AutonomousDatabaseBackup refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabaseBackups() + .getWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, context) + .getValue(); + return this; + } + + public AutonomousDatabaseBackupImpl withProperties(AutonomousDatabaseBackupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public AutonomousDatabaseBackupImpl withProperties(AutonomousDatabaseBackupUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupsClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupsClientImpl.java new file mode 100644 index 000000000000..19f324324dae --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupsClientImpl.java @@ -0,0 +1,1226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.AutonomousDatabaseBackupsClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseBackupInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupListResult; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupUpdate; +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 AutonomousDatabaseBackupsClient. + */ +public final class AutonomousDatabaseBackupsClientImpl implements AutonomousDatabaseBackupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AutonomousDatabaseBackupsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of AutonomousDatabaseBackupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AutonomousDatabaseBackupsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(AutonomousDatabaseBackupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabaseBackups to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface AutonomousDatabaseBackupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByAutonomousDatabase(@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, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @PathParam("adbbackupid") String adbbackupid, + @BodyParam("application/json") AutonomousDatabaseBackupInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @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("autonomousdatabasename") String autonomousdatabasename, + @PathParam("adbbackupid") String adbbackupid, + @BodyParam("application/json") AutonomousDatabaseBackupUpdate properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @PathParam("adbbackupid") String adbbackupid, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByAutonomousDatabaseNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByAutonomousDatabaseSinglePageAsync(String resourceGroupName, String autonomousdatabasename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByAutonomousDatabase(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByAutonomousDatabaseSinglePageAsync( + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByAutonomousDatabase(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAutonomousDatabaseAsync(String resourceGroupName, + String autonomousdatabasename) { + return new PagedFlux<>(() -> listByAutonomousDatabaseSinglePageAsync(resourceGroupName, autonomousdatabasename), + nextLink -> listByAutonomousDatabaseNextSinglePageAsync(nextLink)); + } + + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByAutonomousDatabaseAsync(String resourceGroupName, + String autonomousdatabasename, Context context) { + return new PagedFlux<>( + () -> listByAutonomousDatabaseSinglePageAsync(resourceGroupName, autonomousdatabasename, context), + nextLink -> listByAutonomousDatabaseNextSinglePageAsync(nextLink, context)); + } + + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename) { + return new PagedIterable<>(listByAutonomousDatabaseAsync(resourceGroupName, autonomousdatabasename)); + } + + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename, Context context) { + return new PagedIterable<>(listByAutonomousDatabaseAsync(resourceGroupName, autonomousdatabasename, context)); + } + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, autonomousdatabasename, adbbackupid, accept, context); + } + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String autonomousdatabasename, + String adbbackupid) { + return getWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, Context context) { + return getWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context).block(); + } + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseBackupInner get(String resourceGroupName, String autonomousdatabasename, + String adbbackupid) { + return getWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, Context.NONE).getValue(); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, resource, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + 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, autonomousdatabasename, adbbackupid, resource, accept, + context); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseBackupInner> + beginCreateOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, + this.client.getContext()); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseBackupInner> + beginCreateOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + autonomousdatabasename, adbbackupid, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, + context); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource) + .getSyncPoller(); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseBackupInner> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource, context) + .getSyncPoller(); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource) { + return createOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource).block(); + } + + /** + * Create a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseBackupInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, resource, context).block(); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupUpdate 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 (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, properties, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, AutonomousDatabaseBackupUpdate properties, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + 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, autonomousdatabasename, adbbackupid, properties, accept, context); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseBackupInner> beginUpdateAsync( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, + this.client.getContext()); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseBackupInner> beginUpdateAsync( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupUpdate properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseBackupInner.class, AutonomousDatabaseBackupInner.class, + context); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseBackupInner> beginUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties) + .getSyncPoller(); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseBackupInner> beginUpdate( + String resourceGroupName, String autonomousdatabasename, String adbbackupid, + AutonomousDatabaseBackupUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context) + .getSyncPoller(); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupUpdate properties) { + return beginUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseBackupInner update(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupUpdate properties) { + return updateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties).block(); + } + + /** + * Update a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomousDatabaseBackup resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseBackupInner update(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, AutonomousDatabaseBackupUpdate properties, Context context) { + return updateAsync(resourceGroupName, autonomousdatabasename, adbbackupid, properties, context).block(); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, adbbackupid, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, String adbbackupid, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (adbbackupid == null) { + return Mono.error(new IllegalArgumentException("Parameter adbbackupid is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, autonomousdatabasename, adbbackupid, accept, context); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String autonomousdatabasename, + String adbbackupid) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + String adbbackupid) { + return this.beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid).getSyncPoller(); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context) { + return this.beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context).getSyncPoller(); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid) { + return beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename, String adbbackupid, + Context context) { + return beginDeleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid) { + deleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid).block(); + } + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context) { + deleteAsync(resourceGroupName, autonomousdatabasename, adbbackupid, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByAutonomousDatabaseNextSinglePageAsync(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.listByAutonomousDatabaseNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByAutonomousDatabaseNextSinglePageAsync(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.listByAutonomousDatabaseNext(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/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupsImpl.java new file mode 100644 index 000000000000..5425f7daf3e2 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseBackupsImpl.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.AutonomousDatabaseBackupsClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseBackupInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackup; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackups; + +public final class AutonomousDatabaseBackupsImpl implements AutonomousDatabaseBackups { + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseBackupsImpl.class); + + private final AutonomousDatabaseBackupsClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public AutonomousDatabaseBackupsImpl(AutonomousDatabaseBackupsClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename) { + PagedIterable inner + = this.serviceClient().listByAutonomousDatabase(resourceGroupName, autonomousdatabasename); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseBackupImpl(inner1, this.manager())); + } + + public PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename, Context context) { + PagedIterable inner + = this.serviceClient().listByAutonomousDatabase(resourceGroupName, autonomousdatabasename, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseBackupImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AutonomousDatabaseBackupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AutonomousDatabaseBackup get(String resourceGroupName, String autonomousdatabasename, String adbbackupid) { + AutonomousDatabaseBackupInner inner + = this.serviceClient().get(resourceGroupName, autonomousdatabasename, adbbackupid); + if (inner != null) { + return new AutonomousDatabaseBackupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid) { + this.serviceClient().delete(resourceGroupName, autonomousdatabasename, adbbackupid); + } + + public void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context) { + this.serviceClient().delete(resourceGroupName, autonomousdatabasename, adbbackupid, context); + } + + public AutonomousDatabaseBackup 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 autonomousdatabasename = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabases"); + if (autonomousdatabasename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabases'.", id))); + } + String adbbackupid = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabaseBackups"); + if (adbbackupid == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabaseBackups'.", id))); + } + return this.getWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, 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 autonomousdatabasename = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabases"); + if (autonomousdatabasename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabases'.", id))); + } + String adbbackupid = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabaseBackups"); + if (adbbackupid == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabaseBackups'.", id))); + } + return this.getWithResponse(resourceGroupName, autonomousdatabasename, adbbackupid, 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 autonomousdatabasename = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabases"); + if (autonomousdatabasename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabases'.", id))); + } + String adbbackupid = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabaseBackups"); + if (adbbackupid == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabaseBackups'.", id))); + } + this.delete(resourceGroupName, autonomousdatabasename, adbbackupid, 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 autonomousdatabasename = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabases"); + if (autonomousdatabasename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabases'.", id))); + } + String adbbackupid = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabaseBackups"); + if (adbbackupid == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabaseBackups'.", id))); + } + this.delete(resourceGroupName, autonomousdatabasename, adbbackupid, context); + } + + private AutonomousDatabaseBackupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + public AutonomousDatabaseBackupImpl define(String name) { + return new AutonomousDatabaseBackupImpl(name, this.manager()); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetImpl.java new file mode 100644 index 000000000000..2b268f5034c9 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseCharacterSetInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSet; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSetProperties; + +public final class AutonomousDatabaseCharacterSetImpl implements AutonomousDatabaseCharacterSet { + private AutonomousDatabaseCharacterSetInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + AutonomousDatabaseCharacterSetImpl(AutonomousDatabaseCharacterSetInner innerObject, + com.azure.resourcemanager.oracle.OracleManager 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 AutonomousDatabaseCharacterSetProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AutonomousDatabaseCharacterSetInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetsClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetsClientImpl.java new file mode 100644 index 000000000000..84eb48f83fd9 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetsClientImpl.java @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.AutonomousDatabaseCharacterSetsClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseCharacterSetInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSetListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AutonomousDatabaseCharacterSetsClient. + */ +public final class AutonomousDatabaseCharacterSetsClientImpl implements AutonomousDatabaseCharacterSetsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AutonomousDatabaseCharacterSetsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of AutonomousDatabaseCharacterSetsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AutonomousDatabaseCharacterSetsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(AutonomousDatabaseCharacterSetsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabaseCharacterSets to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface AutonomousDatabaseCharacterSetsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets") + @ExpectedResponses({ 200 }) + @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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("adbscharsetname") String adbscharsetname, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(listByLocationAsync(location)); + } + + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(listByLocationAsync(location, context)); + } + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, + String adbscharsetname) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (adbscharsetname == null) { + return Mono + .error(new IllegalArgumentException("Parameter adbscharsetname is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, adbscharsetname, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, + String adbscharsetname, 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 (adbscharsetname == null) { + return Mono + .error(new IllegalArgumentException("Parameter adbscharsetname is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, adbscharsetname, accept, context); + } + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String adbscharsetname) { + return getWithResponseAsync(location, adbscharsetname).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String adbscharsetname, + Context context) { + return getWithResponseAsync(location, adbscharsetname, context).block(); + } + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseCharacterSetInner get(String location, String adbscharsetname) { + return getWithResponse(location, adbscharsetname, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByLocationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetsImpl.java new file mode 100644 index 000000000000..d3d6b572a10a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseCharacterSetsImpl.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.oracle.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.oracle.fluent.AutonomousDatabaseCharacterSetsClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseCharacterSetInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSet; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSets; + +public final class AutonomousDatabaseCharacterSetsImpl implements AutonomousDatabaseCharacterSets { + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseCharacterSetsImpl.class); + + private final AutonomousDatabaseCharacterSetsClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public AutonomousDatabaseCharacterSetsImpl(AutonomousDatabaseCharacterSetsClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AutonomousDatabaseCharacterSetImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner + = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AutonomousDatabaseCharacterSetImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String adbscharsetname, + Context context) { + Response inner + = this.serviceClient().getWithResponse(location, adbscharsetname, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AutonomousDatabaseCharacterSetImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AutonomousDatabaseCharacterSet get(String location, String adbscharsetname) { + AutonomousDatabaseCharacterSetInner inner = this.serviceClient().get(location, adbscharsetname); + if (inner != null) { + return new AutonomousDatabaseCharacterSetImpl(inner, this.manager()); + } else { + return null; + } + } + + private AutonomousDatabaseCharacterSetsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseImpl.java new file mode 100644 index 000000000000..ad5626f644ac --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseImpl.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabase; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBaseProperties; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseUpdate; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseUpdateProperties; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseWalletFile; +import com.azure.resourcemanager.oracle.models.GenerateAutonomousDatabaseWalletDetails; +import com.azure.resourcemanager.oracle.models.PeerDbDetails; +import java.util.Collections; +import java.util.Map; + +public final class AutonomousDatabaseImpl + implements AutonomousDatabase, AutonomousDatabase.Definition, AutonomousDatabase.Update { + private AutonomousDatabaseInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager 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 AutonomousDatabaseBaseProperties properties() { + return this.innerModel().properties(); + } + + 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 AutonomousDatabaseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String autonomousdatabasename; + + private AutonomousDatabaseUpdate updateProperties; + + public AutonomousDatabaseImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public AutonomousDatabase create() { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabases() + .createOrUpdate(resourceGroupName, autonomousdatabasename, this.innerModel(), Context.NONE); + return this; + } + + public AutonomousDatabase create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabases() + .createOrUpdate(resourceGroupName, autonomousdatabasename, this.innerModel(), context); + return this; + } + + AutonomousDatabaseImpl(String name, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = new AutonomousDatabaseInner(); + this.serviceManager = serviceManager; + this.autonomousdatabasename = name; + } + + public AutonomousDatabaseImpl update() { + this.updateProperties = new AutonomousDatabaseUpdate(); + return this; + } + + public AutonomousDatabase apply() { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabases() + .update(resourceGroupName, autonomousdatabasename, updateProperties, Context.NONE); + return this; + } + + public AutonomousDatabase apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabases() + .update(resourceGroupName, autonomousdatabasename, updateProperties, context); + return this; + } + + AutonomousDatabaseImpl(AutonomousDatabaseInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.autonomousdatabasename + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "autonomousDatabases"); + } + + public AutonomousDatabase refresh() { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabases() + .getByResourceGroupWithResponse(resourceGroupName, autonomousdatabasename, Context.NONE) + .getValue(); + return this; + } + + public AutonomousDatabase refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAutonomousDatabases() + .getByResourceGroupWithResponse(resourceGroupName, autonomousdatabasename, context) + .getValue(); + return this; + } + + public AutonomousDatabase failover(PeerDbDetails body) { + return serviceManager.autonomousDatabases().failover(resourceGroupName, autonomousdatabasename, body); + } + + public AutonomousDatabase failover(PeerDbDetails body, Context context) { + return serviceManager.autonomousDatabases().failover(resourceGroupName, autonomousdatabasename, body, context); + } + + public Response + generateWalletWithResponse(GenerateAutonomousDatabaseWalletDetails body, Context context) { + return serviceManager.autonomousDatabases() + .generateWalletWithResponse(resourceGroupName, autonomousdatabasename, body, context); + } + + public AutonomousDatabaseWalletFile generateWallet(GenerateAutonomousDatabaseWalletDetails body) { + return serviceManager.autonomousDatabases().generateWallet(resourceGroupName, autonomousdatabasename, body); + } + + public AutonomousDatabase switchover(PeerDbDetails body) { + return serviceManager.autonomousDatabases().switchover(resourceGroupName, autonomousdatabasename, body); + } + + public AutonomousDatabase switchover(PeerDbDetails body, Context context) { + return serviceManager.autonomousDatabases() + .switchover(resourceGroupName, autonomousdatabasename, body, context); + } + + public AutonomousDatabaseImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AutonomousDatabaseImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AutonomousDatabaseImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public AutonomousDatabaseImpl withProperties(AutonomousDatabaseBaseProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public AutonomousDatabaseImpl withProperties(AutonomousDatabaseUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetImpl.java new file mode 100644 index 000000000000..1e8d2f090f93 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseNationalCharacterSetInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSet; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSetProperties; + +public final class AutonomousDatabaseNationalCharacterSetImpl implements AutonomousDatabaseNationalCharacterSet { + private AutonomousDatabaseNationalCharacterSetInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + AutonomousDatabaseNationalCharacterSetImpl(AutonomousDatabaseNationalCharacterSetInner innerObject, + com.azure.resourcemanager.oracle.OracleManager 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 AutonomousDatabaseNationalCharacterSetProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AutonomousDatabaseNationalCharacterSetInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetsClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetsClientImpl.java new file mode 100644 index 000000000000..f853bda84b2c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetsClientImpl.java @@ -0,0 +1,406 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.AutonomousDatabaseNationalCharacterSetsClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseNationalCharacterSetInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSetListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * AutonomousDatabaseNationalCharacterSetsClient. + */ +public final class AutonomousDatabaseNationalCharacterSetsClientImpl + implements AutonomousDatabaseNationalCharacterSetsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AutonomousDatabaseNationalCharacterSetsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of AutonomousDatabaseNationalCharacterSetsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AutonomousDatabaseNationalCharacterSetsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(AutonomousDatabaseNationalCharacterSetsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSets + * to be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface AutonomousDatabaseNationalCharacterSetsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets") + @ExpectedResponses({ 200 }) + @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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("adbsncharsetname") String adbsncharsetname, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByLocationSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, + Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(listByLocationAsync(location)); + } + + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(listByLocationAsync(location, context)); + } + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, + String adbsncharsetname) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (adbsncharsetname == null) { + return Mono + .error(new IllegalArgumentException("Parameter adbsncharsetname is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, adbsncharsetname, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, + String adbsncharsetname, 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 (adbsncharsetname == null) { + return Mono + .error(new IllegalArgumentException("Parameter adbsncharsetname is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, adbsncharsetname, accept, context); + } + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String adbsncharsetname) { + return getWithResponseAsync(location, adbsncharsetname).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, + String adbsncharsetname, Context context) { + return getWithResponseAsync(location, adbsncharsetname, context).block(); + } + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseNationalCharacterSetInner get(String location, String adbsncharsetname) { + return getWithResponse(location, adbsncharsetname, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByLocationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByLocationNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetsImpl.java new file mode 100644 index 000000000000..517ea7521376 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseNationalCharacterSetsImpl.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.oracle.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.oracle.fluent.AutonomousDatabaseNationalCharacterSetsClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseNationalCharacterSetInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSet; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSets; + +public final class AutonomousDatabaseNationalCharacterSetsImpl implements AutonomousDatabaseNationalCharacterSets { + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseNationalCharacterSetsImpl.class); + + private final AutonomousDatabaseNationalCharacterSetsClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public AutonomousDatabaseNationalCharacterSetsImpl(AutonomousDatabaseNationalCharacterSetsClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocation(String location) { + PagedIterable inner + = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AutonomousDatabaseNationalCharacterSetImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner + = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new AutonomousDatabaseNationalCharacterSetImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String adbsncharsetname, + Context context) { + Response inner + = this.serviceClient().getWithResponse(location, adbsncharsetname, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AutonomousDatabaseNationalCharacterSetImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AutonomousDatabaseNationalCharacterSet get(String location, String adbsncharsetname) { + AutonomousDatabaseNationalCharacterSetInner inner = this.serviceClient().get(location, adbsncharsetname); + if (inner != null) { + return new AutonomousDatabaseNationalCharacterSetImpl(inner, this.manager()); + } else { + return null; + } + } + + private AutonomousDatabaseNationalCharacterSetsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseVersionsClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseVersionsClientImpl.java new file mode 100644 index 000000000000..32e75a41219a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseVersionsClientImpl.java @@ -0,0 +1,394 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.AutonomousDatabaseVersionsClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDbVersionInner; +import com.azure.resourcemanager.oracle.models.AutonomousDbVersionListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AutonomousDatabaseVersionsClient. + */ +public final class AutonomousDatabaseVersionsClientImpl implements AutonomousDatabaseVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final AutonomousDatabaseVersionsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of AutonomousDatabaseVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AutonomousDatabaseVersionsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(AutonomousDatabaseVersionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabaseVersions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface AutonomousDatabaseVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions") + @ExpectedResponses({ 200 }) + @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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @PathParam("autonomousdbversionsname") String autonomousdbversionsname, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List AutonomousDbVersion resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List AutonomousDbVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List AutonomousDbVersion resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List AutonomousDbVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * List AutonomousDbVersion resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(listByLocationAsync(location)); + } + + /** + * List AutonomousDbVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(listByLocationAsync(location, context)); + } + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, + String autonomousdbversionsname) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (autonomousdbversionsname == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdbversionsname is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, autonomousdbversionsname, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, + String autonomousdbversionsname, 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 (autonomousdbversionsname == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdbversionsname is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, autonomousdbversionsname, accept, context); + } + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String autonomousdbversionsname) { + return getWithResponseAsync(location, autonomousdbversionsname) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String autonomousdbversionsname, + Context context) { + return getWithResponseAsync(location, autonomousdbversionsname, context).block(); + } + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDbVersionInner get(String location, String autonomousdbversionsname) { + return getWithResponse(location, autonomousdbversionsname, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseVersionsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseVersionsImpl.java new file mode 100644 index 000000000000..e3b0f46ff6c9 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseVersionsImpl.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.AutonomousDatabaseVersionsClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDbVersionInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseVersions; +import com.azure.resourcemanager.oracle.models.AutonomousDbVersion; + +public final class AutonomousDatabaseVersionsImpl implements AutonomousDatabaseVersions { + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseVersionsImpl.class); + + private final AutonomousDatabaseVersionsClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public AutonomousDatabaseVersionsImpl(AutonomousDatabaseVersionsClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDbVersionImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDbVersionImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String autonomousdbversionsname, + Context context) { + Response inner + = this.serviceClient().getWithResponse(location, autonomousdbversionsname, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AutonomousDbVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AutonomousDbVersion get(String location, String autonomousdbversionsname) { + AutonomousDbVersionInner inner = this.serviceClient().get(location, autonomousdbversionsname); + if (inner != null) { + return new AutonomousDbVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + private AutonomousDatabaseVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseWalletFileImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseWalletFileImpl.java new file mode 100644 index 000000000000..d59da6f5f603 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabaseWalletFileImpl.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.oracle.implementation; + +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseWalletFileInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseWalletFile; + +public final class AutonomousDatabaseWalletFileImpl implements AutonomousDatabaseWalletFile { + private AutonomousDatabaseWalletFileInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + AutonomousDatabaseWalletFileImpl(AutonomousDatabaseWalletFileInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String walletFiles() { + return this.innerModel().walletFiles(); + } + + public AutonomousDatabaseWalletFileInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabasesClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabasesClientImpl.java new file mode 100644 index 000000000000..51a368a7ef2f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabasesClientImpl.java @@ -0,0 +1,1944 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.AutonomousDatabasesClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseInner; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseWalletFileInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseListResult; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseUpdate; +import com.azure.resourcemanager.oracle.models.GenerateAutonomousDatabaseWalletDetails; +import com.azure.resourcemanager.oracle.models.PeerDbDetails; +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 AutonomousDatabasesClient. + */ +public final class AutonomousDatabasesClientImpl implements AutonomousDatabasesClient { + /** + * The proxy service used to perform REST calls. + */ + private final AutonomousDatabasesService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of AutonomousDatabasesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AutonomousDatabasesClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(AutonomousDatabasesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerAutonomousDatabases to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface AutonomousDatabasesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases") + @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/autonomousDatabases/{autonomousdatabasename}") + @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("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @BodyParam("application/json") AutonomousDatabaseInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @BodyParam("application/json") AutonomousDatabaseUpdate properties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/failover") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> failover(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @BodyParam("application/json") PeerDbDetails body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> generateWallet(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @BodyParam("application/json") GenerateAutonomousDatabaseWalletDetails body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> switchover(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("autonomousdatabasename") String autonomousdatabasename, + @BodyParam("application/json") PeerDbDetails body, @HeaderParam("Accept") String accept, Context context); + + @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 AutonomousDatabase 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 AutonomousDatabase 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 AutonomousDatabase resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @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 AutonomousDatabase 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 AutonomousDatabase list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List AutonomousDatabase resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation 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 AutonomousDatabase 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 AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List AutonomousDatabase resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + 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 AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String autonomousdatabasename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context); + } + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String autonomousdatabasename) { + return getByResourceGroupWithResponseAsync(resourceGroupName, autonomousdatabasename) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String autonomousdatabasename, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, autonomousdatabasename, context).block(); + } + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner getByResourceGroup(String resourceGroupName, String autonomousdatabasename) { + return getByResourceGroupWithResponse(resourceGroupName, autonomousdatabasename, Context.NONE).getValue(); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, AutonomousDatabaseInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, resource, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, AutonomousDatabaseInner 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 (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, resource, accept, context); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> beginCreateOrUpdateAsync( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, autonomousdatabasename, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> beginCreateOrUpdateAsync( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, autonomousdatabasename, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> + beginCreateOrUpdate(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource).getSyncPoller(); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginCreateOrUpdate( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource, context) + .getSyncPoller(); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource) { + return createOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource).block(); + } + + /** + * Create a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner createOrUpdate(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, autonomousdatabasename, resource, context).block(); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, AutonomousDatabaseUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, AutonomousDatabaseUpdate 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 (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, autonomousdatabasename, properties, accept, context); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> + beginUpdateAsync(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, autonomousdatabasename, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> beginUpdateAsync( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, autonomousdatabasename, properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> + beginUpdate(String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties).getSyncPoller(); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> beginUpdate( + String resourceGroupName, String autonomousdatabasename, AutonomousDatabaseUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties, context).getSyncPoller(); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties) { + return beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, autonomousdatabasename, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner update(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties) { + return updateAsync(resourceGroupName, autonomousdatabasename, properties).block(); + } + + /** + * Update a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner update(String resourceGroupName, String autonomousdatabasename, + AutonomousDatabaseUpdate properties, Context context) { + return updateAsync(resourceGroupName, autonomousdatabasename, properties, context).block(); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String autonomousdatabasename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, autonomousdatabasename, accept, context); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String autonomousdatabasename) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String autonomousdatabasename, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, autonomousdatabasename, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename) { + return this.beginDeleteAsync(resourceGroupName, autonomousdatabasename).getSyncPoller(); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String autonomousdatabasename, + Context context) { + return this.beginDeleteAsync(resourceGroupName, autonomousdatabasename, context).getSyncPoller(); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename) { + return beginDeleteAsync(resourceGroupName, autonomousdatabasename).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String autonomousdatabasename, Context context) { + return beginDeleteAsync(resourceGroupName, autonomousdatabasename, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String autonomousdatabasename) { + deleteAsync(resourceGroupName, autonomousdatabasename).block(); + } + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 autonomousdatabasename, Context context) { + deleteAsync(resourceGroupName, autonomousdatabasename, context).block(); + } + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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>> failoverWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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.failover(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 failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> failoverWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails 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.failover(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, autonomousdatabasename, body, accept, context); + } + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> + beginFailoverAsync(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); + } + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> beginFailoverAsync( + String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = failoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + } + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> + beginFailover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + return this.beginFailoverAsync(resourceGroupName, autonomousdatabasename, body).getSyncPoller(); + } + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> + beginFailover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { + return this.beginFailoverAsync(resourceGroupName, autonomousdatabasename, body, context).getSyncPoller(); + } + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono failoverAsync(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body) { + return beginFailoverAsync(resourceGroupName, autonomousdatabasename, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono failoverAsync(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body, Context context) { + return beginFailoverAsync(resourceGroupName, autonomousdatabasename, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Perform failover action on Autonomous Database. + * + * @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 failover(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body) { + return failoverAsync(resourceGroupName, autonomousdatabasename, body).block(); + } + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context) { + return failoverAsync(resourceGroupName, autonomousdatabasename, body, context).block(); + } + + /** + * Generate wallet action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database Wallet File resource model along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateWalletWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body) { + 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.generateWallet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Generate wallet action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database Wallet File resource model along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateWalletWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (autonomousdatabasename == null) { + return Mono.error( + new IllegalArgumentException("Parameter autonomousdatabasename is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.generateWallet(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context); + } + + /** + * Generate wallet action on Autonomous Database. + * + * @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 Wallet File resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateWalletAsync(String resourceGroupName, + String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body) { + return generateWalletWithResponseAsync(resourceGroupName, autonomousdatabasename, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Generate wallet action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database Wallet File resource model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateWalletWithResponse(String resourceGroupName, + String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body, Context context) { + return generateWalletWithResponseAsync(resourceGroupName, autonomousdatabasename, body, context).block(); + } + + /** + * Generate wallet action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database Wallet File resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseWalletFileInner generateWallet(String resourceGroupName, String autonomousdatabasename, + GenerateAutonomousDatabaseWalletDetails body) { + return generateWalletWithResponse(resourceGroupName, autonomousdatabasename, body, Context.NONE).getValue(); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> switchoverWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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.switchover(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 switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> switchoverWithResponseAsync(String resourceGroupName, + String autonomousdatabasename, PeerDbDetails 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.switchover(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, autonomousdatabasename, body, accept, context); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> + beginSwitchoverAsync(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + Mono>> mono + = switchoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, + this.client.getContext()); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AutonomousDatabaseInner> beginSwitchoverAsync( + String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = switchoverWithResponseAsync(resourceGroupName, autonomousdatabasename, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), AutonomousDatabaseInner.class, AutonomousDatabaseInner.class, context); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AutonomousDatabaseInner> + beginSwitchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + return this.beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body).getSyncPoller(); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> + beginSwitchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, Context context) { + return this.beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body, context).getSyncPoller(); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono switchoverAsync(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body) { + return beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono switchoverAsync(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body, Context context) { + return beginSwitchoverAsync(resourceGroupName, autonomousdatabasename, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body) { + return switchoverAsync(resourceGroupName, autonomousdatabasename, body).block(); + } + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AutonomousDatabaseInner switchover(String resourceGroupName, String autonomousdatabasename, + PeerDbDetails body, Context context) { + return switchoverAsync(resourceGroupName, autonomousdatabasename, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase 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/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabasesImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabasesImpl.java new file mode 100644 index 000000000000..cf9bcb4806d1 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDatabasesImpl.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.AutonomousDatabasesClient; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseInner; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseWalletFileInner; +import com.azure.resourcemanager.oracle.models.AutonomousDatabase; +import com.azure.resourcemanager.oracle.models.AutonomousDatabases; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseWalletFile; +import com.azure.resourcemanager.oracle.models.GenerateAutonomousDatabaseWalletDetails; +import com.azure.resourcemanager.oracle.models.PeerDbDetails; + +public final class AutonomousDatabasesImpl implements AutonomousDatabases { + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabasesImpl.class); + + private final AutonomousDatabasesClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public AutonomousDatabasesImpl(AutonomousDatabasesClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AutonomousDatabaseImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String autonomousdatabasename, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, autonomousdatabasename, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AutonomousDatabaseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AutonomousDatabase getByResourceGroup(String resourceGroupName, String autonomousdatabasename) { + AutonomousDatabaseInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, autonomousdatabasename); + if (inner != null) { + return new AutonomousDatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String autonomousdatabasename) { + this.serviceClient().delete(resourceGroupName, autonomousdatabasename); + } + + public void delete(String resourceGroupName, String autonomousdatabasename, Context context) { + this.serviceClient().delete(resourceGroupName, autonomousdatabasename, context); + } + + public AutonomousDatabase failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + AutonomousDatabaseInner inner = this.serviceClient().failover(resourceGroupName, autonomousdatabasename, body); + if (inner != null) { + return new AutonomousDatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public AutonomousDatabase failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context) { + AutonomousDatabaseInner inner + = this.serviceClient().failover(resourceGroupName, autonomousdatabasename, body, context); + if (inner != null) { + return new AutonomousDatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response generateWalletWithResponse(String resourceGroupName, + String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body, Context context) { + Response inner + = this.serviceClient().generateWalletWithResponse(resourceGroupName, autonomousdatabasename, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AutonomousDatabaseWalletFileImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AutonomousDatabaseWalletFile generateWallet(String resourceGroupName, String autonomousdatabasename, + GenerateAutonomousDatabaseWalletDetails body) { + AutonomousDatabaseWalletFileInner inner + = this.serviceClient().generateWallet(resourceGroupName, autonomousdatabasename, body); + if (inner != null) { + return new AutonomousDatabaseWalletFileImpl(inner, this.manager()); + } else { + return null; + } + } + + public AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body) { + AutonomousDatabaseInner inner + = this.serviceClient().switchover(resourceGroupName, autonomousdatabasename, body); + if (inner != null) { + return new AutonomousDatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context) { + AutonomousDatabaseInner inner + = this.serviceClient().switchover(resourceGroupName, autonomousdatabasename, body, context); + if (inner != null) { + return new AutonomousDatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public AutonomousDatabase 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 autonomousdatabasename = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabases"); + if (autonomousdatabasename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabases'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, autonomousdatabasename, 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 autonomousdatabasename = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabases"); + if (autonomousdatabasename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabases'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, autonomousdatabasename, 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 autonomousdatabasename = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabases"); + if (autonomousdatabasename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabases'.", id))); + } + this.delete(resourceGroupName, autonomousdatabasename, 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 autonomousdatabasename = ResourceManagerUtils.getValueFromIdByName(id, "autonomousDatabases"); + if (autonomousdatabasename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'autonomousDatabases'.", id))); + } + this.delete(resourceGroupName, autonomousdatabasename, context); + } + + private AutonomousDatabasesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + public AutonomousDatabaseImpl define(String name) { + return new AutonomousDatabaseImpl(name, this.manager()); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDbVersionImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDbVersionImpl.java new file mode 100644 index 000000000000..352d8f65eda8 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/AutonomousDbVersionImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDbVersionInner; +import com.azure.resourcemanager.oracle.models.AutonomousDbVersion; +import com.azure.resourcemanager.oracle.models.AutonomousDbVersionProperties; + +public final class AutonomousDbVersionImpl implements AutonomousDbVersion { + private AutonomousDbVersionInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + AutonomousDbVersionImpl(AutonomousDbVersionInner innerObject, + com.azure.resourcemanager.oracle.OracleManager 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 AutonomousDbVersionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AutonomousDbVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudAccountDetailsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudAccountDetailsImpl.java new file mode 100644 index 000000000000..9a437d4998a1 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudAccountDetailsImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.resourcemanager.oracle.fluent.models.CloudAccountDetailsInner; +import com.azure.resourcemanager.oracle.models.CloudAccountDetails; + +public final class CloudAccountDetailsImpl implements CloudAccountDetails { + private CloudAccountDetailsInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + CloudAccountDetailsImpl(CloudAccountDetailsInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String cloudAccountName() { + return this.innerModel().cloudAccountName(); + } + + public String cloudAccountHomeRegion() { + return this.innerModel().cloudAccountHomeRegion(); + } + + public CloudAccountDetailsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructureImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructureImpl.java new file mode 100644 index 000000000000..a36dc7464f53 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructureImpl.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.CloudExadataInfrastructureInner; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructure; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureProperties; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureUpdate; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureUpdateProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class CloudExadataInfrastructureImpl + implements CloudExadataInfrastructure, CloudExadataInfrastructure.Definition, CloudExadataInfrastructure.Update { + private CloudExadataInfrastructureInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager 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 CloudExadataInfrastructureProperties 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 CloudExadataInfrastructureInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String cloudexadatainfrastructurename; + + private CloudExadataInfrastructureUpdate updateProperties; + + public CloudExadataInfrastructureImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public CloudExadataInfrastructure create() { + this.innerObject = serviceManager.serviceClient() + .getCloudExadataInfrastructures() + .createOrUpdate(resourceGroupName, cloudexadatainfrastructurename, this.innerModel(), Context.NONE); + return this; + } + + public CloudExadataInfrastructure create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCloudExadataInfrastructures() + .createOrUpdate(resourceGroupName, cloudexadatainfrastructurename, this.innerModel(), context); + return this; + } + + CloudExadataInfrastructureImpl(String name, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = new CloudExadataInfrastructureInner(); + this.serviceManager = serviceManager; + this.cloudexadatainfrastructurename = name; + } + + public CloudExadataInfrastructureImpl update() { + this.updateProperties = new CloudExadataInfrastructureUpdate(); + return this; + } + + public CloudExadataInfrastructure apply() { + this.innerObject = serviceManager.serviceClient() + .getCloudExadataInfrastructures() + .update(resourceGroupName, cloudexadatainfrastructurename, updateProperties, Context.NONE); + return this; + } + + public CloudExadataInfrastructure apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCloudExadataInfrastructures() + .update(resourceGroupName, cloudexadatainfrastructurename, updateProperties, context); + return this; + } + + CloudExadataInfrastructureImpl(CloudExadataInfrastructureInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.cloudexadatainfrastructurename + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "cloudExadataInfrastructures"); + } + + public CloudExadataInfrastructure refresh() { + this.innerObject = serviceManager.serviceClient() + .getCloudExadataInfrastructures() + .getByResourceGroupWithResponse(resourceGroupName, cloudexadatainfrastructurename, Context.NONE) + .getValue(); + return this; + } + + public CloudExadataInfrastructure refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCloudExadataInfrastructures() + .getByResourceGroupWithResponse(resourceGroupName, cloudexadatainfrastructurename, context) + .getValue(); + return this; + } + + public CloudExadataInfrastructure addStorageCapacity() { + return serviceManager.cloudExadataInfrastructures() + .addStorageCapacity(resourceGroupName, cloudexadatainfrastructurename); + } + + public CloudExadataInfrastructure addStorageCapacity(Context context) { + return serviceManager.cloudExadataInfrastructures() + .addStorageCapacity(resourceGroupName, cloudexadatainfrastructurename, context); + } + + public CloudExadataInfrastructureImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public CloudExadataInfrastructureImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public CloudExadataInfrastructureImpl withZones(List zones) { + if (isInCreateMode()) { + this.innerModel().withZones(zones); + return this; + } else { + this.updateProperties.withZones(zones); + return this; + } + } + + public CloudExadataInfrastructureImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public CloudExadataInfrastructureImpl withProperties(CloudExadataInfrastructureProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public CloudExadataInfrastructureImpl withProperties(CloudExadataInfrastructureUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructuresClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructuresClientImpl.java new file mode 100644 index 000000000000..19fe73a054c2 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructuresClientImpl.java @@ -0,0 +1,1561 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.CloudExadataInfrastructuresClient; +import com.azure.resourcemanager.oracle.fluent.models.CloudExadataInfrastructureInner; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureListResult; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureUpdate; +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 CloudExadataInfrastructuresClient. + */ +public final class CloudExadataInfrastructuresClientImpl implements CloudExadataInfrastructuresClient { + /** + * The proxy service used to perform REST calls. + */ + private final CloudExadataInfrastructuresService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of CloudExadataInfrastructuresClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CloudExadataInfrastructuresClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(CloudExadataInfrastructuresService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerCloudExadataInfrastructures to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface CloudExadataInfrastructuresService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures") + @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/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @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("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @BodyParam("application/json") CloudExadataInfrastructureInner resource, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @BodyParam("application/json") CloudExadataInfrastructureUpdate properties, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> addStorageCapacity(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> 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 CloudExadataInfrastructure resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation 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 CloudExadataInfrastructure resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List CloudExadataInfrastructure resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List CloudExadataInfrastructure resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List CloudExadataInfrastructure resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List CloudExadataInfrastructure resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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 CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String cloudexadatainfrastructurename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String cloudexadatainfrastructurename, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context); + } + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, context).block(); + } + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudExadataInfrastructureInner getByResourceGroup(String resourceGroupName, + String cloudexadatainfrastructurename) { + return getByResourceGroupWithResponse(resourceGroupName, cloudexadatainfrastructurename, Context.NONE) + .getValue(); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + 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, cloudexadatainfrastructurename, resource, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner 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 (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } 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, cloudexadatainfrastructurename, resource, accept, + context); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudExadataInfrastructureInner> + beginCreateOrUpdateAsync(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, + this.client.getContext()); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudExadataInfrastructureInner> + beginCreateOrUpdateAsync(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, + context); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudExadataInfrastructureInner> beginCreateOrUpdate( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource) + .getSyncPoller(); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudExadataInfrastructureInner> beginCreateOrUpdate( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource, context) + .getSyncPoller(); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource) { + return createOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource).block(); + } + + /** + * Create a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudExadataInfrastructureInner createOrUpdate(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, resource, context).block(); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + 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, cloudexadatainfrastructurename, properties, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate 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 (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } 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, cloudexadatainfrastructurename, properties, accept, context); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudExadataInfrastructureInner> beginUpdateAsync( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, + this.client.getContext()); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudExadataInfrastructureInner> beginUpdateAsync( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, + context); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudExadataInfrastructureInner> beginUpdate( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, properties).getSyncPoller(); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudExadataInfrastructureInner> beginUpdate( + String resourceGroupName, String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, + Context context) { + return this.beginUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, properties, context) + .getSyncPoller(); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties) { + return beginUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, + String cloudexadatainfrastructurename, CloudExadataInfrastructureUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, cloudexadatainfrastructurename, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudExadataInfrastructureInner update(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureUpdate properties) { + return updateAsync(resourceGroupName, cloudexadatainfrastructurename, properties).block(); + } + + /** + * Update a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudExadataInfrastructureInner update(String resourceGroupName, String cloudexadatainfrastructurename, + CloudExadataInfrastructureUpdate properties, Context context) { + return updateAsync(resourceGroupName, cloudexadatainfrastructurename, properties, context).block(); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 cloudexadatainfrastructurename, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudexadatainfrastructurename, accept, context); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 cloudexadatainfrastructurename, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, + String cloudexadatainfrastructurename) { + return this.beginDeleteAsync(resourceGroupName, cloudexadatainfrastructurename).getSyncPoller(); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 cloudexadatainfrastructurename, Context context) { + return this.beginDeleteAsync(resourceGroupName, cloudexadatainfrastructurename, context).getSyncPoller(); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String cloudexadatainfrastructurename) { + return beginDeleteAsync(resourceGroupName, cloudexadatainfrastructurename).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { + return beginDeleteAsync(resourceGroupName, cloudexadatainfrastructurename, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String cloudexadatainfrastructurename) { + deleteAsync(resourceGroupName, cloudexadatainfrastructurename).block(); + } + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { + deleteAsync(resourceGroupName, cloudexadatainfrastructurename, context).block(); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addStorageCapacityWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.addStorageCapacity(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addStorageCapacityWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.addStorageCapacity(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudExadataInfrastructureInner> + beginAddStorageCapacityAsync(String resourceGroupName, String cloudexadatainfrastructurename) { + Mono>> mono + = addStorageCapacityWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, + this.client.getContext()); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudExadataInfrastructureInner> + beginAddStorageCapacityAsync(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = addStorageCapacityWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudExadataInfrastructureInner.class, CloudExadataInfrastructureInner.class, + context); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudExadataInfrastructureInner> + beginAddStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename) { + return this.beginAddStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename).getSyncPoller(); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudExadataInfrastructureInner> + beginAddStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { + return this.beginAddStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename, context) + .getSyncPoller(); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addStorageCapacityAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + return beginAddStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addStorageCapacityAsync(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + return beginAddStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupName, + String cloudexadatainfrastructurename) { + return addStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename).block(); + } + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudExadataInfrastructureInner addStorageCapacity(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + return addStorageCapacityAsync(resourceGroupName, cloudexadatainfrastructurename, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure 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/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructuresImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructuresImpl.java new file mode 100644 index 000000000000..6e0088a6c9c8 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudExadataInfrastructuresImpl.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.CloudExadataInfrastructuresClient; +import com.azure.resourcemanager.oracle.fluent.models.CloudExadataInfrastructureInner; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructure; +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructures; + +public final class CloudExadataInfrastructuresImpl implements CloudExadataInfrastructures { + private static final ClientLogger LOGGER = new ClientLogger(CloudExadataInfrastructuresImpl.class); + + private final CloudExadataInfrastructuresClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public CloudExadataInfrastructuresImpl(CloudExadataInfrastructuresClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new CloudExadataInfrastructureImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + Response inner = this.serviceClient() + .getByResourceGroupWithResponse(resourceGroupName, cloudexadatainfrastructurename, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CloudExadataInfrastructureImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CloudExadataInfrastructure getByResourceGroup(String resourceGroupName, + String cloudexadatainfrastructurename) { + CloudExadataInfrastructureInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, cloudexadatainfrastructurename); + if (inner != null) { + return new CloudExadataInfrastructureImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename) { + this.serviceClient().delete(resourceGroupName, cloudexadatainfrastructurename); + } + + public void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context) { + this.serviceClient().delete(resourceGroupName, cloudexadatainfrastructurename, context); + } + + public CloudExadataInfrastructure addStorageCapacity(String resourceGroupName, + String cloudexadatainfrastructurename) { + CloudExadataInfrastructureInner inner + = this.serviceClient().addStorageCapacity(resourceGroupName, cloudexadatainfrastructurename); + if (inner != null) { + return new CloudExadataInfrastructureImpl(inner, this.manager()); + } else { + return null; + } + } + + public CloudExadataInfrastructure addStorageCapacity(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + CloudExadataInfrastructureInner inner + = this.serviceClient().addStorageCapacity(resourceGroupName, cloudexadatainfrastructurename, context); + if (inner != null) { + return new CloudExadataInfrastructureImpl(inner, this.manager()); + } else { + return null; + } + } + + public CloudExadataInfrastructure 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 cloudexadatainfrastructurename + = ResourceManagerUtils.getValueFromIdByName(id, "cloudExadataInfrastructures"); + if (cloudexadatainfrastructurename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'cloudExadataInfrastructures'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, cloudexadatainfrastructurename, 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 cloudexadatainfrastructurename + = ResourceManagerUtils.getValueFromIdByName(id, "cloudExadataInfrastructures"); + if (cloudexadatainfrastructurename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'cloudExadataInfrastructures'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, cloudexadatainfrastructurename, 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 cloudexadatainfrastructurename + = ResourceManagerUtils.getValueFromIdByName(id, "cloudExadataInfrastructures"); + if (cloudexadatainfrastructurename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'cloudExadataInfrastructures'.", id))); + } + this.delete(resourceGroupName, cloudexadatainfrastructurename, 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 cloudexadatainfrastructurename + = ResourceManagerUtils.getValueFromIdByName(id, "cloudExadataInfrastructures"); + if (cloudexadatainfrastructurename == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'cloudExadataInfrastructures'.", id))); + } + this.delete(resourceGroupName, cloudexadatainfrastructurename, context); + } + + private CloudExadataInfrastructuresClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + public CloudExadataInfrastructureImpl define(String name) { + return new CloudExadataInfrastructureImpl(name, this.manager()); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClusterImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClusterImpl.java new file mode 100644 index 000000000000..90805035a90c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClusterImpl.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.CloudVmClusterInner; +import com.azure.resourcemanager.oracle.models.AddRemoveDbNode; +import com.azure.resourcemanager.oracle.models.CloudVmCluster; +import com.azure.resourcemanager.oracle.models.CloudVmClusterProperties; +import com.azure.resourcemanager.oracle.models.CloudVmClusterUpdate; +import com.azure.resourcemanager.oracle.models.CloudVmClusterUpdateProperties; +import com.azure.resourcemanager.oracle.models.PrivateIpAddressesFilter; +import com.azure.resourcemanager.oracle.models.PrivateIpAddressProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class CloudVmClusterImpl implements CloudVmCluster, CloudVmCluster.Definition, CloudVmCluster.Update { + private CloudVmClusterInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager 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 CloudVmClusterProperties properties() { + return this.innerModel().properties(); + } + + 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 CloudVmClusterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String cloudvmclustername; + + private CloudVmClusterUpdate updateProperties; + + public CloudVmClusterImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public CloudVmCluster create() { + this.innerObject = serviceManager.serviceClient() + .getCloudVmClusters() + .createOrUpdate(resourceGroupName, cloudvmclustername, this.innerModel(), Context.NONE); + return this; + } + + public CloudVmCluster create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCloudVmClusters() + .createOrUpdate(resourceGroupName, cloudvmclustername, this.innerModel(), context); + return this; + } + + CloudVmClusterImpl(String name, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = new CloudVmClusterInner(); + this.serviceManager = serviceManager; + this.cloudvmclustername = name; + } + + public CloudVmClusterImpl update() { + this.updateProperties = new CloudVmClusterUpdate(); + return this; + } + + public CloudVmCluster apply() { + this.innerObject = serviceManager.serviceClient() + .getCloudVmClusters() + .update(resourceGroupName, cloudvmclustername, updateProperties, Context.NONE); + return this; + } + + public CloudVmCluster apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCloudVmClusters() + .update(resourceGroupName, cloudvmclustername, updateProperties, context); + return this; + } + + CloudVmClusterImpl(CloudVmClusterInner innerObject, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "cloudVmClusters"); + } + + public CloudVmCluster refresh() { + this.innerObject = serviceManager.serviceClient() + .getCloudVmClusters() + .getByResourceGroupWithResponse(resourceGroupName, cloudvmclustername, Context.NONE) + .getValue(); + return this; + } + + public CloudVmCluster refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCloudVmClusters() + .getByResourceGroupWithResponse(resourceGroupName, cloudvmclustername, context) + .getValue(); + return this; + } + + public CloudVmCluster addVms(AddRemoveDbNode body) { + return serviceManager.cloudVmClusters().addVms(resourceGroupName, cloudvmclustername, body); + } + + public CloudVmCluster addVms(AddRemoveDbNode body, Context context) { + return serviceManager.cloudVmClusters().addVms(resourceGroupName, cloudvmclustername, body, context); + } + + public Response> listPrivateIpAddressesWithResponse(PrivateIpAddressesFilter body, + Context context) { + return serviceManager.cloudVmClusters() + .listPrivateIpAddressesWithResponse(resourceGroupName, cloudvmclustername, body, context); + } + + public List listPrivateIpAddresses(PrivateIpAddressesFilter body) { + return serviceManager.cloudVmClusters().listPrivateIpAddresses(resourceGroupName, cloudvmclustername, body); + } + + public CloudVmCluster removeVms(AddRemoveDbNode body) { + return serviceManager.cloudVmClusters().removeVms(resourceGroupName, cloudvmclustername, body); + } + + public CloudVmCluster removeVms(AddRemoveDbNode body, Context context) { + return serviceManager.cloudVmClusters().removeVms(resourceGroupName, cloudvmclustername, body, context); + } + + public CloudVmClusterImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public CloudVmClusterImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public CloudVmClusterImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } + } + + public CloudVmClusterImpl withProperties(CloudVmClusterProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public CloudVmClusterImpl withProperties(CloudVmClusterUpdateProperties properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClustersClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClustersClientImpl.java new file mode 100644 index 000000000000..cbae40a53d54 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClustersClientImpl.java @@ -0,0 +1,1934 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.CloudVmClustersClient; +import com.azure.resourcemanager.oracle.fluent.models.CloudVmClusterInner; +import com.azure.resourcemanager.oracle.fluent.models.PrivateIpAddressPropertiesInner; +import com.azure.resourcemanager.oracle.models.AddRemoveDbNode; +import com.azure.resourcemanager.oracle.models.CloudVmClusterListResult; +import com.azure.resourcemanager.oracle.models.CloudVmClusterUpdate; +import com.azure.resourcemanager.oracle.models.PrivateIpAddressesFilter; +import java.nio.ByteBuffer; +import java.util.List; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in CloudVmClustersClient. + */ +public final class CloudVmClustersClientImpl implements CloudVmClustersClient { + /** + * The proxy service used to perform REST calls. + */ + private final CloudVmClustersService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of CloudVmClustersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CloudVmClustersClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(CloudVmClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerCloudVmClusters to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface CloudVmClustersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters") + @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/cloudVmClusters/{cloudvmclustername}") + @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("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, + @BodyParam("application/json") CloudVmClusterInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, + @BodyParam("application/json") CloudVmClusterUpdate properties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> addVms(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, + @BodyParam("application/json") AddRemoveDbNode body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> listPrivateIpAddresses( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, + @BodyParam("application/json") PrivateIpAddressesFilter body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/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("cloudvmclustername") String cloudvmclustername, + @BodyParam("application/json") AddRemoveDbNode 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 CloudVmCluster 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 CloudVmCluster 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 CloudVmCluster resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @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 CloudVmCluster 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 CloudVmCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List CloudVmCluster resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation 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 CloudVmCluster 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 CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List CloudVmCluster resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @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 CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @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 CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String cloudvmclustername) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String cloudvmclustername, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context); + } + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String cloudvmclustername) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cloudvmclustername) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudvmclustername, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, cloudvmclustername, context).block(); + } + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner getByResourceGroup(String resourceGroupName, String cloudvmclustername) { + return getByResourceGroupWithResponse(resourceGroupName, cloudvmclustername, Context.NONE).getValue(); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (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, cloudvmclustername, resource, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterInner 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 (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, resource, accept, context); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> + beginCreateOrUpdateAsync(String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, cloudvmclustername, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> beginCreateOrUpdateAsync( + String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, cloudvmclustername, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, context); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> + beginCreateOrUpdate(String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource).getSyncPoller(); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginCreateOrUpdate( + String resourceGroupName, String cloudvmclustername, CloudVmClusterInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource, context).getSyncPoller(); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource) { + return createOrUpdateAsync(resourceGroupName, cloudvmclustername, resource).block(); + } + + /** + * Create a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + CloudVmClusterInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, cloudvmclustername, resource, context).block(); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate 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 (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudvmclustername, properties, accept, context); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> beginUpdateAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, cloudvmclustername, properties); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> beginUpdateAsync(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, cloudvmclustername, properties, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, context); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginUpdate(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties) { + return this.beginUpdateAsync(resourceGroupName, cloudvmclustername, properties).getSyncPoller(); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginUpdate(String resourceGroupName, + String cloudvmclustername, CloudVmClusterUpdate properties, Context context) { + return this.beginUpdateAsync(resourceGroupName, cloudvmclustername, properties, context).getSyncPoller(); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties) { + return beginUpdateAsync(resourceGroupName, cloudvmclustername, properties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties, Context context) { + return beginUpdateAsync(resourceGroupName, cloudvmclustername, properties, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner update(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties) { + return updateAsync(resourceGroupName, cloudvmclustername, properties).block(); + } + + /** + * Update a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner update(String resourceGroupName, String cloudvmclustername, + CloudVmClusterUpdate properties, Context context) { + return updateAsync(resourceGroupName, cloudvmclustername, properties, context).block(); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String cloudvmclustername) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String cloudvmclustername, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudvmclustername, accept, context); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudvmclustername); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, cloudvmclustername, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername) { + return this.beginDeleteAsync(resourceGroupName, cloudvmclustername).getSyncPoller(); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, + Context context) { + return this.beginDeleteAsync(resourceGroupName, cloudvmclustername, context).getSyncPoller(); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String cloudvmclustername) { + return beginDeleteAsync(resourceGroupName, cloudvmclustername).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String cloudvmclustername, Context context) { + return beginDeleteAsync(resourceGroupName, cloudvmclustername, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String cloudvmclustername) { + deleteAsync(resourceGroupName, cloudvmclustername).block(); + } + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String cloudvmclustername, Context context) { + deleteAsync(resourceGroupName, cloudvmclustername, context).block(); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addVmsWithResponseAsync(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.addVms(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addVmsWithResponseAsync(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.addVms(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudvmclustername, body, accept, context); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> beginAddVmsAsync(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body) { + Mono>> mono = addVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> beginAddVmsAsync(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = addVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, context); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body) { + return this.beginAddVmsAsync(resourceGroupName, cloudvmclustername, body).getSyncPoller(); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginAddVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context) { + return this.beginAddVmsAsync(resourceGroupName, cloudvmclustername, body, context).getSyncPoller(); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addVmsAsync(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body) { + return beginAddVmsAsync(resourceGroupName, cloudvmclustername, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addVmsAsync(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body, Context context) { + return beginAddVmsAsync(resourceGroupName, cloudvmclustername, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + return addVmsAsync(resourceGroupName, cloudvmclustername, body).block(); + } + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context) { + return addVmsAsync(resourceGroupName, cloudvmclustername, body, context).block(); + } + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listPrivateIpAddressesWithResponseAsync( + String resourceGroupName, String cloudvmclustername, PrivateIpAddressesFilter body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listPrivateIpAddresses(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listPrivateIpAddressesWithResponseAsync( + String resourceGroupName, String cloudvmclustername, PrivateIpAddressesFilter body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listPrivateIpAddresses(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context); + } + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPrivateIpAddressesAsync(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body) { + return listPrivateIpAddressesWithResponseAsync(resourceGroupName, cloudvmclustername, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listPrivateIpAddressesWithResponse(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body, Context context) { + return listPrivateIpAddressesWithResponseAsync(resourceGroupName, cloudvmclustername, body, context).block(); + } + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listPrivateIpAddresses(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body) { + return listPrivateIpAddressesWithResponse(resourceGroupName, cloudvmclustername, body, Context.NONE).getValue(); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> removeVmsWithResponseAsync(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.removeVms(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, 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 cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> removeVmsWithResponseAsync(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.removeVms(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, body, accept, context); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> + beginRemoveVmsAsync(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + Mono>> mono = removeVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, this.client.getContext()); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudVmClusterInner> beginRemoveVmsAsync( + String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = removeVmsWithResponseAsync(resourceGroupName, cloudvmclustername, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudVmClusterInner.class, CloudVmClusterInner.class, context); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body) { + return this.beginRemoveVmsAsync(resourceGroupName, cloudvmclustername, body).getSyncPoller(); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudVmClusterInner> beginRemoveVms(String resourceGroupName, + String cloudvmclustername, AddRemoveDbNode body, Context context) { + return this.beginRemoveVmsAsync(resourceGroupName, cloudvmclustername, body, context).getSyncPoller(); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono removeVmsAsync(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body) { + return beginRemoveVmsAsync(resourceGroupName, cloudvmclustername, 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 cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono removeVmsAsync(String resourceGroupName, String cloudvmclustername, + AddRemoveDbNode body, Context context) { + return beginRemoveVmsAsync(resourceGroupName, cloudvmclustername, 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 cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + return removeVmsAsync(resourceGroupName, cloudvmclustername, body).block(); + } + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudVmClusterInner removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context) { + return removeVmsAsync(resourceGroupName, cloudvmclustername, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster 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/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClustersImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClustersImpl.java new file mode 100644 index 000000000000..eb82d18f3309 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/CloudVmClustersImpl.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.CloudVmClustersClient; +import com.azure.resourcemanager.oracle.fluent.models.CloudVmClusterInner; +import com.azure.resourcemanager.oracle.fluent.models.PrivateIpAddressPropertiesInner; +import com.azure.resourcemanager.oracle.models.AddRemoveDbNode; +import com.azure.resourcemanager.oracle.models.CloudVmCluster; +import com.azure.resourcemanager.oracle.models.CloudVmClusters; +import com.azure.resourcemanager.oracle.models.PrivateIpAddressesFilter; +import com.azure.resourcemanager.oracle.models.PrivateIpAddressProperties; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class CloudVmClustersImpl implements CloudVmClusters { + private static final ClientLogger LOGGER = new ClientLogger(CloudVmClustersImpl.class); + + private final CloudVmClustersClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public CloudVmClustersImpl(CloudVmClustersClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudVmClusterImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, cloudvmclustername, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CloudVmClusterImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CloudVmCluster getByResourceGroup(String resourceGroupName, String cloudvmclustername) { + CloudVmClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, cloudvmclustername); + if (inner != null) { + return new CloudVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String cloudvmclustername) { + this.serviceClient().delete(resourceGroupName, cloudvmclustername); + } + + public void delete(String resourceGroupName, String cloudvmclustername, Context context) { + this.serviceClient().delete(resourceGroupName, cloudvmclustername, context); + } + + public CloudVmCluster addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + CloudVmClusterInner inner = this.serviceClient().addVms(resourceGroupName, cloudvmclustername, body); + if (inner != null) { + return new CloudVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public CloudVmCluster addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context) { + CloudVmClusterInner inner = this.serviceClient().addVms(resourceGroupName, cloudvmclustername, body, context); + if (inner != null) { + return new CloudVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response> listPrivateIpAddressesWithResponse(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body, Context context) { + Response> inner = this.serviceClient() + .listPrivateIpAddressesWithResponse(resourceGroupName, cloudvmclustername, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + inner.getValue() + .stream() + .map(inner1 -> new PrivateIpAddressPropertiesImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public List listPrivateIpAddresses(String resourceGroupName, String cloudvmclustername, + PrivateIpAddressesFilter body) { + List inner + = this.serviceClient().listPrivateIpAddresses(resourceGroupName, cloudvmclustername, body); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateIpAddressPropertiesImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body) { + CloudVmClusterInner inner = this.serviceClient().removeVms(resourceGroupName, cloudvmclustername, body); + if (inner != null) { + return new CloudVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context) { + CloudVmClusterInner inner + = this.serviceClient().removeVms(resourceGroupName, cloudvmclustername, body, context); + if (inner != null) { + return new CloudVmClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public CloudVmCluster getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(id, "cloudVmClusters"); + if (cloudvmclustername == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudVmClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, cloudvmclustername, 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 cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(id, "cloudVmClusters"); + if (cloudvmclustername == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudVmClusters'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, cloudvmclustername, 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 cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(id, "cloudVmClusters"); + if (cloudvmclustername == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudVmClusters'.", id))); + } + this.delete(resourceGroupName, cloudvmclustername, 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 cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(id, "cloudVmClusters"); + if (cloudvmclustername == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudVmClusters'.", id))); + } + this.delete(resourceGroupName, cloudvmclustername, context); + } + + private CloudVmClustersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + public CloudVmClusterImpl define(String name) { + return new CloudVmClusterImpl(name, this.manager()); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodeImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodeImpl.java new file mode 100644 index 000000000000..c2f429fca5db --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodeImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DbNodeInner; +import com.azure.resourcemanager.oracle.models.DbNode; +import com.azure.resourcemanager.oracle.models.DbNodeProperties; + +public final class DbNodeImpl implements DbNode { + private DbNodeInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + DbNodeImpl(DbNodeInner innerObject, com.azure.resourcemanager.oracle.OracleManager 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 DbNodeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DbNodeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodesClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodesClientImpl.java new file mode 100644 index 000000000000..3125dca196fc --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodesClientImpl.java @@ -0,0 +1,696 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.DbNodesClient; +import com.azure.resourcemanager.oracle.fluent.models.DbNodeInner; +import com.azure.resourcemanager.oracle.models.DbNodeAction; +import com.azure.resourcemanager.oracle.models.DbNodeListResult; +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 DbNodesClient. + */ +public final class DbNodesClientImpl implements DbNodesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DbNodesService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of DbNodesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DbNodesClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(DbNodesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerDbNodes to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface DbNodesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudVmCluster(@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, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @PathParam("dbnodeocid") String dbnodeocid, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> action(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, @PathParam("dbnodeocid") String dbnodeocid, + @BodyParam("application/json") DbNodeAction body, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudVmClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudVmClusterSinglePageAsync(String resourceGroupName, + String cloudvmclustername) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudVmClusterSinglePageAsync(String resourceGroupName, + String cloudvmclustername, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a 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)); + } + + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, String cloudvmclustername, + Context context) { + return new PagedFlux<>( + () -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername, context), + nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a 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)); + } + + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context) { + return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername, context)); + } + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String cloudvmclustername, + String dbnodeocid) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (dbnodeocid == null) { + return Mono.error(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, dbnodeocid, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String cloudvmclustername, + String dbnodeocid, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (dbnodeocid == null) { + return Mono.error(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudvmclustername, dbnodeocid, accept, context); + } + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String cloudvmclustername, String dbnodeocid) { + return getWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + Context context) { + return getWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid, context).block(); + } + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbNodeInner get(String resourceGroupName, String cloudvmclustername, String dbnodeocid) { + return getWithResponse(resourceGroupName, cloudvmclustername, dbnodeocid, Context.NONE).getValue(); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> actionWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String dbnodeocid, DbNodeAction body) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (dbnodeocid == null) { + return Mono.error(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.action(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, dbnodeocid, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> actionWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String dbnodeocid, 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 (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (dbnodeocid == null) { + return Mono.error(new IllegalArgumentException("Parameter dbnodeocid is required and cannot be null.")); + } + 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, cloudvmclustername, dbnodeocid, body, accept, context); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DbNodeInner> beginActionAsync(String resourceGroupName, + String cloudvmclustername, String dbnodeocid, DbNodeAction body) { + Mono>> mono + = actionWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DbNodeInner.class, DbNodeInner.class, this.client.getContext()); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DbNodeInner> beginActionAsync(String resourceGroupName, + String cloudvmclustername, String dbnodeocid, DbNodeAction body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = actionWithResponseAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DbNodeInner.class, DbNodeInner.class, context); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DbNodeInner> beginAction(String resourceGroupName, + String cloudvmclustername, String dbnodeocid, DbNodeAction body) { + return this.beginActionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body).getSyncPoller(); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DbNodeInner> beginAction(String resourceGroupName, + String cloudvmclustername, String dbnodeocid, DbNodeAction body, Context context) { + return this.beginActionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body, context).getSyncPoller(); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono actionAsync(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + DbNodeAction body) { + return beginActionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono actionAsync(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + DbNodeAction body, Context context) { + return beginActionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbNodeInner action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + DbNodeAction body) { + return actionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body).block(); + } + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbNodeInner action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body, + Context context) { + return actionAsync(resourceGroupName, cloudvmclustername, dbnodeocid, body, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudVmClusterNextSinglePageAsync(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.listByCloudVmClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudVmClusterNextSinglePageAsync(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.listByCloudVmClusterNext(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/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodesImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodesImpl.java new file mode 100644 index 000000000000..5fd4912a631f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbNodesImpl.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.DbNodesClient; +import com.azure.resourcemanager.oracle.fluent.models.DbNodeInner; +import com.azure.resourcemanager.oracle.models.DbNode; +import com.azure.resourcemanager.oracle.models.DbNodeAction; +import com.azure.resourcemanager.oracle.models.DbNodes; + +public final class DbNodesImpl implements DbNodes { + private static final ClientLogger LOGGER = new ClientLogger(DbNodesImpl.class); + + private final DbNodesClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public DbNodesImpl(DbNodesClient innerClient, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername) { + PagedIterable inner + = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbNodeImpl(inner1, this.manager())); + } + + public PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context) { + PagedIterable inner + = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbNodeImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, cloudvmclustername, dbnodeocid, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DbNodeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DbNode get(String resourceGroupName, String cloudvmclustername, String dbnodeocid) { + DbNodeInner inner = this.serviceClient().get(resourceGroupName, cloudvmclustername, dbnodeocid); + if (inner != null) { + return new DbNodeImpl(inner, this.manager()); + } else { + return null; + } + } + + public DbNode action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body) { + DbNodeInner inner = this.serviceClient().action(resourceGroupName, cloudvmclustername, dbnodeocid, body); + if (inner != null) { + return new DbNodeImpl(inner, this.manager()); + } else { + return null; + } + } + + public DbNode action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body, + Context context) { + DbNodeInner inner + = this.serviceClient().action(resourceGroupName, cloudvmclustername, dbnodeocid, body, context); + if (inner != null) { + return new DbNodeImpl(inner, this.manager()); + } else { + return null; + } + } + + private DbNodesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServerImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServerImpl.java new file mode 100644 index 000000000000..13b9aae4356f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServerImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DbServerInner; +import com.azure.resourcemanager.oracle.models.DbServer; +import com.azure.resourcemanager.oracle.models.DbServerProperties; + +public final class DbServerImpl implements DbServer { + private DbServerInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + DbServerImpl(DbServerInner innerObject, com.azure.resourcemanager.oracle.OracleManager 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 DbServerProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DbServerInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServersClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServersClientImpl.java new file mode 100644 index 000000000000..cc66c33e5097 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServersClientImpl.java @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.DbServersClient; +import com.azure.resourcemanager.oracle.fluent.models.DbServerInner; +import com.azure.resourcemanager.oracle.models.DbServerListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DbServersClient. + */ +public final class DbServersClientImpl implements DbServersClient { + /** + * The proxy service used to perform REST calls. + */ + private final DbServersService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of DbServersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DbServersClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(DbServersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerDbServers to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface DbServersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudExadataInfrastructure(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}") + @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("cloudexadatainfrastructurename") String cloudexadatainfrastructurename, + @PathParam("dbserverocid") String dbserverocid, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudExadataInfrastructureNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudExadataInfrastructureSinglePageAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCloudExadataInfrastructure(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + cloudexadatainfrastructurename, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudExadataInfrastructureSinglePageAsync(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCloudExadataInfrastructure(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCloudExadataInfrastructureAsync(String resourceGroupName, + String cloudexadatainfrastructurename) { + return new PagedFlux<>( + () -> listByCloudExadataInfrastructureSinglePageAsync(resourceGroupName, cloudexadatainfrastructurename), + nextLink -> listByCloudExadataInfrastructureNextSinglePageAsync(nextLink)); + } + + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCloudExadataInfrastructureAsync(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + return new PagedFlux<>(() -> listByCloudExadataInfrastructureSinglePageAsync(resourceGroupName, + cloudexadatainfrastructurename, context), + nextLink -> listByCloudExadataInfrastructureNextSinglePageAsync(nextLink, context)); + } + + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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)); + } + + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + return new PagedIterable<>( + listByCloudExadataInfrastructureAsync(resourceGroupName, cloudexadatainfrastructurename, context)); + } + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename, String dbserverocid) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + if (dbserverocid == null) { + return Mono.error(new IllegalArgumentException("Parameter dbserverocid is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudexadatainfrastructurename, dbserverocid, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String cloudexadatainfrastructurename, String dbserverocid, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudexadatainfrastructurename == null) { + return Mono.error(new IllegalArgumentException( + "Parameter cloudexadatainfrastructurename is required and cannot be null.")); + } + if (dbserverocid == null) { + return Mono.error(new IllegalArgumentException("Parameter dbserverocid is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudexadatainfrastructurename, dbserverocid, accept, context); + } + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid) { + return getWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, dbserverocid) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid, Context context) { + return getWithResponseAsync(resourceGroupName, cloudexadatainfrastructurename, dbserverocid, context).block(); + } + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbServerInner get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid) { + return getWithResponse(resourceGroupName, cloudexadatainfrastructurename, dbserverocid, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudExadataInfrastructureNextSinglePageAsync(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.listByCloudExadataInfrastructureNext(nextLink, this.client.getEndpoint(), + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudExadataInfrastructureNextSinglePageAsync(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.listByCloudExadataInfrastructureNext(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/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServersImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServersImpl.java new file mode 100644 index 000000000000..b8c90312ad83 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbServersImpl.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.oracle.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.oracle.fluent.DbServersClient; +import com.azure.resourcemanager.oracle.fluent.models.DbServerInner; +import com.azure.resourcemanager.oracle.models.DbServer; +import com.azure.resourcemanager.oracle.models.DbServers; + +public final class DbServersImpl implements DbServers { + private static final ClientLogger LOGGER = new ClientLogger(DbServersImpl.class); + + private final DbServersClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public DbServersImpl(DbServersClient innerClient, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename) { + PagedIterable inner + = this.serviceClient().listByCloudExadataInfrastructure(resourceGroupName, cloudexadatainfrastructurename); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbServerImpl(inner1, this.manager())); + } + + public PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename, Context context) { + PagedIterable inner = this.serviceClient() + .listByCloudExadataInfrastructure(resourceGroupName, cloudexadatainfrastructurename, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbServerImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, cloudexadatainfrastructurename, dbserverocid, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DbServerImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DbServer get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid) { + DbServerInner inner = this.serviceClient().get(resourceGroupName, cloudexadatainfrastructurename, dbserverocid); + if (inner != null) { + return new DbServerImpl(inner, this.manager()); + } else { + return null; + } + } + + private DbServersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapeImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapeImpl.java new file mode 100644 index 000000000000..03518ab9a89d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapeImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DbSystemShapeInner; +import com.azure.resourcemanager.oracle.models.DbSystemShape; +import com.azure.resourcemanager.oracle.models.DbSystemShapeProperties; + +public final class DbSystemShapeImpl implements DbSystemShape { + private DbSystemShapeInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + DbSystemShapeImpl(DbSystemShapeInner innerObject, com.azure.resourcemanager.oracle.OracleManager 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 DbSystemShapeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DbSystemShapeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapesClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapesClientImpl.java new file mode 100644 index 000000000000..cbd6dceaf95a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapesClientImpl.java @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.DbSystemShapesClient; +import com.azure.resourcemanager.oracle.fluent.models.DbSystemShapeInner; +import com.azure.resourcemanager.oracle.models.DbSystemShapeListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DbSystemShapesClient. + */ +public final class DbSystemShapesClientImpl implements DbSystemShapesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DbSystemShapesService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of DbSystemShapesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DbSystemShapesClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(DbSystemShapesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerDbSystemShapes to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface DbSystemShapesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes") + @ExpectedResponses({ 200 }) + @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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("dbsystemshapename") String dbsystemshapename, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List DbSystemShape resources by Location. + * + * @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 DbSystemShape list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DbSystemShape resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbSystemShape list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List DbSystemShape resources by Location. + * + * @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 DbSystemShape list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List DbSystemShape resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * List DbSystemShape resources by Location. + * + * @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 DbSystemShape list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(listByLocationAsync(location)); + } + + /** + * List DbSystemShape resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbSystemShape list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(listByLocationAsync(location, context)); + } + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String dbsystemshapename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dbsystemshapename == null) { + return Mono + .error(new IllegalArgumentException("Parameter dbsystemshapename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, dbsystemshapename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String dbsystemshapename, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dbsystemshapename == null) { + return Mono + .error(new IllegalArgumentException("Parameter dbsystemshapename is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, dbsystemshapename, accept, context); + } + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String dbsystemshapename) { + return getWithResponseAsync(location, dbsystemshapename).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String dbsystemshapename, Context context) { + return getWithResponseAsync(location, dbsystemshapename, context).block(); + } + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DbSystemShapeInner get(String location, String dbsystemshapename) { + return getWithResponse(location, dbsystemshapename, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbSystemShape list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbSystemShape list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapesImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapesImpl.java new file mode 100644 index 000000000000..6b35a27064e4 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DbSystemShapesImpl.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.DbSystemShapesClient; +import com.azure.resourcemanager.oracle.fluent.models.DbSystemShapeInner; +import com.azure.resourcemanager.oracle.models.DbSystemShape; +import com.azure.resourcemanager.oracle.models.DbSystemShapes; + +public final class DbSystemShapesImpl implements DbSystemShapes { + private static final ClientLogger LOGGER = new ClientLogger(DbSystemShapesImpl.class); + + private final DbSystemShapesClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public DbSystemShapesImpl(DbSystemShapesClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbSystemShapeImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DbSystemShapeImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String dbsystemshapename, Context context) { + Response inner = this.serviceClient().getWithResponse(location, dbsystemshapename, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DbSystemShapeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DbSystemShape get(String location, String dbsystemshapename) { + DbSystemShapeInner inner = this.serviceClient().get(location, dbsystemshapename); + if (inner != null) { + return new DbSystemShapeImpl(inner, this.manager()); + } else { + return null; + } + } + + private DbSystemShapesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewImpl.java new file mode 100644 index 000000000000..cbfdcc1c8e76 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateViewInner; +import com.azure.resourcemanager.oracle.models.DnsPrivateView; +import com.azure.resourcemanager.oracle.models.DnsPrivateViewProperties; + +public final class DnsPrivateViewImpl implements DnsPrivateView { + private DnsPrivateViewInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + DnsPrivateViewImpl(DnsPrivateViewInner innerObject, com.azure.resourcemanager.oracle.OracleManager 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 DnsPrivateViewProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DnsPrivateViewInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewsClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewsClientImpl.java new file mode 100644 index 000000000000..ab0cb3e5b0e7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewsClientImpl.java @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.DnsPrivateViewsClient; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateViewInner; +import com.azure.resourcemanager.oracle.models.DnsPrivateViewListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DnsPrivateViewsClient. + */ +public final class DnsPrivateViewsClientImpl implements DnsPrivateViewsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DnsPrivateViewsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of DnsPrivateViewsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DnsPrivateViewsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(DnsPrivateViewsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerDnsPrivateViews to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface DnsPrivateViewsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews") + @ExpectedResponses({ 200 }) + @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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("dnsprivateviewocid") String dnsprivateviewocid, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List DnsPrivateView resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DnsPrivateView resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List DnsPrivateView resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List DnsPrivateView resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * List DnsPrivateView resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(listByLocationAsync(location)); + } + + /** + * List DnsPrivateView resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(listByLocationAsync(location, context)); + } + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String dnsprivateviewocid) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dnsprivateviewocid == null) { + return Mono + .error(new IllegalArgumentException("Parameter dnsprivateviewocid is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, dnsprivateviewocid, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String dnsprivateviewocid, + 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 (dnsprivateviewocid == null) { + return Mono + .error(new IllegalArgumentException("Parameter dnsprivateviewocid is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, dnsprivateviewocid, accept, context); + } + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String dnsprivateviewocid) { + return getWithResponseAsync(location, dnsprivateviewocid).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String dnsprivateviewocid, Context context) { + return getWithResponseAsync(location, dnsprivateviewocid, context).block(); + } + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsPrivateViewInner get(String location, String dnsprivateviewocid) { + return getWithResponse(location, dnsprivateviewocid, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewsImpl.java new file mode 100644 index 000000000000..b62e15c4667f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateViewsImpl.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.oracle.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.oracle.fluent.DnsPrivateViewsClient; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateViewInner; +import com.azure.resourcemanager.oracle.models.DnsPrivateView; +import com.azure.resourcemanager.oracle.models.DnsPrivateViews; + +public final class DnsPrivateViewsImpl implements DnsPrivateViews { + private static final ClientLogger LOGGER = new ClientLogger(DnsPrivateViewsImpl.class); + + private final DnsPrivateViewsClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public DnsPrivateViewsImpl(DnsPrivateViewsClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateViewImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateViewImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String dnsprivateviewocid, Context context) { + Response inner + = this.serviceClient().getWithResponse(location, dnsprivateviewocid, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DnsPrivateViewImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DnsPrivateView get(String location, String dnsprivateviewocid) { + DnsPrivateViewInner inner = this.serviceClient().get(location, dnsprivateviewocid); + if (inner != null) { + return new DnsPrivateViewImpl(inner, this.manager()); + } else { + return null; + } + } + + private DnsPrivateViewsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZoneImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZoneImpl.java new file mode 100644 index 000000000000..61eae3b6efda --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZoneImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateZoneInner; +import com.azure.resourcemanager.oracle.models.DnsPrivateZone; +import com.azure.resourcemanager.oracle.models.DnsPrivateZoneProperties; + +public final class DnsPrivateZoneImpl implements DnsPrivateZone { + private DnsPrivateZoneInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + DnsPrivateZoneImpl(DnsPrivateZoneInner innerObject, com.azure.resourcemanager.oracle.OracleManager 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 DnsPrivateZoneProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DnsPrivateZoneInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZonesClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZonesClientImpl.java new file mode 100644 index 000000000000..6decba5c529e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZonesClientImpl.java @@ -0,0 +1,389 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.DnsPrivateZonesClient; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateZoneInner; +import com.azure.resourcemanager.oracle.models.DnsPrivateZoneListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DnsPrivateZonesClient. + */ +public final class DnsPrivateZonesClientImpl implements DnsPrivateZonesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DnsPrivateZonesService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of DnsPrivateZonesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DnsPrivateZonesClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(DnsPrivateZonesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerDnsPrivateZones to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface DnsPrivateZonesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones") + @ExpectedResponses({ 200 }) + @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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("dnsprivatezonename") String dnsprivatezonename, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List DnsPrivateZone resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List DnsPrivateZone resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List DnsPrivateZone resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List DnsPrivateZone resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * List DnsPrivateZone resources by Location. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(listByLocationAsync(location)); + } + + /** + * List DnsPrivateZone resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(listByLocationAsync(location, context)); + } + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String dnsprivatezonename) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 (dnsprivatezonename == null) { + return Mono + .error(new IllegalArgumentException("Parameter dnsprivatezonename is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, dnsprivatezonename, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String dnsprivatezonename, + 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 (dnsprivatezonename == null) { + return Mono + .error(new IllegalArgumentException("Parameter dnsprivatezonename is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, dnsprivatezonename, accept, context); + } + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String dnsprivatezonename) { + return getWithResponseAsync(location, dnsprivatezonename).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String dnsprivatezonename, Context context) { + return getWithResponseAsync(location, dnsprivatezonename, context).block(); + } + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DnsPrivateZoneInner get(String location, String dnsprivatezonename) { + return getWithResponse(location, dnsprivatezonename, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZonesImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZonesImpl.java new file mode 100644 index 000000000000..c59ca8e6df89 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/DnsPrivateZonesImpl.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.oracle.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.oracle.fluent.DnsPrivateZonesClient; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateZoneInner; +import com.azure.resourcemanager.oracle.models.DnsPrivateZone; +import com.azure.resourcemanager.oracle.models.DnsPrivateZones; + +public final class DnsPrivateZonesImpl implements DnsPrivateZones { + private static final ClientLogger LOGGER = new ClientLogger(DnsPrivateZonesImpl.class); + + private final DnsPrivateZonesClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public DnsPrivateZonesImpl(DnsPrivateZonesClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateZoneImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DnsPrivateZoneImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String dnsprivatezonename, Context context) { + Response inner + = this.serviceClient().getWithResponse(location, dnsprivatezonename, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DnsPrivateZoneImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DnsPrivateZone get(String location, String dnsprivatezonename) { + DnsPrivateZoneInner inner = this.serviceClient().get(location, dnsprivatezonename); + if (inner != null) { + return new DnsPrivateZoneImpl(inner, this.manager()); + } else { + return null; + } + } + + private DnsPrivateZonesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionImpl.java new file mode 100644 index 000000000000..001da55f815f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.GiVersionInner; +import com.azure.resourcemanager.oracle.models.GiVersion; +import com.azure.resourcemanager.oracle.models.GiVersionProperties; + +public final class GiVersionImpl implements GiVersion { + private GiVersionInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + GiVersionImpl(GiVersionInner innerObject, com.azure.resourcemanager.oracle.OracleManager 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 GiVersionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public GiVersionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionsClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionsClientImpl.java new file mode 100644 index 000000000000..a0e32f490935 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionsClientImpl.java @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.GiVersionsClient; +import com.azure.resourcemanager.oracle.fluent.models.GiVersionInner; +import com.azure.resourcemanager.oracle.models.GiVersionListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in GiVersionsClient. + */ +public final class GiVersionsClientImpl implements GiVersionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final GiVersionsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of GiVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GiVersionsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(GiVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerGiVersions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface GiVersionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions") + @ExpectedResponses({ 200 }) + @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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("giversionname") String giversionname, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List GiVersion resources by Location. + * + * @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 GiVersion list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List GiVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiVersion list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocation(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List GiVersion resources by Location. + * + * @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 GiVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * List GiVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiVersion list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, Context context) { + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * List GiVersion resources by Location. + * + * @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 GiVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(listByLocationAsync(location)); + } + + /** + * List GiVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiVersion list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(listByLocationAsync(location, context)); + } + + /** + * Get a GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiVersion along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String giversionname) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, giversionname, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiVersion along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String location, String giversionname, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, giversionname, accept, context); + } + + /** + * Get a GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiVersion on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location, String giversionname) { + return getWithResponseAsync(location, giversionname).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiVersion along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, String giversionname, Context context) { + return getWithResponseAsync(location, giversionname, context).block(); + } + + /** + * Get a GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiVersion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GiVersionInner get(String location, String giversionname) { + return getWithResponse(location, giversionname, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiVersion list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a GiVersion list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionsImpl.java new file mode 100644 index 000000000000..1b6a5c0fad2b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/GiVersionsImpl.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.GiVersionsClient; +import com.azure.resourcemanager.oracle.fluent.models.GiVersionInner; +import com.azure.resourcemanager.oracle.models.GiVersion; +import com.azure.resourcemanager.oracle.models.GiVersions; + +public final class GiVersionsImpl implements GiVersions { + private static final ClientLogger LOGGER = new ClientLogger(GiVersionsImpl.class); + + private final GiVersionsClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public GiVersionsImpl(GiVersionsClient innerClient, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GiVersionImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GiVersionImpl(inner1, this.manager())); + } + + public Response getWithResponse(String location, String giversionname, Context context) { + Response inner = this.serviceClient().getWithResponse(location, giversionname, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GiVersionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GiVersion get(String location, String giversionname) { + GiVersionInner inner = this.serviceClient().get(location, giversionname); + if (inner != null) { + return new GiVersionImpl(inner, this.manager()); + } else { + return null; + } + } + + private GiVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationImpl.java new file mode 100644 index 000000000000..789902fa05dc --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationImpl.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.oracle.implementation; + +import com.azure.resourcemanager.oracle.fluent.models.OperationInner; +import com.azure.resourcemanager.oracle.models.ActionType; +import com.azure.resourcemanager.oracle.models.Operation; +import com.azure.resourcemanager.oracle.models.OperationDisplay; +import com.azure.resourcemanager.oracle.models.Origin; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { + return this.innerModel().origin(); + } + + public ActionType actionType() { + return this.innerModel().actionType(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationsClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationsClientImpl.java new file mode 100644 index 000000000000..1d4dc1665b5f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationsClientImpl.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.OperationsClient; +import com.azure.resourcemanager.oracle.fluent.models.OperationInner; +import com.azure.resourcemanager.oracle.models.OperationListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ +public final class OperationsClientImpl implements OperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of OperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerOperations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface OperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Oracle.Database/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the operations for the provider. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(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.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(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.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationsImpl.java new file mode 100644 index 000000000000..eba98046a813 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OperationsImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.OperationsClient; +import com.azure.resourcemanager.oracle.fluent.models.OperationInner; +import com.azure.resourcemanager.oracle.models.Operation; +import com.azure.resourcemanager.oracle.models.Operations; + +public final class OperationsImpl implements Operations { + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); + + private final OperationsClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + } + + private OperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleDatabaseResourceManagerBuilder.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleDatabaseResourceManagerBuilder.java new file mode 100644 index 000000000000..2a25cb3ef925 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleDatabaseResourceManagerBuilder.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** + * A builder for creating a new instance of the OracleDatabaseResourceManagerImpl type. + */ +@ServiceClientBuilder(serviceClients = { OracleDatabaseResourceManagerImpl.class }) +public final class OracleDatabaseResourceManagerBuilder { + /* + * The ID of the target subscription. The value must be an UUID. + */ + private String subscriptionId; + + /** + * Sets The ID of the target subscription. The value must be an UUID. + * + * @param subscriptionId the subscriptionId value. + * @return the OracleDatabaseResourceManagerBuilder. + */ + public OracleDatabaseResourceManagerBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the OracleDatabaseResourceManagerBuilder. + */ + public OracleDatabaseResourceManagerBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the OracleDatabaseResourceManagerBuilder. + */ + public OracleDatabaseResourceManagerBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the OracleDatabaseResourceManagerBuilder. + */ + public OracleDatabaseResourceManagerBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the OracleDatabaseResourceManagerBuilder. + */ + public OracleDatabaseResourceManagerBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the OracleDatabaseResourceManagerBuilder. + */ + public OracleDatabaseResourceManagerBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of OracleDatabaseResourceManagerImpl with the provided parameters. + * + * @return an instance of OracleDatabaseResourceManagerImpl. + */ + public OracleDatabaseResourceManagerImpl buildClient() { + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + OracleDatabaseResourceManagerImpl client = new OracleDatabaseResourceManagerImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + return client; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleDatabaseResourceManagerImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleDatabaseResourceManagerImpl.java new file mode 100644 index 000000000000..122cf5d4d8f7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleDatabaseResourceManagerImpl.java @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +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.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.oracle.fluent.AutonomousDatabaseBackupsClient; +import com.azure.resourcemanager.oracle.fluent.AutonomousDatabaseCharacterSetsClient; +import com.azure.resourcemanager.oracle.fluent.AutonomousDatabaseNationalCharacterSetsClient; +import com.azure.resourcemanager.oracle.fluent.AutonomousDatabasesClient; +import com.azure.resourcemanager.oracle.fluent.AutonomousDatabaseVersionsClient; +import com.azure.resourcemanager.oracle.fluent.CloudExadataInfrastructuresClient; +import com.azure.resourcemanager.oracle.fluent.CloudVmClustersClient; +import com.azure.resourcemanager.oracle.fluent.DbNodesClient; +import com.azure.resourcemanager.oracle.fluent.DbServersClient; +import com.azure.resourcemanager.oracle.fluent.DbSystemShapesClient; +import com.azure.resourcemanager.oracle.fluent.DnsPrivateViewsClient; +import com.azure.resourcemanager.oracle.fluent.DnsPrivateZonesClient; +import com.azure.resourcemanager.oracle.fluent.GiVersionsClient; +import com.azure.resourcemanager.oracle.fluent.OperationsClient; +import com.azure.resourcemanager.oracle.fluent.OracleDatabaseResourceManager; +import com.azure.resourcemanager.oracle.fluent.OracleSubscriptionsClient; +import com.azure.resourcemanager.oracle.fluent.VirtualNetworkAddressesClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the OracleDatabaseResourceManagerImpl type. + */ +@ServiceClient(builder = OracleDatabaseResourceManagerBuilder.class) +public final class OracleDatabaseResourceManagerImpl implements OracleDatabaseResourceManager { + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * server parameter. + */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The AutonomousDatabasesClient object to access its operations. + */ + private final AutonomousDatabasesClient autonomousDatabases; + + /** + * Gets the AutonomousDatabasesClient object to access its operations. + * + * @return the AutonomousDatabasesClient object. + */ + public AutonomousDatabasesClient getAutonomousDatabases() { + return this.autonomousDatabases; + } + + /** + * The CloudExadataInfrastructuresClient object to access its operations. + */ + private final CloudExadataInfrastructuresClient cloudExadataInfrastructures; + + /** + * Gets the CloudExadataInfrastructuresClient object to access its operations. + * + * @return the CloudExadataInfrastructuresClient object. + */ + public CloudExadataInfrastructuresClient getCloudExadataInfrastructures() { + return this.cloudExadataInfrastructures; + } + + /** + * The CloudVmClustersClient object to access its operations. + */ + private final CloudVmClustersClient cloudVmClusters; + + /** + * Gets the CloudVmClustersClient object to access its operations. + * + * @return the CloudVmClustersClient object. + */ + public CloudVmClustersClient getCloudVmClusters() { + return this.cloudVmClusters; + } + + /** + * The AutonomousDatabaseCharacterSetsClient object to access its operations. + */ + private final AutonomousDatabaseCharacterSetsClient autonomousDatabaseCharacterSets; + + /** + * Gets the AutonomousDatabaseCharacterSetsClient object to access its operations. + * + * @return the AutonomousDatabaseCharacterSetsClient object. + */ + public AutonomousDatabaseCharacterSetsClient getAutonomousDatabaseCharacterSets() { + return this.autonomousDatabaseCharacterSets; + } + + /** + * The AutonomousDatabaseNationalCharacterSetsClient object to access its operations. + */ + private final AutonomousDatabaseNationalCharacterSetsClient autonomousDatabaseNationalCharacterSets; + + /** + * Gets the AutonomousDatabaseNationalCharacterSetsClient object to access its operations. + * + * @return the AutonomousDatabaseNationalCharacterSetsClient object. + */ + public AutonomousDatabaseNationalCharacterSetsClient getAutonomousDatabaseNationalCharacterSets() { + return this.autonomousDatabaseNationalCharacterSets; + } + + /** + * The AutonomousDatabaseVersionsClient object to access its operations. + */ + private final AutonomousDatabaseVersionsClient autonomousDatabaseVersions; + + /** + * Gets the AutonomousDatabaseVersionsClient object to access its operations. + * + * @return the AutonomousDatabaseVersionsClient object. + */ + public AutonomousDatabaseVersionsClient getAutonomousDatabaseVersions() { + return this.autonomousDatabaseVersions; + } + + /** + * The DbSystemShapesClient object to access its operations. + */ + private final DbSystemShapesClient dbSystemShapes; + + /** + * Gets the DbSystemShapesClient object to access its operations. + * + * @return the DbSystemShapesClient object. + */ + public DbSystemShapesClient getDbSystemShapes() { + return this.dbSystemShapes; + } + + /** + * The DnsPrivateViewsClient object to access its operations. + */ + private final DnsPrivateViewsClient dnsPrivateViews; + + /** + * Gets the DnsPrivateViewsClient object to access its operations. + * + * @return the DnsPrivateViewsClient object. + */ + public DnsPrivateViewsClient getDnsPrivateViews() { + return this.dnsPrivateViews; + } + + /** + * The DnsPrivateZonesClient object to access its operations. + */ + private final DnsPrivateZonesClient dnsPrivateZones; + + /** + * Gets the DnsPrivateZonesClient object to access its operations. + * + * @return the DnsPrivateZonesClient object. + */ + public DnsPrivateZonesClient getDnsPrivateZones() { + return this.dnsPrivateZones; + } + + /** + * The GiVersionsClient object to access its operations. + */ + private final GiVersionsClient giVersions; + + /** + * Gets the GiVersionsClient object to access its operations. + * + * @return the GiVersionsClient object. + */ + public GiVersionsClient getGiVersions() { + return this.giVersions; + } + + /** + * The OracleSubscriptionsClient object to access its operations. + */ + private final OracleSubscriptionsClient oracleSubscriptions; + + /** + * Gets the OracleSubscriptionsClient object to access its operations. + * + * @return the OracleSubscriptionsClient object. + */ + public OracleSubscriptionsClient getOracleSubscriptions() { + return this.oracleSubscriptions; + } + + /** + * The AutonomousDatabaseBackupsClient object to access its operations. + */ + private final AutonomousDatabaseBackupsClient autonomousDatabaseBackups; + + /** + * Gets the AutonomousDatabaseBackupsClient object to access its operations. + * + * @return the AutonomousDatabaseBackupsClient object. + */ + public AutonomousDatabaseBackupsClient getAutonomousDatabaseBackups() { + return this.autonomousDatabaseBackups; + } + + /** + * The DbServersClient object to access its operations. + */ + private final DbServersClient dbServers; + + /** + * Gets the DbServersClient object to access its operations. + * + * @return the DbServersClient object. + */ + public DbServersClient getDbServers() { + return this.dbServers; + } + + /** + * The DbNodesClient object to access its operations. + */ + private final DbNodesClient dbNodes; + + /** + * Gets the DbNodesClient object to access its operations. + * + * @return the DbNodesClient object. + */ + public DbNodesClient getDbNodes() { + return this.dbNodes; + } + + /** + * The VirtualNetworkAddressesClient object to access its operations. + */ + private final VirtualNetworkAddressesClient virtualNetworkAddresses; + + /** + * Gets the VirtualNetworkAddressesClient object to access its operations. + * + * @return the VirtualNetworkAddressesClient object. + */ + public VirtualNetworkAddressesClient getVirtualNetworkAddresses() { + return this.virtualNetworkAddresses; + } + + /** + * Initializes an instance of OracleDatabaseResourceManager client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. + * @param endpoint server parameter. + */ + OracleDatabaseResourceManagerImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2023-09-01-preview"; + this.operations = new OperationsClientImpl(this); + this.autonomousDatabases = new AutonomousDatabasesClientImpl(this); + this.cloudExadataInfrastructures = new CloudExadataInfrastructuresClientImpl(this); + this.cloudVmClusters = new CloudVmClustersClientImpl(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.giVersions = new GiVersionsClientImpl(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); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(HttpHeaderName.fromString(s)); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OracleDatabaseResourceManagerImpl.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionImpl.java new file mode 100644 index 000000000000..3bf7334251fe --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionImpl.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.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; +import com.azure.resourcemanager.oracle.models.OracleSubscription; +import com.azure.resourcemanager.oracle.models.OracleSubscriptionProperties; +import com.azure.resourcemanager.oracle.models.Plan; + +public final class OracleSubscriptionImpl implements OracleSubscription { + private OracleSubscriptionInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + OracleSubscriptionImpl(OracleSubscriptionInner innerObject, + com.azure.resourcemanager.oracle.OracleManager 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 OracleSubscriptionProperties properties() { + return this.innerModel().properties(); + } + + public Plan plan() { + return this.innerModel().plan(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public OracleSubscriptionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionsClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionsClientImpl.java new file mode 100644 index 000000000000..f5d415eb0a06 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionsClientImpl.java @@ -0,0 +1,1434 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.OracleSubscriptionsClient; +import com.azure.resourcemanager.oracle.fluent.models.ActivationLinksInner; +import com.azure.resourcemanager.oracle.fluent.models.CloudAccountDetailsInner; +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; +import com.azure.resourcemanager.oracle.fluent.models.SaasSubscriptionDetailsInner; +import com.azure.resourcemanager.oracle.models.OracleSubscriptionListResult; +import com.azure.resourcemanager.oracle.models.OracleSubscriptionUpdate; +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 OracleSubscriptionsClient. + */ +public final class OracleSubscriptionsClientImpl implements OracleSubscriptionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OracleSubscriptionsService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of OracleSubscriptionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OracleSubscriptionsClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(OracleSubscriptionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerOracleSubscriptions to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface OracleSubscriptionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") OracleSubscriptionInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") OracleSubscriptionUpdate properties, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> listActivationLinks(@HostParam("$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/listCloudAccountDetails") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> listCloudAccountDetails(@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/listSaasSubscriptionDetails") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> listSaasSubscriptionDetails(@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("{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); + } + + /** + * List OracleSubscription resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription list operation 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 OracleSubscription resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List OracleSubscription resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List OracleSubscription resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List OracleSubscription resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List OracleSubscription resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync() { + 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.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + accept, context); + } + + /** + * Get a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync() { + return getWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(Context context) { + return getWithResponseAsync(context).block(); + } + + /** + * Get a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OracleSubscriptionInner get() { + return getWithResponse(Context.NONE).getValue(); + } + + /** + * Create a OracleSubscription. + * + * @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 oracleSubscription resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(OracleSubscriptionInner 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 (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(), resource, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a OracleSubscription. + * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(OracleSubscriptionInner 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 (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(), resource, accept, context); + } + + /** + * Create a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OracleSubscriptionInner> + beginCreateOrUpdateAsync(OracleSubscriptionInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, + this.client.getContext()); + } + + /** + * Create a OracleSubscription. + * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OracleSubscriptionInner> + beginCreateOrUpdateAsync(OracleSubscriptionInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, context); + } + + /** + * Create a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OracleSubscriptionInner> + beginCreateOrUpdate(OracleSubscriptionInner resource) { + return this.beginCreateOrUpdateAsync(resource).getSyncPoller(); + } + + /** + * Create a OracleSubscription. + * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OracleSubscriptionInner> + beginCreateOrUpdate(OracleSubscriptionInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resource, context).getSyncPoller(); + } + + /** + * Create a OracleSubscription. + * + * @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 oracleSubscription resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(OracleSubscriptionInner resource) { + return beginCreateOrUpdateAsync(resource).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a OracleSubscription. + * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(OracleSubscriptionInner resource, Context context) { + return beginCreateOrUpdateAsync(resource, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OracleSubscriptionInner createOrUpdate(OracleSubscriptionInner resource) { + return createOrUpdateAsync(resource).block(); + } + + /** + * Create a OracleSubscription. + * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OracleSubscriptionInner createOrUpdate(OracleSubscriptionInner resource, Context context) { + return createOrUpdateAsync(resource, context).block(); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(OracleSubscriptionUpdate properties) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (properties == null) { + return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); + } else { + properties.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), properties, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(OracleSubscriptionUpdate 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 (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(), + properties, accept, context); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OracleSubscriptionInner> + beginUpdateAsync(OracleSubscriptionUpdate properties) { + Mono>> mono = updateWithResponseAsync(properties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, + this.client.getContext()); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OracleSubscriptionInner> + beginUpdateAsync(OracleSubscriptionUpdate properties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateWithResponseAsync(properties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OracleSubscriptionInner.class, OracleSubscriptionInner.class, context); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OracleSubscriptionInner> + beginUpdate(OracleSubscriptionUpdate properties) { + return this.beginUpdateAsync(properties).getSyncPoller(); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OracleSubscriptionInner> + beginUpdate(OracleSubscriptionUpdate properties, Context context) { + return this.beginUpdateAsync(properties, context).getSyncPoller(); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(OracleSubscriptionUpdate properties) { + return beginUpdateAsync(properties).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(OracleSubscriptionUpdate properties, Context context) { + return beginUpdateAsync(properties, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OracleSubscriptionInner update(OracleSubscriptionUpdate properties) { + return updateAsync(properties).block(); + } + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OracleSubscriptionInner update(OracleSubscriptionUpdate properties, Context context) { + return updateAsync(properties, context).block(); + } + + /** + * Delete a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync() { + 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.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + accept, context); + } + + /** + * Delete a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync() { + Mono>> mono = deleteWithResponseAsync(); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete() { + return this.beginDeleteAsync().getSyncPoller(); + } + + /** + * Delete a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(Context context) { + return this.beginDeleteAsync(context).getSyncPoller(); + } + + /** + * Delete a OracleSubscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync() { + return beginDeleteAsync().last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(Context context) { + return beginDeleteAsync(context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a OracleSubscription. + * + * @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() { + deleteAsync().block(); + } + + /** + * Delete a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(Context context) { + deleteAsync(context).block(); + } + + /** + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listActivationLinksWithResponseAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listActivationLinks(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listActivationLinksWithResponseAsync(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.listActivationLinks(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + } + + /** + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ActivationLinksInner> beginListActivationLinksAsync() { + Mono>> mono = listActivationLinksWithResponseAsync(); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ActivationLinksInner.class, ActivationLinksInner.class, this.client.getContext()); + } + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ActivationLinksInner> + beginListActivationLinksAsync(Context context) { + context = this.client.mergeContext(context); + Mono>> mono = listActivationLinksWithResponseAsync(context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ActivationLinksInner.class, ActivationLinksInner.class, context); + } + + /** + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActivationLinksInner> beginListActivationLinks() { + return this.beginListActivationLinksAsync().getSyncPoller(); + } + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of activation Links model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ActivationLinksInner> + beginListActivationLinks(Context context) { + return this.beginListActivationLinksAsync(context).getSyncPoller(); + } + + /** + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listActivationLinksAsync() { + return beginListActivationLinksAsync().last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listActivationLinksAsync(Context context) { + return beginListActivationLinksAsync(context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * List Activation Links. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActivationLinksInner listActivationLinks() { + return listActivationLinksAsync().block(); + } + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ActivationLinksInner listActivationLinks(Context context) { + return listActivationLinksAsync(context).block(); + } + + /** + * List Cloud Account Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listCloudAccountDetailsWithResponseAsync() { + 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.listCloudAccountDetails(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Cloud Account Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listCloudAccountDetailsWithResponseAsync(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.listCloudAccountDetails(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + } + + /** + * List Cloud Account Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudAccountDetailsInner> + beginListCloudAccountDetailsAsync() { + Mono>> mono = listCloudAccountDetailsWithResponseAsync(); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudAccountDetailsInner.class, CloudAccountDetailsInner.class, + this.client.getContext()); + } + + /** + * List Cloud Account Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CloudAccountDetailsInner> + beginListCloudAccountDetailsAsync(Context context) { + context = this.client.mergeContext(context); + Mono>> mono = listCloudAccountDetailsWithResponseAsync(context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), CloudAccountDetailsInner.class, CloudAccountDetailsInner.class, context); + } + + /** + * List Cloud Account Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudAccountDetailsInner> beginListCloudAccountDetails() { + return this.beginListCloudAccountDetailsAsync().getSyncPoller(); + } + + /** + * List Cloud Account Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CloudAccountDetailsInner> + beginListCloudAccountDetails(Context context) { + return this.beginListCloudAccountDetailsAsync(context).getSyncPoller(); + } + + /** + * List Cloud Account Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listCloudAccountDetailsAsync() { + return beginListCloudAccountDetailsAsync().last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * List Cloud Account Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listCloudAccountDetailsAsync(Context context) { + return beginListCloudAccountDetailsAsync(context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * List Cloud Account Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudAccountDetailsInner listCloudAccountDetails() { + return listCloudAccountDetailsAsync().block(); + } + + /** + * List Cloud Account Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CloudAccountDetailsInner listCloudAccountDetails(Context context) { + return listCloudAccountDetailsAsync(context).block(); + } + + /** + * List Saas Subscription Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listSaasSubscriptionDetailsWithResponseAsync() { + 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.listSaasSubscriptionDetails(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Saas Subscription Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listSaasSubscriptionDetailsWithResponseAsync(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.listSaasSubscriptionDetails(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + } + + /** + * List Saas Subscription Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetailsAsync() { + Mono>> mono = listSaasSubscriptionDetailsWithResponseAsync(); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SaasSubscriptionDetailsInner.class, SaasSubscriptionDetailsInner.class, + this.client.getContext()); + } + + /** + * List Saas Subscription Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetailsAsync(Context context) { + context = this.client.mergeContext(context); + Mono>> mono = listSaasSubscriptionDetailsWithResponseAsync(context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), SaasSubscriptionDetailsInner.class, SaasSubscriptionDetailsInner.class, + context); + } + + /** + * List Saas Subscription Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetails() { + return this.beginListSaasSubscriptionDetailsAsync().getSyncPoller(); + } + + /** + * List Saas Subscription Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SaasSubscriptionDetailsInner> + beginListSaasSubscriptionDetails(Context context) { + return this.beginListSaasSubscriptionDetailsAsync(context).getSyncPoller(); + } + + /** + * List Saas Subscription Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSaasSubscriptionDetailsAsync() { + return beginListSaasSubscriptionDetailsAsync().last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * List Saas Subscription Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSaasSubscriptionDetailsAsync(Context context) { + return beginListSaasSubscriptionDetailsAsync(context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * List Saas Subscription Details. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaasSubscriptionDetailsInner listSaasSubscriptionDetails() { + return listSaasSubscriptionDetailsAsync().block(); + } + + /** + * List Saas Subscription Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SaasSubscriptionDetailsInner listSaasSubscriptionDetails(Context context) { + return listSaasSubscriptionDetailsAsync(context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a OracleSubscription 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)); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionsImpl.java new file mode 100644 index 000000000000..43bf9c9e46ab --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/OracleSubscriptionsImpl.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.OracleSubscriptionsClient; +import com.azure.resourcemanager.oracle.fluent.models.ActivationLinksInner; +import com.azure.resourcemanager.oracle.fluent.models.CloudAccountDetailsInner; +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; +import com.azure.resourcemanager.oracle.fluent.models.SaasSubscriptionDetailsInner; +import com.azure.resourcemanager.oracle.models.ActivationLinks; +import com.azure.resourcemanager.oracle.models.CloudAccountDetails; +import com.azure.resourcemanager.oracle.models.OracleSubscription; +import com.azure.resourcemanager.oracle.models.OracleSubscriptions; +import com.azure.resourcemanager.oracle.models.OracleSubscriptionUpdate; +import com.azure.resourcemanager.oracle.models.SaasSubscriptionDetails; + +public final class OracleSubscriptionsImpl implements OracleSubscriptions { + private static final ClientLogger LOGGER = new ClientLogger(OracleSubscriptionsImpl.class); + + private final OracleSubscriptionsClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public OracleSubscriptionsImpl(OracleSubscriptionsClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OracleSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OracleSubscriptionImpl(inner1, this.manager())); + } + + public Response getWithResponse(Context context) { + Response inner = this.serviceClient().getWithResponse(context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OracleSubscriptionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public OracleSubscription get() { + OracleSubscriptionInner inner = this.serviceClient().get(); + if (inner != null) { + return new OracleSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public OracleSubscription createOrUpdate(OracleSubscriptionInner resource) { + OracleSubscriptionInner inner = this.serviceClient().createOrUpdate(resource); + if (inner != null) { + return new OracleSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public OracleSubscription createOrUpdate(OracleSubscriptionInner resource, Context context) { + OracleSubscriptionInner inner = this.serviceClient().createOrUpdate(resource, context); + if (inner != null) { + return new OracleSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public OracleSubscription update(OracleSubscriptionUpdate properties) { + OracleSubscriptionInner inner = this.serviceClient().update(properties); + if (inner != null) { + return new OracleSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public OracleSubscription update(OracleSubscriptionUpdate properties, Context context) { + OracleSubscriptionInner inner = this.serviceClient().update(properties, context); + if (inner != null) { + return new OracleSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete() { + this.serviceClient().delete(); + } + + public void delete(Context context) { + this.serviceClient().delete(context); + } + + public ActivationLinks listActivationLinks() { + ActivationLinksInner inner = this.serviceClient().listActivationLinks(); + if (inner != null) { + return new ActivationLinksImpl(inner, this.manager()); + } else { + return null; + } + } + + public ActivationLinks listActivationLinks(Context context) { + ActivationLinksInner inner = this.serviceClient().listActivationLinks(context); + if (inner != null) { + return new ActivationLinksImpl(inner, this.manager()); + } else { + return null; + } + } + + public CloudAccountDetails listCloudAccountDetails() { + CloudAccountDetailsInner inner = this.serviceClient().listCloudAccountDetails(); + if (inner != null) { + return new CloudAccountDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + + public CloudAccountDetails listCloudAccountDetails(Context context) { + CloudAccountDetailsInner inner = this.serviceClient().listCloudAccountDetails(context); + if (inner != null) { + return new CloudAccountDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + + public SaasSubscriptionDetails listSaasSubscriptionDetails() { + SaasSubscriptionDetailsInner inner = this.serviceClient().listSaasSubscriptionDetails(); + if (inner != null) { + return new SaasSubscriptionDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + + public SaasSubscriptionDetails listSaasSubscriptionDetails(Context context) { + SaasSubscriptionDetailsInner inner = this.serviceClient().listSaasSubscriptionDetails(context); + if (inner != null) { + return new SaasSubscriptionDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + + private OracleSubscriptionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/PrivateIpAddressPropertiesImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/PrivateIpAddressPropertiesImpl.java new file mode 100644 index 000000000000..5faf3ba68513 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/PrivateIpAddressPropertiesImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.resourcemanager.oracle.fluent.models.PrivateIpAddressPropertiesInner; +import com.azure.resourcemanager.oracle.models.PrivateIpAddressProperties; + +public final class PrivateIpAddressPropertiesImpl implements PrivateIpAddressProperties { + private PrivateIpAddressPropertiesInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + PrivateIpAddressPropertiesImpl(PrivateIpAddressPropertiesInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String hostnameLabel() { + return this.innerModel().hostnameLabel(); + } + + public String ocid() { + return this.innerModel().ocid(); + } + + public String ipAddress() { + return this.innerModel().ipAddress(); + } + + public String subnetId() { + return this.innerModel().subnetId(); + } + + public PrivateIpAddressPropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/ResourceManagerUtils.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/ResourceManagerUtils.java new file mode 100644 index 000000000000..3e5f4dffa763 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/ResourceManagerUtils.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.oracle.implementation; + +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.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (!segments.isEmpty() && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl<>(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl<>(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/SaasSubscriptionDetailsImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/SaasSubscriptionDetailsImpl.java new file mode 100644 index 000000000000..611c256848a2 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/SaasSubscriptionDetailsImpl.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.resourcemanager.oracle.fluent.models.SaasSubscriptionDetailsInner; +import com.azure.resourcemanager.oracle.models.SaasSubscriptionDetails; +import java.time.OffsetDateTime; + +public final class SaasSubscriptionDetailsImpl implements SaasSubscriptionDetails { + private SaasSubscriptionDetailsInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + SaasSubscriptionDetailsImpl(SaasSubscriptionDetailsInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String subscriptionName() { + return this.innerModel().subscriptionName(); + } + + public OffsetDateTime timeCreated() { + return this.innerModel().timeCreated(); + } + + public String offerId() { + return this.innerModel().offerId(); + } + + public String planId() { + return this.innerModel().planId(); + } + + public String saasSubscriptionStatus() { + return this.innerModel().saasSubscriptionStatus(); + } + + public String publisherId() { + return this.innerModel().publisherId(); + } + + public String purchaserEmailId() { + return this.innerModel().purchaserEmailId(); + } + + public String purchaserTenantId() { + return this.innerModel().purchaserTenantId(); + } + + public String termUnit() { + return this.innerModel().termUnit(); + } + + public Boolean isAutoRenew() { + return this.innerModel().isAutoRenew(); + } + + public Boolean isFreeTrial() { + return this.innerModel().isFreeTrial(); + } + + public SaasSubscriptionDetailsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressImpl.java new file mode 100644 index 000000000000..302b9fca1c24 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressImpl.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.VirtualNetworkAddressInner; +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddress; +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddressProperties; + +public final class VirtualNetworkAddressImpl + implements VirtualNetworkAddress, VirtualNetworkAddress.Definition, VirtualNetworkAddress.Update { + private VirtualNetworkAddressInner innerObject; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public VirtualNetworkAddressProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public VirtualNetworkAddressInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String cloudvmclustername; + + private String virtualnetworkaddressname; + + public VirtualNetworkAddressImpl withExistingCloudVmCluster(String resourceGroupName, String cloudvmclustername) { + this.resourceGroupName = resourceGroupName; + this.cloudvmclustername = cloudvmclustername; + return this; + } + + public VirtualNetworkAddress create() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkAddresses() + .createOrUpdate(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, this.innerModel(), + Context.NONE); + return this; + } + + public VirtualNetworkAddress create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkAddresses() + .createOrUpdate(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, this.innerModel(), + context); + return this; + } + + VirtualNetworkAddressImpl(String name, com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = new VirtualNetworkAddressInner(); + this.serviceManager = serviceManager; + this.virtualnetworkaddressname = name; + } + + public VirtualNetworkAddressImpl update() { + return this; + } + + public VirtualNetworkAddress apply() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkAddresses() + .createOrUpdate(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, this.innerModel(), + Context.NONE); + return this; + } + + public VirtualNetworkAddress apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkAddresses() + .createOrUpdate(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, this.innerModel(), + context); + return this; + } + + VirtualNetworkAddressImpl(VirtualNetworkAddressInner innerObject, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "cloudVmClusters"); + this.virtualnetworkaddressname + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "virtualNetworkAddresses"); + } + + public VirtualNetworkAddress refresh() { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkAddresses() + .getWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, Context.NONE) + .getValue(); + return this; + } + + public VirtualNetworkAddress refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getVirtualNetworkAddresses() + .getWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context) + .getValue(); + return this; + } + + public VirtualNetworkAddressImpl withProperties(VirtualNetworkAddressProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressesClientImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressesClientImpl.java new file mode 100644 index 000000000000..cac633332eaf --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressesClientImpl.java @@ -0,0 +1,967 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.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.oracle.fluent.VirtualNetworkAddressesClient; +import com.azure.resourcemanager.oracle.fluent.models.VirtualNetworkAddressInner; +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddressListResult; +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 VirtualNetworkAddressesClient. + */ +public final class VirtualNetworkAddressesClientImpl implements VirtualNetworkAddressesClient { + /** + * The proxy service used to perform REST calls. + */ + private final VirtualNetworkAddressesService service; + + /** + * The service client containing this operation class. + */ + private final OracleDatabaseResourceManagerImpl client; + + /** + * Initializes an instance of VirtualNetworkAddressesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VirtualNetworkAddressesClientImpl(OracleDatabaseResourceManagerImpl client) { + this.service = RestProxy.create(VirtualNetworkAddressesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for OracleDatabaseResourceManagerVirtualNetworkAddresses to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "OracleDatabaseResour") + public interface VirtualNetworkAddressesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudVmCluster(@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, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, + @PathParam("virtualnetworkaddressname") String virtualnetworkaddressname, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") + @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("cloudvmclustername") String cloudvmclustername, + @PathParam("virtualnetworkaddressname") String virtualnetworkaddressname, + @BodyParam("application/json") VirtualNetworkAddressInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("cloudvmclustername") String cloudvmclustername, + @PathParam("virtualnetworkaddressname") String virtualnetworkaddressname, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByCloudVmClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByCloudVmClusterSinglePageAsync(String resourceGroupName, String cloudvmclustername) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByCloudVmClusterSinglePageAsync(String resourceGroupName, String cloudvmclustername, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByCloudVmCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, + String cloudvmclustername) { + return new PagedFlux<>(() -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername), + nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink)); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByCloudVmClusterAsync(String resourceGroupName, + String cloudvmclustername, Context context) { + return new PagedFlux<>( + () -> listByCloudVmClusterSinglePageAsync(resourceGroupName, cloudvmclustername, context), + nextLink -> listByCloudVmClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudVmCluster(String resourceGroupName, + String cloudvmclustername) { + return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername)); + } + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByCloudVmCluster(String resourceGroupName, + String cloudvmclustername, Context context) { + return new PagedIterable<>(listByCloudVmClusterAsync(resourceGroupName, cloudvmclustername, context)); + } + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String virtualnetworkaddressname) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String virtualnetworkaddressname, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudvmclustername, virtualnetworkaddressname, accept, context); + } + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { + return getWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context) { + return getWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context).block(); + } + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkAddressInner get(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { + return getWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, Context.NONE) + .getValue(); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + } + 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, cloudvmclustername, virtualnetworkaddressname, + resource, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String virtualnetworkaddressname, VirtualNetworkAddressInner resource, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + } + 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, cloudvmclustername, virtualnetworkaddressname, resource, + accept, context); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualNetworkAddressInner> beginCreateOrUpdateAsync( + String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + VirtualNetworkAddressInner resource) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, cloudvmclustername, + virtualnetworkaddressname, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualNetworkAddressInner.class, VirtualNetworkAddressInner.class, + this.client.getContext()); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, VirtualNetworkAddressInner> beginCreateOrUpdateAsync( + String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + VirtualNetworkAddressInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, cloudvmclustername, + virtualnetworkaddressname, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), VirtualNetworkAddressInner.class, VirtualNetworkAddressInner.class, context); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkAddressInner> beginCreateOrUpdate( + String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + VirtualNetworkAddressInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource) + .getSyncPoller(); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, VirtualNetworkAddressInner> beginCreateOrUpdate( + String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + VirtualNetworkAddressInner resource, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource, + context) + .getSyncPoller(); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource) { + return createOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource).block(); + } + + /** + * Create a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual IP resource belonging to a vm cluster resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualNetworkAddressInner createOrUpdate(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, VirtualNetworkAddressInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, resource, context) + .block(); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String virtualnetworkaddressname) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, cloudvmclustername, virtualnetworkaddressname, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String cloudvmclustername, String virtualnetworkaddressname, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (cloudvmclustername == null) { + return Mono + .error(new IllegalArgumentException("Parameter cloudvmclustername is required and cannot be null.")); + } + if (virtualnetworkaddressname == null) { + return Mono.error( + new IllegalArgumentException("Parameter virtualnetworkaddressname is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, cloudvmclustername, virtualnetworkaddressname, accept, context); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { + return this.beginDeleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname).getSyncPoller(); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context) { + return this.beginDeleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context) + .getSyncPoller(); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { + return beginDeleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context) { + return beginDeleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname) { + deleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname).block(); + } + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + Context context) { + deleteAsync(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudVmClusterNextSinglePageAsync(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.listByCloudVmClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByCloudVmClusterNextSinglePageAsync(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.listByCloudVmClusterNext(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/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressesImpl.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressesImpl.java new file mode 100644 index 000000000000..b4622de54e0c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/VirtualNetworkAddressesImpl.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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.oracle.fluent.VirtualNetworkAddressesClient; +import com.azure.resourcemanager.oracle.fluent.models.VirtualNetworkAddressInner; +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddress; +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddresses; + +public final class VirtualNetworkAddressesImpl implements VirtualNetworkAddresses { + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkAddressesImpl.class); + + private final VirtualNetworkAddressesClient innerClient; + + private final com.azure.resourcemanager.oracle.OracleManager serviceManager; + + public VirtualNetworkAddressesImpl(VirtualNetworkAddressesClient innerClient, + com.azure.resourcemanager.oracle.OracleManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByCloudVmCluster(String resourceGroupName, + String cloudvmclustername) { + PagedIterable inner + = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkAddressImpl(inner1, this.manager())); + } + + public PagedIterable listByCloudVmCluster(String resourceGroupName, + String cloudvmclustername, Context context) { + PagedIterable inner + = this.serviceClient().listByCloudVmCluster(resourceGroupName, cloudvmclustername, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualNetworkAddressImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VirtualNetworkAddressImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VirtualNetworkAddress get(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname) { + VirtualNetworkAddressInner inner + = this.serviceClient().get(resourceGroupName, cloudvmclustername, virtualnetworkaddressname); + if (inner != null) { + return new VirtualNetworkAddressImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname) { + this.serviceClient().delete(resourceGroupName, cloudvmclustername, virtualnetworkaddressname); + } + + public void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, + Context context) { + this.serviceClient().delete(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context); + } + + public VirtualNetworkAddress 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 cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(id, "cloudVmClusters"); + if (cloudvmclustername == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudVmClusters'.", id))); + } + String virtualnetworkaddressname = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworkAddresses"); + if (virtualnetworkaddressname == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworkAddresses'.", id))); + } + return this.getWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, 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 cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(id, "cloudVmClusters"); + if (cloudvmclustername == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudVmClusters'.", id))); + } + String virtualnetworkaddressname = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworkAddresses"); + if (virtualnetworkaddressname == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworkAddresses'.", id))); + } + return this.getWithResponse(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, 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 cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(id, "cloudVmClusters"); + if (cloudvmclustername == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudVmClusters'.", id))); + } + String virtualnetworkaddressname = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworkAddresses"); + if (virtualnetworkaddressname == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworkAddresses'.", id))); + } + this.delete(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, 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 cloudvmclustername = ResourceManagerUtils.getValueFromIdByName(id, "cloudVmClusters"); + if (cloudvmclustername == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudVmClusters'.", id))); + } + String virtualnetworkaddressname = ResourceManagerUtils.getValueFromIdByName(id, "virtualNetworkAddresses"); + if (virtualnetworkaddressname == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'virtualNetworkAddresses'.", id))); + } + this.delete(resourceGroupName, cloudvmclustername, virtualnetworkaddressname, context); + } + + private VirtualNetworkAddressesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.oracle.OracleManager manager() { + return this.serviceManager; + } + + public VirtualNetworkAddressImpl define(String name) { + return new VirtualNetworkAddressImpl(name, this.manager()); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/package-info.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/package-info.java new file mode 100644 index 000000000000..d6e71b8e0c87 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/implementation/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the implementations for OracleDatabaseResourceManager. + * null. + */ +package com.azure.resourcemanager.oracle.implementation; diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ActionType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ActionType.java new file mode 100644 index 000000000000..9f8a65d7ffd7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ActionType.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ +public final class ActionType extends ExpandableStringEnum { + /** + * Static value Internal for ActionType. + */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ActivationLinks.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ActivationLinks.java new file mode 100644 index 000000000000..1ed6d73c117c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ActivationLinks.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.oracle.models; + +import com.azure.resourcemanager.oracle.fluent.models.ActivationLinksInner; + +/** + * An immutable client-side representation of ActivationLinks. + */ +public interface ActivationLinks { + /** + * Gets the newCloudAccountActivationLink property: New Cloud Account Activation Link. + * + * @return the newCloudAccountActivationLink value. + */ + String newCloudAccountActivationLink(); + + /** + * Gets the existingCloudAccountActivationLink property: Existing Cloud Account Activation Link. + * + * @return the existingCloudAccountActivationLink value. + */ + String existingCloudAccountActivationLink(); + + /** + * Gets the inner com.azure.resourcemanager.oracle.fluent.models.ActivationLinksInner object. + * + * @return the inner object. + */ + ActivationLinksInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AddRemoveDbNode.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AddRemoveDbNode.java new file mode 100644 index 000000000000..5336a61c232b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AddRemoveDbNode.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Add/Remove (Virtual Machine) DbNode model. + */ +@Fluent +public final class AddRemoveDbNode { + /* + * Db servers ocids + */ + @JsonProperty(value = "dbServers", required = true) + private List dbServers; + + /** + * Creates an instance of AddRemoveDbNode class. + */ + public AddRemoveDbNode() { + } + + /** + * Get the dbServers property: Db servers ocids. + * + * @return the dbServers value. + */ + public List dbServers() { + return this.dbServers; + } + + /** + * Set the dbServers property: Db servers ocids. + * + * @param dbServers the dbServers value to set. + * @return the AddRemoveDbNode object itself. + */ + public AddRemoveDbNode withDbServers(List dbServers) { + this.dbServers = dbServers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dbServers() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property dbServers in model AddRemoveDbNode")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AddRemoveDbNode.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AllConnectionStringType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AllConnectionStringType.java new file mode 100644 index 000000000000..58ee0d603ab7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AllConnectionStringType.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.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The connection string profile to allow clients to group, filter and select connection string values based on + * structured metadata. + */ +@Fluent +public final class AllConnectionStringType { + /* + * The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + */ + @JsonProperty(value = "high") + private String high; + + /* + * The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + */ + @JsonProperty(value = "low") + private String low; + + /* + * The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + */ + @JsonProperty(value = "medium") + private String medium; + + /** + * Creates an instance of AllConnectionStringType class. + */ + public AllConnectionStringType() { + } + + /** + * Get the high property: The High database service provides the highest level of resources to each SQL statement + * resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + * + * @return the high value. + */ + public String high() { + return this.high; + } + + /** + * Set the high property: The High database service provides the highest level of resources to each SQL statement + * resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + * + * @param high the high value to set. + * @return the AllConnectionStringType object itself. + */ + public AllConnectionStringType withHigh(String high) { + this.high = high; + return this; + } + + /** + * Get the low property: The Low database service provides the least level of resources to each SQL statement, but + * supports the most number of concurrent SQL statements. + * + * @return the low value. + */ + public String low() { + return this.low; + } + + /** + * Set the low property: The Low database service provides the least level of resources to each SQL statement, but + * supports the most number of concurrent SQL statements. + * + * @param low the low value to set. + * @return the AllConnectionStringType object itself. + */ + public AllConnectionStringType withLow(String low) { + this.low = low; + return this; + } + + /** + * Get the medium property: The Medium database service provides a lower level of resources to each SQL statement + * potentially resulting a lower level of performance, but supports more concurrent SQL statements. + * + * @return the medium value. + */ + public String medium() { + return this.medium; + } + + /** + * Set the medium property: The Medium database service provides a lower level of resources to each SQL statement + * potentially resulting a lower level of performance, but supports more concurrent SQL statements. + * + * @param medium the medium value to set. + * @return the AllConnectionStringType object itself. + */ + public AllConnectionStringType withMedium(String medium) { + this.medium = medium; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ApexDetailsType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ApexDetailsType.java new file mode 100644 index 000000000000..208785bf2aba --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ApexDetailsType.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about Oracle APEX Application Development. + */ +@Fluent +public final class ApexDetailsType { + /* + * The Oracle APEX Application Development version. + */ + @JsonProperty(value = "apexVersion") + private String apexVersion; + + /* + * The Oracle REST Data Services (ORDS) version. + */ + @JsonProperty(value = "ordsVersion") + private String ordsVersion; + + /** + * Creates an instance of ApexDetailsType class. + */ + public ApexDetailsType() { + } + + /** + * Get the apexVersion property: The Oracle APEX Application Development version. + * + * @return the apexVersion value. + */ + public String apexVersion() { + return this.apexVersion; + } + + /** + * Set the apexVersion property: The Oracle APEX Application Development version. + * + * @param apexVersion the apexVersion value to set. + * @return the ApexDetailsType object itself. + */ + public ApexDetailsType withApexVersion(String apexVersion) { + this.apexVersion = apexVersion; + return this; + } + + /** + * Get the ordsVersion property: The Oracle REST Data Services (ORDS) version. + * + * @return the ordsVersion value. + */ + public String ordsVersion() { + return this.ordsVersion; + } + + /** + * Set the ordsVersion property: The Oracle REST Data Services (ORDS) version. + * + * @param ordsVersion the ordsVersion value to set. + * @return the ApexDetailsType object itself. + */ + public ApexDetailsType withOrdsVersion(String ordsVersion) { + this.ordsVersion = ordsVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabase.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabase.java new file mode 100644 index 000000000000..a4e3119573e1 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabase.java @@ -0,0 +1,336 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseInner; +import java.util.Map; + +/** + * An immutable client-side representation of AutonomousDatabase. + */ +public interface AutonomousDatabase { + /** + * 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. + */ + AutonomousDatabaseBaseProperties properties(); + + /** + * 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.oracle.fluent.models.AutonomousDatabaseInner object. + * + * @return the inner object. + */ + AutonomousDatabaseInner innerModel(); + + /** + * The entirety of the AutonomousDatabase definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The AutonomousDatabase definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AutonomousDatabase definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the AutonomousDatabase 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 AutonomousDatabase 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 AutonomousDatabase 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + AutonomousDatabase create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AutonomousDatabase create(Context context); + } + + /** + * The stage of the AutonomousDatabase 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 AutonomousDatabase 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(AutonomousDatabaseBaseProperties properties); + } + } + + /** + * Begins update for the AutonomousDatabase resource. + * + * @return the stage of resource update. + */ + AutonomousDatabase.Update update(); + + /** + * The template for AutonomousDatabase update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AutonomousDatabase apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AutonomousDatabase apply(Context context); + } + + /** + * The AutonomousDatabase update stages. + */ + interface UpdateStages { + /** + * The stage of the AutonomousDatabase 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 AutonomousDatabase update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The updatable properties of the AutonomousDatabase.. + * + * @param properties The updatable properties of the AutonomousDatabase. + * @return the next definition stage. + */ + Update withProperties(AutonomousDatabaseUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AutonomousDatabase refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AutonomousDatabase refresh(Context context); + + /** + * Perform failover 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 failover(PeerDbDetails body); + + /** + * Perform failover 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 failover(PeerDbDetails body, Context context); + + /** + * Generate wallet 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 Wallet File resource model along with {@link Response}. + */ + Response generateWalletWithResponse(GenerateAutonomousDatabaseWalletDetails body, + Context context); + + /** + * Generate wallet 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 Wallet File resource model. + */ + AutonomousDatabaseWalletFile generateWallet(GenerateAutonomousDatabaseWalletDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + AutonomousDatabase switchover(PeerDbDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + AutonomousDatabase switchover(PeerDbDetails body, Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackup.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackup.java new file mode 100644 index 000000000000..e68c2f0c3bc7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackup.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseBackupInner; + +/** + * An immutable client-side representation of AutonomousDatabaseBackup. + */ +public interface AutonomousDatabaseBackup { + /** + * 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. + */ + AutonomousDatabaseBackupProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseBackupInner object. + * + * @return the inner object. + */ + AutonomousDatabaseBackupInner innerModel(); + + /** + * The entirety of the AutonomousDatabaseBackup definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AutonomousDatabaseBackup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AutonomousDatabaseBackup definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AutonomousDatabaseBackup definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, autonomousdatabasename. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @return the next definition stage. + */ + WithCreate withExistingAutonomousDatabase(String resourceGroupName, String autonomousdatabasename); + } + + /** + * The stage of the AutonomousDatabaseBackup 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + AutonomousDatabaseBackup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AutonomousDatabaseBackup create(Context context); + } + + /** + * The stage of the AutonomousDatabaseBackup 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(AutonomousDatabaseBackupProperties properties); + } + } + + /** + * Begins update for the AutonomousDatabaseBackup resource. + * + * @return the stage of resource update. + */ + AutonomousDatabaseBackup.Update update(); + + /** + * The template for AutonomousDatabaseBackup update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AutonomousDatabaseBackup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AutonomousDatabaseBackup apply(Context context); + } + + /** + * The AutonomousDatabaseBackup update stages. + */ + interface UpdateStages { + /** + * The stage of the AutonomousDatabaseBackup update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The updatable properties of the AutonomousDatabaseBackup.. + * + * @param properties The updatable properties of the AutonomousDatabaseBackup. + * @return the next definition stage. + */ + Update withProperties(AutonomousDatabaseBackupUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AutonomousDatabaseBackup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AutonomousDatabaseBackup refresh(Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupLifecycleState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupLifecycleState.java new file mode 100644 index 000000000000..41d045218cb9 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupLifecycleState.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * AutonomousDatabaseBackupLifecycleState enum. + */ +public final class AutonomousDatabaseBackupLifecycleState + extends ExpandableStringEnum { + /** + * Static value Creating for AutonomousDatabaseBackupLifecycleState. + */ + public static final AutonomousDatabaseBackupLifecycleState CREATING = fromString("Creating"); + + /** + * Static value Active for AutonomousDatabaseBackupLifecycleState. + */ + public static final AutonomousDatabaseBackupLifecycleState ACTIVE = fromString("Active"); + + /** + * Static value Deleting for AutonomousDatabaseBackupLifecycleState. + */ + public static final AutonomousDatabaseBackupLifecycleState DELETING = fromString("Deleting"); + + /** + * Static value Failed for AutonomousDatabaseBackupLifecycleState. + */ + public static final AutonomousDatabaseBackupLifecycleState FAILED = fromString("Failed"); + + /** + * Static value Updating for AutonomousDatabaseBackupLifecycleState. + */ + public static final AutonomousDatabaseBackupLifecycleState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of AutonomousDatabaseBackupLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutonomousDatabaseBackupLifecycleState() { + } + + /** + * Creates or finds a AutonomousDatabaseBackupLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutonomousDatabaseBackupLifecycleState. + */ + @JsonCreator + public static AutonomousDatabaseBackupLifecycleState fromString(String name) { + return fromString(name, AutonomousDatabaseBackupLifecycleState.class); + } + + /** + * Gets known AutonomousDatabaseBackupLifecycleState values. + * + * @return known AutonomousDatabaseBackupLifecycleState values. + */ + public static Collection values() { + return values(AutonomousDatabaseBackupLifecycleState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupListResult.java new file mode 100644 index 000000000000..9271c0f23c83 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseBackupInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a AutonomousDatabaseBackup list operation. + */ +@Fluent +public final class AutonomousDatabaseBackupListResult { + /* + * The AutonomousDatabaseBackup items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of AutonomousDatabaseBackupListResult class. + */ + public AutonomousDatabaseBackupListResult() { + } + + /** + * Get the value property: The AutonomousDatabaseBackup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The AutonomousDatabaseBackup items on this page. + * + * @param value the value value to set. + * @return the AutonomousDatabaseBackupListResult object itself. + */ + public AutonomousDatabaseBackupListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 AutonomousDatabaseBackupListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseBackupListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupProperties.java new file mode 100644 index 000000000000..03650a4673b2 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupProperties.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * AutonomousDatabaseBackup resource model. + */ +@Fluent +public final class AutonomousDatabaseBackupProperties { + /* + * The OCID of the Autonomous Database. + */ + @JsonProperty(value = "autonomousDatabaseId", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String autonomousDatabaseId; + + /* + * The size of the database in terabytes at the time the backup was taken. + */ + @JsonProperty(value = "databaseSizeInTBs", access = JsonProperty.Access.WRITE_ONLY) + private Integer databaseSizeInTBs; + + /* + * A valid Oracle Database version for Autonomous Database. + */ + @JsonProperty(value = "dbVersion", access = JsonProperty.Access.WRITE_ONLY) + private String dbVersion; + + /* + * The user-friendly name for the backup. The name does not have to be unique. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The OCID of the Autonomous Database backup. + */ + @JsonProperty(value = "ocid", access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * Indicates whether the backup is user-initiated or automatic. + */ + @JsonProperty(value = "isAutomatic", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isAutomatic; + + /* + * Indicates whether the backup can be used to restore the associated Autonomous Database. + */ + @JsonProperty(value = "isRestorable", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isRestorable; + + /* + * Additional information about the current lifecycle state. + */ + @JsonProperty(value = "lifecycleDetails", access = JsonProperty.Access.WRITE_ONLY) + private String lifecycleDetails; + + /* + * The current state of the backup. + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private AutonomousDatabaseBackupLifecycleState lifecycleState; + + /* + * Retention period, in days, for long-term backups. + */ + @JsonProperty(value = "retentionPeriodInDays") + private Integer retentionPeriodInDays; + + /* + * The backup size in terabytes (TB). + */ + @JsonProperty(value = "sizeInTBs", access = JsonProperty.Access.WRITE_ONLY) + private Integer sizeInTBs; + + /* + * Timestamp until when the backup will be available. + */ + @JsonProperty(value = "timeAvailableTil", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeAvailableTil; + + /* + * The date and time the backup completed. + */ + @JsonProperty(value = "timeEnded", access = JsonProperty.Access.WRITE_ONLY) + private String timeEnded; + + /* + * The type of backup. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private AutonomousDatabaseBackupType type; + + /* + * Azure resource provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AzureResourceProvisioningState provisioningState; + + /** + * Creates an instance of AutonomousDatabaseBackupProperties class. + */ + public AutonomousDatabaseBackupProperties() { + } + + /** + * Get the autonomousDatabaseId property: The OCID of the Autonomous Database. + * + * @return the autonomousDatabaseId value. + */ + public String autonomousDatabaseId() { + return this.autonomousDatabaseId; + } + + /** + * Get the databaseSizeInTBs property: The size of the database in terabytes at the time the backup was taken. + * + * @return the databaseSizeInTBs value. + */ + public Integer databaseSizeInTBs() { + return this.databaseSizeInTBs; + } + + /** + * Get the dbVersion property: A valid Oracle Database version for Autonomous Database. + * + * @return the dbVersion value. + */ + public String dbVersion() { + return this.dbVersion; + } + + /** + * Get the displayName property: The user-friendly name for the backup. The name does not have to be unique. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The user-friendly name for the backup. The name does not have to be unique. + * + * @param displayName the displayName value to set. + * @return the AutonomousDatabaseBackupProperties object itself. + */ + public AutonomousDatabaseBackupProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the ocid property: The OCID of the Autonomous Database backup. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the isAutomatic property: Indicates whether the backup is user-initiated or automatic. + * + * @return the isAutomatic value. + */ + public Boolean isAutomatic() { + return this.isAutomatic; + } + + /** + * Get the isRestorable property: Indicates whether the backup can be used to restore the associated Autonomous + * Database. + * + * @return the isRestorable value. + */ + public Boolean isRestorable() { + return this.isRestorable; + } + + /** + * Get the lifecycleDetails property: Additional information about the current lifecycle state. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Get the lifecycleState property: The current state of the backup. + * + * @return the lifecycleState value. + */ + public AutonomousDatabaseBackupLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * 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 AutonomousDatabaseBackupProperties object itself. + */ + public AutonomousDatabaseBackupProperties withRetentionPeriodInDays(Integer retentionPeriodInDays) { + this.retentionPeriodInDays = retentionPeriodInDays; + return this; + } + + /** + * Get the sizeInTBs property: The backup size in terabytes (TB). + * + * @return the sizeInTBs value. + */ + public Integer sizeInTBs() { + return this.sizeInTBs; + } + + /** + * Get the timeAvailableTil property: Timestamp until when the backup will be available. + * + * @return the timeAvailableTil value. + */ + public OffsetDateTime timeAvailableTil() { + return this.timeAvailableTil; + } + + /** + * Get the timeEnded property: The date and time the backup completed. + * + * @return the timeEnded value. + */ + public String timeEnded() { + return this.timeEnded; + } + + /** + * Get the type property: The type of backup. + * + * @return the type value. + */ + public AutonomousDatabaseBackupType type() { + return this.type; + } + + /** + * Get the provisioningState property: Azure resource 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() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupType.java new file mode 100644 index 000000000000..37cee056b11b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupType.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * AutonomousDatabaseBackupType enum. + */ +public final class AutonomousDatabaseBackupType extends ExpandableStringEnum { + /** + * Static value Incremental for AutonomousDatabaseBackupType. + */ + public static final AutonomousDatabaseBackupType INCREMENTAL = fromString("Incremental"); + + /** + * Static value Full for AutonomousDatabaseBackupType. + */ + public static final AutonomousDatabaseBackupType FULL = fromString("Full"); + + /** + * Static value LongTerm for AutonomousDatabaseBackupType. + */ + public static final AutonomousDatabaseBackupType LONG_TERM = fromString("LongTerm"); + + /** + * Creates a new instance of AutonomousDatabaseBackupType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutonomousDatabaseBackupType() { + } + + /** + * Creates or finds a AutonomousDatabaseBackupType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutonomousDatabaseBackupType. + */ + @JsonCreator + public static AutonomousDatabaseBackupType fromString(String name) { + return fromString(name, AutonomousDatabaseBackupType.class); + } + + /** + * Gets known AutonomousDatabaseBackupType values. + * + * @return known AutonomousDatabaseBackupType values. + */ + public static Collection values() { + return values(AutonomousDatabaseBackupType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupUpdate.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupUpdate.java new file mode 100644 index 000000000000..ef0bcc152040 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupUpdate.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The type used for update operations of the AutonomousDatabaseBackup. + */ +@Fluent +public final class AutonomousDatabaseBackupUpdate { + /* + * The updatable properties of the AutonomousDatabaseBackup. + */ + @JsonProperty(value = "properties") + private AutonomousDatabaseBackupUpdateProperties properties; + + /** + * Creates an instance of AutonomousDatabaseBackupUpdate class. + */ + public AutonomousDatabaseBackupUpdate() { + } + + /** + * Get the properties property: The updatable properties of the AutonomousDatabaseBackup. + * + * @return the properties value. + */ + public AutonomousDatabaseBackupUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the AutonomousDatabaseBackup. + * + * @param properties the properties value to set. + * @return the AutonomousDatabaseBackupUpdate object itself. + */ + public AutonomousDatabaseBackupUpdate withProperties(AutonomousDatabaseBackupUpdateProperties 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(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupUpdateProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupUpdateProperties.java new file mode 100644 index 000000000000..427dfac0a9b5 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackupUpdateProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The updatable properties of the AutonomousDatabaseBackup. + */ +@Fluent +public final class AutonomousDatabaseBackupUpdateProperties { + /* + * Retention period, in days, for long-term backups. + */ + @JsonProperty(value = "retentionPeriodInDays") + 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() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackups.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackups.java new file mode 100644 index 000000000000..c7a5df040765 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBackups.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 AutonomousDatabaseBackups. + */ +public interface AutonomousDatabaseBackups { + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename); + + /** + * List AutonomousDatabaseBackup resources by AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseBackup list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByAutonomousDatabase(String resourceGroupName, + String autonomousdatabasename, Context context); + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String autonomousdatabasename, + String adbbackupid, Context context); + + /** + * Get a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseBackup. + */ + AutonomousDatabaseBackup get(String resourceGroupName, String autonomousdatabasename, String adbbackupid); + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid); + + /** + * Delete a AutonomousDatabaseBackup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param adbbackupid AutonomousDatabaseBackup id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String autonomousdatabasename, String adbbackupid, Context context); + + /** + * Get a AutonomousDatabaseBackup. + * + * @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 AutonomousDatabaseBackup along with {@link Response}. + */ + AutonomousDatabaseBackup getById(String id); + + /** + * Get a AutonomousDatabaseBackup. + * + * @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 AutonomousDatabaseBackup along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a AutonomousDatabaseBackup. + * + * @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 AutonomousDatabaseBackup. + * + * @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 AutonomousDatabaseBackup resource. + * + * @param name resource name. + * @return the first stage of the new AutonomousDatabaseBackup definition. + */ + AutonomousDatabaseBackup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBaseProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBaseProperties.java new file mode 100644 index 000000000000..d59554b8d6d9 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseBaseProperties.java @@ -0,0 +1,1569 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Autonomous Database base resource model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "dataBaseType", + defaultImpl = AutonomousDatabaseBaseProperties.class, + visible = true) +@JsonTypeName("AutonomousDatabaseBaseProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Clone", value = AutonomousDatabaseCloneProperties.class), + @JsonSubTypes.Type(name = "Regular", value = AutonomousDatabaseProperties.class) }) +@Fluent +public class AutonomousDatabaseBaseProperties { + /* + * Database type to be created. + */ + @JsonTypeId + @JsonProperty(value = "dataBaseType", required = true) + private DataBaseType dataBaseType; + + /* + * Admin password. + */ + @JsonProperty(value = "adminPassword") + private String adminPassword; + + /* + * The maintenance schedule type of the Autonomous Database Serverless. + */ + @JsonProperty(value = "autonomousMaintenanceScheduleType") + private AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType; + + /* + * The character set for the autonomous database. + */ + @JsonProperty(value = "characterSet") + private String characterSet; + + /* + * The compute amount (CPUs) available to the database. + */ + @JsonProperty(value = "computeCount") + private Float computeCount; + + /* + * The compute model of the Autonomous Database. + */ + @JsonProperty(value = "computeModel") + private ComputeModel computeModel; + + /* + * The number of CPU cores to be made available to the database. + */ + @JsonProperty(value = "cpuCoreCount") + private Integer cpuCoreCount; + + /* + * Customer Contacts. + */ + @JsonProperty(value = "customerContacts") + private List customerContacts; + + /* + * The quantity of data in the database, in terabytes. + */ + @JsonProperty(value = "dataStorageSizeInTbs") + private Integer dataStorageSizeInTbs; + + /* + * The size, in gigabytes, of the data volume that will be created and attached to the database. + */ + @JsonProperty(value = "dataStorageSizeInGbs") + private Integer dataStorageSizeInGbs; + + /* + * A valid Oracle Database version for Autonomous Database. + */ + @JsonProperty(value = "dbVersion") + private String dbVersion; + + /* + * The Autonomous Database workload type + */ + @JsonProperty(value = "dbWorkload") + private WorkloadType dbWorkload; + + /* + * The user-friendly name for the Autonomous Database. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + */ + @JsonProperty(value = "isAutoScalingEnabled") + private Boolean isAutoScalingEnabled; + + /* + * Indicates if auto scaling is enabled for the Autonomous Database storage. + */ + @JsonProperty(value = "isAutoScalingForStorageEnabled") + private Boolean isAutoScalingForStorageEnabled; + + /* + * 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. + */ + @JsonProperty(value = "peerDbIds", access = JsonProperty.Access.WRITE_ONLY) + private List peerDbIds; + + /* + * The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + */ + @JsonProperty(value = "peerDbId") + private String peerDbId; + + /* + * Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + */ + @JsonProperty(value = "isLocalDataGuardEnabled") + private Boolean isLocalDataGuardEnabled; + + /* + * Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + */ + @JsonProperty(value = "isRemoteDataGuardEnabled", access = JsonProperty.Access.WRITE_ONLY) + 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. + */ + @JsonProperty(value = "localDisasterRecoveryType", access = JsonProperty.Access.WRITE_ONLY) + private DisasterRecoveryType localDisasterRecoveryType; + + /* + * Local Autonomous Disaster Recovery standby database details. + */ + @JsonProperty(value = "localStandbyDb", access = JsonProperty.Access.WRITE_ONLY) + private AutonomousDatabaseStandbySummary localStandbyDb; + + /* + * Indicates the number of seconds of data loss for a Data Guard failover. + */ + @JsonProperty(value = "failedDataRecoveryInSeconds", access = JsonProperty.Access.WRITE_ONLY) + private Integer failedDataRecoveryInSeconds; + + /* + * Specifies if the Autonomous Database requires mTLS connections. + */ + @JsonProperty(value = "isMtlsConnectionRequired") + private Boolean isMtlsConnectionRequired; + + /* + * Specifies if the Autonomous Database preview version is being provisioned. + */ + @JsonProperty(value = "isPreviewVersionWithServiceTermsAccepted") + private Boolean isPreviewVersionWithServiceTermsAccepted; + + /* + * The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + */ + @JsonProperty(value = "licenseModel") + private LicenseModel licenseModel; + + /* + * The character set for the Autonomous Database. + */ + @JsonProperty(value = "ncharacterSet") + private String ncharacterSet; + + /* + * Additional information about the current lifecycle state. + */ + @JsonProperty(value = "lifecycleDetails", access = JsonProperty.Access.WRITE_ONLY) + private String lifecycleDetails; + + /* + * Azure resource provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AzureResourceProvisioningState provisioningState; + + /* + * Views lifecycleState + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private AutonomousDatabaseLifecycleState lifecycleState; + + /* + * The list of scheduled operations. + */ + @JsonProperty(value = "scheduledOperations") + private ScheduledOperationsType scheduledOperations; + + /* + * The private endpoint Ip address for the resource. + */ + @JsonProperty(value = "privateEndpointIp") + private String privateEndpointIp; + + /* + * The resource's private endpoint label. + */ + @JsonProperty(value = "privateEndpointLabel") + private String privateEndpointLabel; + + /* + * HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + */ + @JsonProperty(value = "ociUrl", access = JsonProperty.Access.WRITE_ONLY) + private String ociUrl; + + /* + * Client subnet + */ + @JsonProperty(value = "subnetId") + private String subnetId; + + /* + * VNET for network connectivity + */ + @JsonProperty(value = "vnetId") + private String vnetId; + + /* + * The date and time that the database was created. + */ + @JsonProperty(value = "timeCreated", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeCreated; + + /* + * The date and time when maintenance will begin. + */ + @JsonProperty(value = "timeMaintenanceBegin", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeMaintenanceBegin; + + /* + * The date and time when maintenance will end. + */ + @JsonProperty(value = "timeMaintenanceEnd", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeMaintenanceEnd; + + /* + * The current amount of storage in use for user and system data, in terabytes (TB). + */ + @JsonProperty(value = "actualUsedDataStorageSizeInTbs", access = JsonProperty.Access.WRITE_ONLY) + private Double actualUsedDataStorageSizeInTbs; + + /* + * The amount of storage currently allocated for the database tables and billed for, rounded up. + */ + @JsonProperty(value = "allocatedStorageSizeInTbs", access = JsonProperty.Access.WRITE_ONLY) + private Double allocatedStorageSizeInTbs; + + /* + * Information about Oracle APEX Application Development. + */ + @JsonProperty(value = "apexDetails", access = JsonProperty.Access.WRITE_ONLY) + private ApexDetailsType apexDetails; + + /* + * List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + */ + @JsonProperty(value = "availableUpgradeVersions", access = JsonProperty.Access.WRITE_ONLY) + private List availableUpgradeVersions; + + /* + * The connection string used to connect to the Autonomous Database. + */ + @JsonProperty(value = "connectionStrings", access = JsonProperty.Access.WRITE_ONLY) + 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. + */ + @JsonProperty(value = "connectionUrls", access = JsonProperty.Access.WRITE_ONLY) + private ConnectionUrlType connectionUrls; + + /* + * Status of the Data Safe registration for this Autonomous Database. + */ + @JsonProperty(value = "dataSafeStatus", access = JsonProperty.Access.WRITE_ONLY) + private DataSafeStatusType dataSafeStatus; + + /* + * The Oracle Database Edition that applies to the Autonomous databases. + */ + @JsonProperty(value = "databaseEdition") + private DatabaseEditionType databaseEdition; + + /* + * Autonomous Database ID + */ + @JsonProperty(value = "autonomousDatabaseId") + private String autonomousDatabaseId; + + /* + * The area assigned to In-Memory tables in Autonomous Database. + */ + @JsonProperty(value = "inMemoryAreaInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer inMemoryAreaInGbs; + + /* + * Indicates if the Autonomous Database version is a preview version. + */ + @JsonProperty(value = "isPreview", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPreview; + + /* + * Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard + */ + @JsonProperty(value = "localAdgAutoFailoverMaxDataLossLimit") + private Integer localAdgAutoFailoverMaxDataLossLimit; + + /* + * The amount of memory (in GBs) enabled per ECPU or OCPU. + */ + @JsonProperty(value = "memoryPerOracleComputeUnitInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer memoryPerOracleComputeUnitInGbs; + + /* + * Indicates the Autonomous Database mode. + */ + @JsonProperty(value = "openMode") + private OpenModeType openMode; + + /* + * Status of Operations Insights for this Autonomous Database. + */ + @JsonProperty(value = "operationsInsightsStatus", access = JsonProperty.Access.WRITE_ONLY) + private OperationsInsightsStatusType operationsInsightsStatus; + + /* + * The Autonomous Database permission level. + */ + @JsonProperty(value = "permissionLevel") + private PermissionLevelType permissionLevel; + + /* + * The private endpoint for the resource. + */ + @JsonProperty(value = "privateEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String privateEndpoint; + + /* + * An array of CPU values that an Autonomous Database can be scaled to. + */ + @JsonProperty(value = "provisionableCpus", access = JsonProperty.Access.WRITE_ONLY) + private List provisionableCpus; + + /* + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + */ + @JsonProperty(value = "role") + private RoleType role; + + /* + * The URL of the Service Console for the Autonomous Database. + */ + @JsonProperty(value = "serviceConsoleUrl", access = JsonProperty.Access.WRITE_ONLY) + private String serviceConsoleUrl; + + /* + * The SQL Web Developer URL for the Oracle Autonomous Database. + */ + @JsonProperty(value = "sqlWebDeveloperUrl", access = JsonProperty.Access.WRITE_ONLY) + private String sqlWebDeveloperUrl; + + /* + * The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + */ + @JsonProperty(value = "supportedRegionsToCloneTo", access = JsonProperty.Access.WRITE_ONLY) + private List supportedRegionsToCloneTo; + + /* + * The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + */ + @JsonProperty(value = "timeDataGuardRoleChanged", access = JsonProperty.Access.WRITE_ONLY) + private String timeDataGuardRoleChanged; + + /* + * The date and time the Always Free database will be automatically deleted because of inactivity. + */ + @JsonProperty(value = "timeDeletionOfFreeAutonomousDatabase", access = JsonProperty.Access.WRITE_ONLY) + 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. + */ + @JsonProperty(value = "timeLocalDataGuardEnabled", access = JsonProperty.Access.WRITE_ONLY) + private String timeLocalDataGuardEnabled; + + /* + * The timestamp of the last failover operation. + */ + @JsonProperty(value = "timeOfLastFailover", access = JsonProperty.Access.WRITE_ONLY) + private String timeOfLastFailover; + + /* + * The date and time when last refresh happened. + */ + @JsonProperty(value = "timeOfLastRefresh", access = JsonProperty.Access.WRITE_ONLY) + private String timeOfLastRefresh; + + /* + * The refresh point timestamp (UTC). + */ + @JsonProperty(value = "timeOfLastRefreshPoint", access = JsonProperty.Access.WRITE_ONLY) + private String timeOfLastRefreshPoint; + + /* + * The timestamp of the last switchover operation for the Autonomous Database. + */ + @JsonProperty(value = "timeOfLastSwitchover", access = JsonProperty.Access.WRITE_ONLY) + private String timeOfLastSwitchover; + + /* + * The date and time the Always Free database will be stopped because of inactivity. + */ + @JsonProperty(value = "timeReclamationOfFreeAutonomousDatabase", access = JsonProperty.Access.WRITE_ONLY) + private String timeReclamationOfFreeAutonomousDatabase; + + /* + * The storage space consumed by Autonomous Database in GBs. + */ + @JsonProperty(value = "usedDataStorageSizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer usedDataStorageSizeInGbs; + + /* + * The amount of storage that has been used, in terabytes. + */ + @JsonProperty(value = "usedDataStorageSizeInTbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer usedDataStorageSizeInTbs; + + /* + * Database ocid + */ + @JsonProperty(value = "ocid", access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * Retention period, in days, for long-term backups + */ + @JsonProperty(value = "backupRetentionPeriodInDays") + private Integer backupRetentionPeriodInDays; + + /* + * The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + */ + @JsonProperty(value = "whitelistedIps") + private List whitelistedIps; + + /** + * Creates an instance of AutonomousDatabaseBaseProperties class. + */ + public AutonomousDatabaseBaseProperties() { + this.dataBaseType = DataBaseType.fromString("AutonomousDatabaseBaseProperties"); + } + + /** + * Get the dataBaseType property: Database type to be created. + * + * @return the dataBaseType value. + */ + public DataBaseType dataBaseType() { + return this.dataBaseType; + } + + /** + * Get the adminPassword property: Admin password. + * + * @return the adminPassword value. + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set the adminPassword property: Admin password. + * + * @param adminPassword the adminPassword value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + + /** + * Get the autonomousMaintenanceScheduleType property: The maintenance schedule type of the Autonomous Database + * Serverless. + * + * @return the autonomousMaintenanceScheduleType value. + */ + public AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType() { + return this.autonomousMaintenanceScheduleType; + } + + /** + * Set the autonomousMaintenanceScheduleType property: The maintenance schedule type of the Autonomous Database + * Serverless. + * + * @param autonomousMaintenanceScheduleType the autonomousMaintenanceScheduleType value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties + withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType) { + this.autonomousMaintenanceScheduleType = autonomousMaintenanceScheduleType; + return this; + } + + /** + * Get the characterSet property: The character set for the autonomous database. + * + * @return the characterSet value. + */ + public String characterSet() { + return this.characterSet; + } + + /** + * Set the characterSet property: The character set for the autonomous database. + * + * @param characterSet the characterSet value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withCharacterSet(String characterSet) { + this.characterSet = characterSet; + return this; + } + + /** + * Get the computeCount property: The compute amount (CPUs) available to the database. + * + * @return the computeCount value. + */ + public Float computeCount() { + return this.computeCount; + } + + /** + * Set the computeCount property: The compute amount (CPUs) available to the database. + * + * @param computeCount the computeCount value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withComputeCount(Float computeCount) { + this.computeCount = computeCount; + return this; + } + + /** + * Get the computeModel property: The compute model of the Autonomous Database. + * + * @return the computeModel value. + */ + public ComputeModel computeModel() { + return this.computeModel; + } + + /** + * Set the computeModel property: The compute model of the Autonomous Database. + * + * @param computeModel the computeModel value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withComputeModel(ComputeModel computeModel) { + this.computeModel = computeModel; + return this; + } + + /** + * Get the cpuCoreCount property: The number of CPU cores to be made available to the database. + * + * @return the cpuCoreCount value. + */ + public Integer cpuCoreCount() { + return this.cpuCoreCount; + } + + /** + * Set the cpuCoreCount property: The number of CPU cores to be made available to the database. + * + * @param cpuCoreCount the cpuCoreCount value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withCpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + return this; + } + + /** + * Get the customerContacts property: Customer Contacts. + * + * @return the customerContacts value. + */ + public List customerContacts() { + return this.customerContacts; + } + + /** + * Set the customerContacts property: Customer Contacts. + * + * @param customerContacts the customerContacts value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withCustomerContacts(List customerContacts) { + this.customerContacts = customerContacts; + return this; + } + + /** + * Get the dataStorageSizeInTbs property: The quantity of data in the database, in terabytes. + * + * @return the dataStorageSizeInTbs value. + */ + public Integer dataStorageSizeInTbs() { + return this.dataStorageSizeInTbs; + } + + /** + * Set the dataStorageSizeInTbs property: The quantity of data in the database, in terabytes. + * + * @param dataStorageSizeInTbs the dataStorageSizeInTbs value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withDataStorageSizeInTbs(Integer dataStorageSizeInTbs) { + this.dataStorageSizeInTbs = dataStorageSizeInTbs; + return this; + } + + /** + * Get the dataStorageSizeInGbs property: The size, in gigabytes, of the data volume that will be created and + * attached to the database. + * + * @return the dataStorageSizeInGbs value. + */ + public Integer dataStorageSizeInGbs() { + return this.dataStorageSizeInGbs; + } + + /** + * Set the dataStorageSizeInGbs property: The size, in gigabytes, of the data volume that will be created and + * attached to the database. + * + * @param dataStorageSizeInGbs the dataStorageSizeInGbs value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withDataStorageSizeInGbs(Integer dataStorageSizeInGbs) { + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + return this; + } + + /** + * Get the dbVersion property: A valid Oracle Database version for Autonomous Database. + * + * @return the dbVersion value. + */ + public String dbVersion() { + return this.dbVersion; + } + + /** + * Set the dbVersion property: A valid Oracle Database version for Autonomous Database. + * + * @param dbVersion the dbVersion value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withDbVersion(String dbVersion) { + this.dbVersion = dbVersion; + return this; + } + + /** + * Get the dbWorkload property: The Autonomous Database workload type. + * + * @return the dbWorkload value. + */ + public WorkloadType dbWorkload() { + return this.dbWorkload; + } + + /** + * Set the dbWorkload property: The Autonomous Database workload type. + * + * @param dbWorkload the dbWorkload value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withDbWorkload(WorkloadType dbWorkload) { + this.dbWorkload = dbWorkload; + return this; + } + + /** + * Get the displayName property: The user-friendly name for the Autonomous Database. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The user-friendly name for the Autonomous Database. + * + * @param displayName the displayName value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the isAutoScalingEnabled property: Indicates if auto scaling is enabled for the Autonomous Database CPU core + * count. + * + * @return the isAutoScalingEnabled value. + */ + public Boolean isAutoScalingEnabled() { + return this.isAutoScalingEnabled; + } + + /** + * Set the isAutoScalingEnabled property: Indicates if auto scaling is enabled for the Autonomous Database CPU core + * count. + * + * @param isAutoScalingEnabled the isAutoScalingEnabled value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withIsAutoScalingEnabled(Boolean isAutoScalingEnabled) { + this.isAutoScalingEnabled = isAutoScalingEnabled; + return this; + } + + /** + * Get the isAutoScalingForStorageEnabled property: Indicates if auto scaling is enabled for the Autonomous Database + * storage. + * + * @return the isAutoScalingForStorageEnabled value. + */ + public Boolean isAutoScalingForStorageEnabled() { + return this.isAutoScalingForStorageEnabled; + } + + /** + * Set the isAutoScalingForStorageEnabled property: Indicates if auto scaling is enabled for the Autonomous Database + * storage. + * + * @param isAutoScalingForStorageEnabled the isAutoScalingForStorageEnabled value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withIsAutoScalingForStorageEnabled(Boolean isAutoScalingForStorageEnabled) { + this.isAutoScalingForStorageEnabled = isAutoScalingForStorageEnabled; + 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. + */ + public List peerDbIds() { + return this.peerDbIds; + } + + /** + * Get the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * different region from the current peer database. + * + * @return the peerDbId value. + */ + public String peerDbId() { + return this.peerDbId; + } + + /** + * Set the peerDbId property: The database OCID 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. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withPeerDbId(String peerDbId) { + this.peerDbId = peerDbId; + return this; + } + + /** + * Get the isLocalDataGuardEnabled property: Indicates whether the Autonomous Database has local or called in-region + * Data Guard enabled. + * + * @return the isLocalDataGuardEnabled value. + */ + public Boolean isLocalDataGuardEnabled() { + return this.isLocalDataGuardEnabled; + } + + /** + * Set the isLocalDataGuardEnabled property: Indicates whether the Autonomous Database has local or called in-region + * Data Guard enabled. + * + * @param isLocalDataGuardEnabled the isLocalDataGuardEnabled value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withIsLocalDataGuardEnabled(Boolean isLocalDataGuardEnabled) { + this.isLocalDataGuardEnabled = isLocalDataGuardEnabled; + return this; + } + + /** + * Get the isRemoteDataGuardEnabled property: Indicates whether the Autonomous Database has Cross Region Data Guard + * enabled. + * + * @return the isRemoteDataGuardEnabled value. + */ + 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. + */ + public DisasterRecoveryType localDisasterRecoveryType() { + return this.localDisasterRecoveryType; + } + + /** + * Get the localStandbyDb property: Local Autonomous Disaster Recovery standby database details. + * + * @return the localStandbyDb value. + */ + 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. + */ + public Integer failedDataRecoveryInSeconds() { + return this.failedDataRecoveryInSeconds; + } + + /** + * Get the isMtlsConnectionRequired property: Specifies if the Autonomous Database requires mTLS connections. + * + * @return the isMtlsConnectionRequired value. + */ + public Boolean isMtlsConnectionRequired() { + return this.isMtlsConnectionRequired; + } + + /** + * Set the isMtlsConnectionRequired property: Specifies if the Autonomous Database requires mTLS connections. + * + * @param isMtlsConnectionRequired the isMtlsConnectionRequired value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withIsMtlsConnectionRequired(Boolean isMtlsConnectionRequired) { + this.isMtlsConnectionRequired = isMtlsConnectionRequired; + return this; + } + + /** + * Get the isPreviewVersionWithServiceTermsAccepted property: Specifies if the Autonomous Database preview version + * is being provisioned. + * + * @return the isPreviewVersionWithServiceTermsAccepted value. + */ + public Boolean isPreviewVersionWithServiceTermsAccepted() { + return this.isPreviewVersionWithServiceTermsAccepted; + } + + /** + * Set the isPreviewVersionWithServiceTermsAccepted property: Specifies if the Autonomous Database preview version + * is being provisioned. + * + * @param isPreviewVersionWithServiceTermsAccepted the isPreviewVersionWithServiceTermsAccepted value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties + withIsPreviewVersionWithServiceTermsAccepted(Boolean isPreviewVersionWithServiceTermsAccepted) { + this.isPreviewVersionWithServiceTermsAccepted = isPreviewVersionWithServiceTermsAccepted; + return this; + } + + /** + * Get the licenseModel property: The Oracle license model that applies to the Oracle Autonomous Database. 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 Oracle Autonomous Database. The + * default is LICENSE_INCLUDED. + * + * @param licenseModel the licenseModel value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withLicenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + return this; + } + + /** + * Get the ncharacterSet property: The character set for the Autonomous Database. + * + * @return the ncharacterSet value. + */ + public String ncharacterSet() { + return this.ncharacterSet; + } + + /** + * Set the ncharacterSet property: The character set for the Autonomous Database. + * + * @param ncharacterSet the ncharacterSet value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withNcharacterSet(String ncharacterSet) { + this.ncharacterSet = ncharacterSet; + 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 provisioningState property: Azure resource provisioning state. + * + * @return the provisioningState value. + */ + public AzureResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the lifecycleState property: Views lifecycleState. + * + * @return the lifecycleState value. + */ + public AutonomousDatabaseLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the scheduledOperations property: The list of scheduled operations. + * + * @return the scheduledOperations value. + */ + public ScheduledOperationsType scheduledOperations() { + return this.scheduledOperations; + } + + /** + * Set the scheduledOperations property: The list of scheduled operations. + * + * @param scheduledOperations the scheduledOperations value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withScheduledOperations(ScheduledOperationsType scheduledOperations) { + this.scheduledOperations = scheduledOperations; + return this; + } + + /** + * Get the privateEndpointIp property: The private endpoint Ip address for the resource. + * + * @return the privateEndpointIp value. + */ + public String privateEndpointIp() { + return this.privateEndpointIp; + } + + /** + * Set the privateEndpointIp property: The private endpoint Ip address for the resource. + * + * @param privateEndpointIp the privateEndpointIp value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withPrivateEndpointIp(String privateEndpointIp) { + this.privateEndpointIp = privateEndpointIp; + return this; + } + + /** + * Get the privateEndpointLabel property: The resource's private endpoint label. + * + * @return the privateEndpointLabel value. + */ + public String privateEndpointLabel() { + return this.privateEndpointLabel; + } + + /** + * Set the privateEndpointLabel property: The resource's private endpoint label. + * + * @param privateEndpointLabel the privateEndpointLabel value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withPrivateEndpointLabel(String privateEndpointLabel) { + this.privateEndpointLabel = privateEndpointLabel; + return this; + } + + /** + * 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 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 AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * 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 AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withVnetId(String vnetId) { + this.vnetId = vnetId; + return this; + } + + /** + * Get the timeCreated property: The date and time that the database was created. + * + * @return the timeCreated value. + */ + public OffsetDateTime timeCreated() { + return this.timeCreated; + } + + /** + * Get the timeMaintenanceBegin property: The date and time when maintenance will begin. + * + * @return the timeMaintenanceBegin value. + */ + public OffsetDateTime timeMaintenanceBegin() { + return this.timeMaintenanceBegin; + } + + /** + * Get the timeMaintenanceEnd property: The date and time when maintenance will end. + * + * @return the timeMaintenanceEnd value. + */ + 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. + */ + 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. + */ + public Double allocatedStorageSizeInTbs() { + return this.allocatedStorageSizeInTbs; + } + + /** + * Get the apexDetails property: Information about Oracle APEX Application Development. + * + * @return the apexDetails value. + */ + 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. + */ + public List availableUpgradeVersions() { + return this.availableUpgradeVersions; + } + + /** + * Get the connectionStrings property: The connection string used to connect to the Autonomous Database. + * + * @return the connectionStrings value. + */ + 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. + */ + public ConnectionUrlType connectionUrls() { + return this.connectionUrls; + } + + /** + * Get the dataSafeStatus property: Status of the Data Safe registration for this Autonomous Database. + * + * @return the dataSafeStatus value. + */ + public DataSafeStatusType dataSafeStatus() { + return this.dataSafeStatus; + } + + /** + * Get the databaseEdition property: The Oracle Database Edition that applies to the Autonomous databases. + * + * @return the databaseEdition value. + */ + public DatabaseEditionType databaseEdition() { + return this.databaseEdition; + } + + /** + * Set the databaseEdition property: The Oracle Database Edition that applies to the Autonomous databases. + * + * @param databaseEdition the databaseEdition value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withDatabaseEdition(DatabaseEditionType databaseEdition) { + this.databaseEdition = databaseEdition; + return this; + } + + /** + * Get the autonomousDatabaseId property: Autonomous Database ID. + * + * @return the autonomousDatabaseId value. + */ + public String autonomousDatabaseId() { + return this.autonomousDatabaseId; + } + + /** + * Set the autonomousDatabaseId property: Autonomous Database ID. + * + * @param autonomousDatabaseId the autonomousDatabaseId value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withAutonomousDatabaseId(String autonomousDatabaseId) { + this.autonomousDatabaseId = autonomousDatabaseId; + return this; + } + + /** + * Get the inMemoryAreaInGbs property: The area assigned to In-Memory tables in Autonomous Database. + * + * @return the inMemoryAreaInGbs value. + */ + public Integer inMemoryAreaInGbs() { + return this.inMemoryAreaInGbs; + } + + /** + * Get the isPreview property: Indicates if the Autonomous Database version is a preview version. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Get the localAdgAutoFailoverMaxDataLossLimit property: Parameter that allows users to select an acceptable + * maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local + * Autonomous Data Guard. + * + * @return the localAdgAutoFailoverMaxDataLossLimit value. + */ + public Integer localAdgAutoFailoverMaxDataLossLimit() { + return this.localAdgAutoFailoverMaxDataLossLimit; + } + + /** + * Set the localAdgAutoFailoverMaxDataLossLimit property: Parameter that allows users to select an acceptable + * maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local + * Autonomous Data Guard. + * + * @param localAdgAutoFailoverMaxDataLossLimit the localAdgAutoFailoverMaxDataLossLimit value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties + withLocalAdgAutoFailoverMaxDataLossLimit(Integer localAdgAutoFailoverMaxDataLossLimit) { + this.localAdgAutoFailoverMaxDataLossLimit = localAdgAutoFailoverMaxDataLossLimit; + return this; + } + + /** + * Get the memoryPerOracleComputeUnitInGbs property: The amount of memory (in GBs) enabled per ECPU or OCPU. + * + * @return the memoryPerOracleComputeUnitInGbs value. + */ + public Integer memoryPerOracleComputeUnitInGbs() { + return this.memoryPerOracleComputeUnitInGbs; + } + + /** + * Get the openMode property: Indicates the Autonomous Database mode. + * + * @return the openMode value. + */ + public OpenModeType openMode() { + return this.openMode; + } + + /** + * Set the openMode property: Indicates the Autonomous Database mode. + * + * @param openMode the openMode value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withOpenMode(OpenModeType openMode) { + this.openMode = openMode; + return this; + } + + /** + * Get the operationsInsightsStatus property: Status of Operations Insights for this Autonomous Database. + * + * @return the operationsInsightsStatus value. + */ + public OperationsInsightsStatusType operationsInsightsStatus() { + return this.operationsInsightsStatus; + } + + /** + * Get the permissionLevel property: The Autonomous Database permission level. + * + * @return the permissionLevel value. + */ + public PermissionLevelType permissionLevel() { + return this.permissionLevel; + } + + /** + * Set the permissionLevel property: The Autonomous Database permission level. + * + * @param permissionLevel the permissionLevel value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withPermissionLevel(PermissionLevelType permissionLevel) { + this.permissionLevel = permissionLevel; + return this; + } + + /** + * Get the privateEndpoint property: The private endpoint for the resource. + * + * @return the privateEndpoint value. + */ + 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. + */ + public List provisionableCpus() { + return this.provisionableCpus; + } + + /** + * Get the role property: The Data Guard role of the Autonomous Container Database or Autonomous Database, if + * Autonomous Data Guard is enabled. + * + * @return the role value. + */ + public RoleType role() { + return this.role; + } + + /** + * Set the role property: The Data Guard role of the Autonomous Container Database or Autonomous Database, if + * Autonomous Data Guard is enabled. + * + * @param role the role value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withRole(RoleType role) { + this.role = role; + return this; + } + + /** + * Get the serviceConsoleUrl property: The URL of the Service Console for the Autonomous Database. + * + * @return the serviceConsoleUrl value. + */ + public String serviceConsoleUrl() { + return this.serviceConsoleUrl; + } + + /** + * Get the sqlWebDeveloperUrl property: The SQL Web Developer URL for the Oracle Autonomous Database. + * + * @return the sqlWebDeveloperUrl value. + */ + 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. + */ + 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. + */ + 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. + */ + 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. + */ + public String timeLocalDataGuardEnabled() { + return this.timeLocalDataGuardEnabled; + } + + /** + * Get the timeOfLastFailover property: The timestamp of the last failover operation. + * + * @return the timeOfLastFailover value. + */ + public String timeOfLastFailover() { + return this.timeOfLastFailover; + } + + /** + * Get the timeOfLastRefresh property: The date and time when last refresh happened. + * + * @return the timeOfLastRefresh value. + */ + public String timeOfLastRefresh() { + return this.timeOfLastRefresh; + } + + /** + * Get the timeOfLastRefreshPoint property: The refresh point timestamp (UTC). + * + * @return the timeOfLastRefreshPoint value. + */ + 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. + */ + 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. + */ + public String timeReclamationOfFreeAutonomousDatabase() { + return this.timeReclamationOfFreeAutonomousDatabase; + } + + /** + * Get the usedDataStorageSizeInGbs property: The storage space consumed by Autonomous Database in GBs. + * + * @return the usedDataStorageSizeInGbs value. + */ + public Integer usedDataStorageSizeInGbs() { + return this.usedDataStorageSizeInGbs; + } + + /** + * Get the usedDataStorageSizeInTbs property: The amount of storage that has been used, in terabytes. + * + * @return the usedDataStorageSizeInTbs value. + */ + public Integer usedDataStorageSizeInTbs() { + return this.usedDataStorageSizeInTbs; + } + + /** + * Get the ocid property: Database ocid. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the backupRetentionPeriodInDays property: Retention period, in days, for long-term backups. + * + * @return the backupRetentionPeriodInDays value. + */ + public Integer backupRetentionPeriodInDays() { + return this.backupRetentionPeriodInDays; + } + + /** + * Set the backupRetentionPeriodInDays property: Retention period, in days, for long-term backups. + * + * @param backupRetentionPeriodInDays the backupRetentionPeriodInDays value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withBackupRetentionPeriodInDays(Integer backupRetentionPeriodInDays) { + this.backupRetentionPeriodInDays = backupRetentionPeriodInDays; + return this; + } + + /** + * Get the whitelistedIps property: The client IP access control list (ACL). This is an array of CIDR notations + * and/or IP addresses. Values should be separate strings, separated by commas. Example: + * ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + * + * @return the whitelistedIps value. + */ + public List whitelistedIps() { + return this.whitelistedIps; + } + + /** + * Set the whitelistedIps property: The client IP access control list (ACL). This is an array of CIDR notations + * and/or IP addresses. Values should be separate strings, separated by commas. Example: + * ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + * + * @param whitelistedIps the whitelistedIps value to set. + * @return the AutonomousDatabaseBaseProperties object itself. + */ + public AutonomousDatabaseBaseProperties withWhitelistedIps(List whitelistedIps) { + this.whitelistedIps = whitelistedIps; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (customerContacts() != null) { + customerContacts().forEach(e -> e.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(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSet.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSet.java new file mode 100644 index 000000000000..f6bbbaf5ce5f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSet.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseCharacterSetInner; + +/** + * An immutable client-side representation of AutonomousDatabaseCharacterSet. + */ +public interface AutonomousDatabaseCharacterSet { + /** + * 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. + */ + AutonomousDatabaseCharacterSetProperties 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.oracle.fluent.models.AutonomousDatabaseCharacterSetInner object. + * + * @return the inner object. + */ + AutonomousDatabaseCharacterSetInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSetListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSetListResult.java new file mode 100644 index 000000000000..162aeb9818f2 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSetListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseCharacterSetInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a AutonomousDatabaseCharacterSet list operation. + */ +@Fluent +public final class AutonomousDatabaseCharacterSetListResult { + /* + * The AutonomousDatabaseCharacterSet items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of AutonomousDatabaseCharacterSetListResult class. + */ + public AutonomousDatabaseCharacterSetListResult() { + } + + /** + * Get the value property: The AutonomousDatabaseCharacterSet items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The AutonomousDatabaseCharacterSet items on this page. + * + * @param value the value value to set. + * @return the AutonomousDatabaseCharacterSetListResult object itself. + */ + public AutonomousDatabaseCharacterSetListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 AutonomousDatabaseCharacterSetListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseCharacterSetListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSetProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSetProperties.java new file mode 100644 index 000000000000..af6fc3ef5b00 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSetProperties.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.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutonomousDatabaseCharacterSet resource model. + */ +@Immutable +public final class AutonomousDatabaseCharacterSetProperties { + /* + * The Oracle Autonomous Database supported character sets. + */ + @JsonProperty(value = "characterSet", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String characterSet; + + /** + * Creates an instance of AutonomousDatabaseCharacterSetProperties class. + */ + public AutonomousDatabaseCharacterSetProperties() { + } + + /** + * Get the characterSet property: The Oracle Autonomous Database supported character sets. + * + * @return the characterSet value. + */ + public String characterSet() { + return this.characterSet; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSets.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSets.java new file mode 100644 index 000000000000..e3a0a02d109d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCharacterSets.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 AutonomousDatabaseCharacterSets. + */ +public interface AutonomousDatabaseCharacterSets { + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @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 AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByLocation(String location); + + /** + * List AutonomousDatabaseCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByLocation(String location, Context context); + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet along with {@link Response}. + */ + Response getWithResponse(String location, String adbscharsetname, Context context); + + /** + * Get a AutonomousDatabaseCharacterSet. + * + * @param location The name of the Azure region. + * @param adbscharsetname AutonomousDatabaseCharacterSet name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseCharacterSet. + */ + AutonomousDatabaseCharacterSet get(String location, String adbscharsetname); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCloneProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCloneProperties.java new file mode 100644 index 000000000000..1dbfd6fd30b5 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseCloneProperties.java @@ -0,0 +1,551 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Autonomous Database clone resource model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "dataBaseType", + defaultImpl = AutonomousDatabaseCloneProperties.class, + visible = true) +@JsonTypeName("Clone") +@Fluent +public final class AutonomousDatabaseCloneProperties extends AutonomousDatabaseBaseProperties { + /* + * Database type to be created. + */ + @JsonTypeId + @JsonProperty(value = "dataBaseType", required = true) + private DataBaseType dataBaseType = DataBaseType.CLONE; + + /* + * The source of the database. + */ + @JsonProperty(value = "source") + private SourceType source; + + /* + * The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + */ + @JsonProperty(value = "sourceId", required = true) + private String sourceId; + + /* + * The Autonomous Database clone type. + */ + @JsonProperty(value = "cloneType", required = true) + private CloneType cloneType; + + /* + * Indicates if the refreshable clone can be reconnected to its source database. + */ + @JsonProperty(value = "isReconnectCloneEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isReconnectCloneEnabled; + + /* + * Indicates if the Autonomous Database is a refreshable clone. + */ + @JsonProperty(value = "isRefreshableClone", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isRefreshableClone; + + /* + * The refresh mode of the clone. + */ + @JsonProperty(value = "refreshableModel") + private RefreshableModelType refreshableModel; + + /* + * The refresh status of the clone. + */ + @JsonProperty(value = "refreshableStatus", access = JsonProperty.Access.WRITE_ONLY) + private RefreshableStatusType refreshableStatus; + + /* + * The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. + */ + @JsonProperty(value = "timeUntilReconnectCloneEnabled") + private String timeUntilReconnectCloneEnabled; + + /** + * Creates an instance of AutonomousDatabaseCloneProperties class. + */ + public AutonomousDatabaseCloneProperties() { + } + + /** + * Get the dataBaseType property: Database type to be created. + * + * @return the dataBaseType value. + */ + @Override + public DataBaseType dataBaseType() { + return this.dataBaseType; + } + + /** + * Get the source property: The source of the database. + * + * @return the source value. + */ + public SourceType source() { + return this.source; + } + + /** + * Set the source property: The source of the database. + * + * @param source the source value to set. + * @return the AutonomousDatabaseCloneProperties object itself. + */ + public AutonomousDatabaseCloneProperties withSource(SourceType source) { + this.source = source; + return this; + } + + /** + * Get the sourceId property: The Azure ID of the Autonomous Database that was cloned to create the current + * Autonomous Database. + * + * @return the sourceId value. + */ + public String sourceId() { + return this.sourceId; + } + + /** + * Set the sourceId property: The Azure ID of the Autonomous Database that was cloned to create the current + * Autonomous Database. + * + * @param sourceId the sourceId value to set. + * @return the AutonomousDatabaseCloneProperties object itself. + */ + public AutonomousDatabaseCloneProperties 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 AutonomousDatabaseCloneProperties object itself. + */ + public AutonomousDatabaseCloneProperties withCloneType(CloneType cloneType) { + this.cloneType = cloneType; + return this; + } + + /** + * Get the isReconnectCloneEnabled property: Indicates if the refreshable clone can be reconnected to its source + * database. + * + * @return the isReconnectCloneEnabled value. + */ + public Boolean isReconnectCloneEnabled() { + return this.isReconnectCloneEnabled; + } + + /** + * Get the isRefreshableClone property: Indicates if the Autonomous Database is a refreshable clone. + * + * @return the isRefreshableClone value. + */ + public Boolean isRefreshableClone() { + return this.isRefreshableClone; + } + + /** + * Get the refreshableModel property: The refresh mode of the clone. + * + * @return the refreshableModel value. + */ + public RefreshableModelType refreshableModel() { + return this.refreshableModel; + } + + /** + * Set the refreshableModel property: The refresh mode of the clone. + * + * @param refreshableModel the refreshableModel value to set. + * @return the AutonomousDatabaseCloneProperties object itself. + */ + public AutonomousDatabaseCloneProperties withRefreshableModel(RefreshableModelType refreshableModel) { + this.refreshableModel = refreshableModel; + return this; + } + + /** + * Get the refreshableStatus property: The refresh status of the clone. + * + * @return the refreshableStatus value. + */ + public RefreshableStatusType refreshableStatus() { + return this.refreshableStatus; + } + + /** + * Get the timeUntilReconnectCloneEnabled property: The time and date as an RFC3339 formatted string, e.g., + * 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. + * + * @return the timeUntilReconnectCloneEnabled value. + */ + public String timeUntilReconnectCloneEnabled() { + return this.timeUntilReconnectCloneEnabled; + } + + /** + * Set the timeUntilReconnectCloneEnabled property: The time and date as an RFC3339 formatted string, e.g., + * 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. + * + * @param timeUntilReconnectCloneEnabled the timeUntilReconnectCloneEnabled value to set. + * @return the AutonomousDatabaseCloneProperties object itself. + */ + public AutonomousDatabaseCloneProperties withTimeUntilReconnectCloneEnabled(String timeUntilReconnectCloneEnabled) { + this.timeUntilReconnectCloneEnabled = timeUntilReconnectCloneEnabled; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withAdminPassword(String adminPassword) { + super.withAdminPassword(adminPassword); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties + withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType) { + super.withAutonomousMaintenanceScheduleType(autonomousMaintenanceScheduleType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withCharacterSet(String characterSet) { + super.withCharacterSet(characterSet); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withComputeCount(Float computeCount) { + super.withComputeCount(computeCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withComputeModel(ComputeModel computeModel) { + super.withComputeModel(computeModel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withCpuCoreCount(Integer cpuCoreCount) { + super.withCpuCoreCount(cpuCoreCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withCustomerContacts(List customerContacts) { + super.withCustomerContacts(customerContacts); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withDataStorageSizeInTbs(Integer dataStorageSizeInTbs) { + super.withDataStorageSizeInTbs(dataStorageSizeInTbs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withDataStorageSizeInGbs(Integer dataStorageSizeInGbs) { + super.withDataStorageSizeInGbs(dataStorageSizeInGbs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withDbVersion(String dbVersion) { + super.withDbVersion(dbVersion); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withDbWorkload(WorkloadType dbWorkload) { + super.withDbWorkload(dbWorkload); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withIsAutoScalingEnabled(Boolean isAutoScalingEnabled) { + super.withIsAutoScalingEnabled(isAutoScalingEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties + withIsAutoScalingForStorageEnabled(Boolean isAutoScalingForStorageEnabled) { + super.withIsAutoScalingForStorageEnabled(isAutoScalingForStorageEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withPeerDbId(String peerDbId) { + super.withPeerDbId(peerDbId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withIsLocalDataGuardEnabled(Boolean isLocalDataGuardEnabled) { + super.withIsLocalDataGuardEnabled(isLocalDataGuardEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withIsMtlsConnectionRequired(Boolean isMtlsConnectionRequired) { + super.withIsMtlsConnectionRequired(isMtlsConnectionRequired); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties + withIsPreviewVersionWithServiceTermsAccepted(Boolean isPreviewVersionWithServiceTermsAccepted) { + super.withIsPreviewVersionWithServiceTermsAccepted(isPreviewVersionWithServiceTermsAccepted); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withLicenseModel(LicenseModel licenseModel) { + super.withLicenseModel(licenseModel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withNcharacterSet(String ncharacterSet) { + super.withNcharacterSet(ncharacterSet); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withScheduledOperations(ScheduledOperationsType scheduledOperations) { + super.withScheduledOperations(scheduledOperations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withPrivateEndpointIp(String privateEndpointIp) { + super.withPrivateEndpointIp(privateEndpointIp); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withPrivateEndpointLabel(String privateEndpointLabel) { + super.withPrivateEndpointLabel(privateEndpointLabel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withSubnetId(String subnetId) { + super.withSubnetId(subnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withVnetId(String vnetId) { + super.withVnetId(vnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withDatabaseEdition(DatabaseEditionType databaseEdition) { + super.withDatabaseEdition(databaseEdition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withAutonomousDatabaseId(String autonomousDatabaseId) { + super.withAutonomousDatabaseId(autonomousDatabaseId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties + withLocalAdgAutoFailoverMaxDataLossLimit(Integer localAdgAutoFailoverMaxDataLossLimit) { + super.withLocalAdgAutoFailoverMaxDataLossLimit(localAdgAutoFailoverMaxDataLossLimit); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withOpenMode(OpenModeType openMode) { + super.withOpenMode(openMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withPermissionLevel(PermissionLevelType permissionLevel) { + super.withPermissionLevel(permissionLevel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withRole(RoleType role) { + super.withRole(role); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withBackupRetentionPeriodInDays(Integer backupRetentionPeriodInDays) { + super.withBackupRetentionPeriodInDays(backupRetentionPeriodInDays); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseCloneProperties withWhitelistedIps(List whitelistedIps) { + super.withWhitelistedIps(whitelistedIps); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (sourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sourceId in model AutonomousDatabaseCloneProperties")); + } + if (cloneType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property cloneType in model AutonomousDatabaseCloneProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseCloneProperties.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseLifecycleState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseLifecycleState.java new file mode 100644 index 000000000000..ae9799224926 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseLifecycleState.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.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * AutonomousDatabaseLifecycleState enum. + */ +public final class AutonomousDatabaseLifecycleState extends ExpandableStringEnum { + /** + * Static value Provisioning for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Available for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState AVAILABLE = fromString("Available"); + + /** + * Static value Stopping for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState STOPPING = fromString("Stopping"); + + /** + * Static value Stopped for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState STOPPED = fromString("Stopped"); + + /** + * Static value Starting for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState STARTING = fromString("Starting"); + + /** + * Static value Terminating for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState TERMINATING = fromString("Terminating"); + + /** + * Static value Terminated for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState TERMINATED = fromString("Terminated"); + + /** + * Static value Unavailable for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState UNAVAILABLE = fromString("Unavailable"); + + /** + * Static value RestoreInProgress for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState RESTORE_IN_PROGRESS = fromString("RestoreInProgress"); + + /** + * Static value RestoreFailed for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState RESTORE_FAILED = fromString("RestoreFailed"); + + /** + * Static value BackupInProgress for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState BACKUP_IN_PROGRESS = fromString("BackupInProgress"); + + /** + * Static value ScaleInProgress for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState SCALE_IN_PROGRESS = fromString("ScaleInProgress"); + + /** + * Static value AvailableNeedsAttention for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState AVAILABLE_NEEDS_ATTENTION + = fromString("AvailableNeedsAttention"); + + /** + * Static value Updating for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState UPDATING = fromString("Updating"); + + /** + * Static value MaintenanceInProgress for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); + + /** + * Static value Restarting for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState RESTARTING = fromString("Restarting"); + + /** + * Static value Recreating for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState RECREATING = fromString("Recreating"); + + /** + * Static value RoleChangeInProgress for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState ROLE_CHANGE_IN_PROGRESS = fromString("RoleChangeInProgress"); + + /** + * Static value Upgrading for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState UPGRADING = fromString("Upgrading"); + + /** + * Static value Inaccessible for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState INACCESSIBLE = fromString("Inaccessible"); + + /** + * Static value Standby for AutonomousDatabaseLifecycleState. + */ + public static final AutonomousDatabaseLifecycleState STANDBY = fromString("Standby"); + + /** + * Creates a new instance of AutonomousDatabaseLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutonomousDatabaseLifecycleState() { + } + + /** + * Creates or finds a AutonomousDatabaseLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutonomousDatabaseLifecycleState. + */ + @JsonCreator + public static AutonomousDatabaseLifecycleState fromString(String name) { + return fromString(name, AutonomousDatabaseLifecycleState.class); + } + + /** + * Gets known AutonomousDatabaseLifecycleState values. + * + * @return known AutonomousDatabaseLifecycleState values. + */ + public static Collection values() { + return values(AutonomousDatabaseLifecycleState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseListResult.java new file mode 100644 index 000000000000..97c58dfef82a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a AutonomousDatabase list operation. + */ +@Fluent +public final class AutonomousDatabaseListResult { + /* + * The AutonomousDatabase items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of AutonomousDatabaseListResult class. + */ + public AutonomousDatabaseListResult() { + } + + /** + * Get the value property: The AutonomousDatabase items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The AutonomousDatabase items on this page. + * + * @param value the value value to set. + * @return the AutonomousDatabaseListResult object itself. + */ + public AutonomousDatabaseListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 AutonomousDatabaseListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSet.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSet.java new file mode 100644 index 000000000000..127593cc5aee --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSet.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseNationalCharacterSetInner; + +/** + * An immutable client-side representation of AutonomousDatabaseNationalCharacterSet. + */ +public interface AutonomousDatabaseNationalCharacterSet { + /** + * 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. + */ + AutonomousDatabaseNationalCharacterSetProperties 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.oracle.fluent.models.AutonomousDatabaseNationalCharacterSetInner object. + * + * @return the inner object. + */ + AutonomousDatabaseNationalCharacterSetInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSetListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSetListResult.java new file mode 100644 index 000000000000..621d13f0e48f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSetListResult.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseNationalCharacterSetInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a AutonomousDatabaseNationalCharacterSet list operation. + */ +@Fluent +public final class AutonomousDatabaseNationalCharacterSetListResult { + /* + * The AutonomousDatabaseNationalCharacterSet items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of AutonomousDatabaseNationalCharacterSetListResult class. + */ + public AutonomousDatabaseNationalCharacterSetListResult() { + } + + /** + * Get the value property: The AutonomousDatabaseNationalCharacterSet items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The AutonomousDatabaseNationalCharacterSet items on this page. + * + * @param value the value value to set. + * @return the AutonomousDatabaseNationalCharacterSetListResult object itself. + */ + public AutonomousDatabaseNationalCharacterSetListResult + withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 AutonomousDatabaseNationalCharacterSetListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDatabaseNationalCharacterSetListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSetProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSetProperties.java new file mode 100644 index 000000000000..98909c26275d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSetProperties.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.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutonomousDatabaseNationalCharacterSet resource model. + */ +@Immutable +public final class AutonomousDatabaseNationalCharacterSetProperties { + /* + * The Oracle Autonomous Database supported national character sets. + */ + @JsonProperty(value = "characterSet", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String characterSet; + + /** + * Creates an instance of AutonomousDatabaseNationalCharacterSetProperties class. + */ + public AutonomousDatabaseNationalCharacterSetProperties() { + } + + /** + * Get the characterSet property: The Oracle Autonomous Database supported national character sets. + * + * @return the characterSet value. + */ + public String characterSet() { + return this.characterSet; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSets.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSets.java new file mode 100644 index 000000000000..300c377050cd --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseNationalCharacterSets.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 AutonomousDatabaseNationalCharacterSets. + */ +public interface AutonomousDatabaseNationalCharacterSets { + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @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 AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByLocation(String location); + + /** + * List AutonomousDatabaseNationalCharacterSet resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabaseNationalCharacterSet list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByLocation(String location, Context context); + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet along with {@link Response}. + */ + Response getWithResponse(String location, String adbsncharsetname, + Context context); + + /** + * Get a AutonomousDatabaseNationalCharacterSet. + * + * @param location The name of the Azure region. + * @param adbsncharsetname AutonomousDatabaseNationalCharacterSets name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabaseNationalCharacterSet. + */ + AutonomousDatabaseNationalCharacterSet get(String location, String adbsncharsetname); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseProperties.java new file mode 100644 index 000000000000..791219ceba5d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseProperties.java @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Autonomous Database resource model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "dataBaseType", + defaultImpl = AutonomousDatabaseProperties.class, + visible = true) +@JsonTypeName("Regular") +@Fluent +public final class AutonomousDatabaseProperties extends AutonomousDatabaseBaseProperties { + /* + * Database type to be created. + */ + @JsonTypeId + @JsonProperty(value = "dataBaseType", required = true) + private DataBaseType dataBaseType = DataBaseType.REGULAR; + + /** + * Creates an instance of AutonomousDatabaseProperties class. + */ + public AutonomousDatabaseProperties() { + } + + /** + * Get the dataBaseType property: Database type to be created. + * + * @return the dataBaseType value. + */ + @Override + public DataBaseType dataBaseType() { + return this.dataBaseType; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withAdminPassword(String adminPassword) { + super.withAdminPassword(adminPassword); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties + withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType) { + super.withAutonomousMaintenanceScheduleType(autonomousMaintenanceScheduleType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withCharacterSet(String characterSet) { + super.withCharacterSet(characterSet); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withComputeCount(Float computeCount) { + super.withComputeCount(computeCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withComputeModel(ComputeModel computeModel) { + super.withComputeModel(computeModel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withCpuCoreCount(Integer cpuCoreCount) { + super.withCpuCoreCount(cpuCoreCount); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withCustomerContacts(List customerContacts) { + super.withCustomerContacts(customerContacts); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withDataStorageSizeInTbs(Integer dataStorageSizeInTbs) { + super.withDataStorageSizeInTbs(dataStorageSizeInTbs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withDataStorageSizeInGbs(Integer dataStorageSizeInGbs) { + super.withDataStorageSizeInGbs(dataStorageSizeInGbs); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withDbVersion(String dbVersion) { + super.withDbVersion(dbVersion); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withDbWorkload(WorkloadType dbWorkload) { + super.withDbWorkload(dbWorkload); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withIsAutoScalingEnabled(Boolean isAutoScalingEnabled) { + super.withIsAutoScalingEnabled(isAutoScalingEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withIsAutoScalingForStorageEnabled(Boolean isAutoScalingForStorageEnabled) { + super.withIsAutoScalingForStorageEnabled(isAutoScalingForStorageEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withPeerDbId(String peerDbId) { + super.withPeerDbId(peerDbId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withIsLocalDataGuardEnabled(Boolean isLocalDataGuardEnabled) { + super.withIsLocalDataGuardEnabled(isLocalDataGuardEnabled); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withIsMtlsConnectionRequired(Boolean isMtlsConnectionRequired) { + super.withIsMtlsConnectionRequired(isMtlsConnectionRequired); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties + withIsPreviewVersionWithServiceTermsAccepted(Boolean isPreviewVersionWithServiceTermsAccepted) { + super.withIsPreviewVersionWithServiceTermsAccepted(isPreviewVersionWithServiceTermsAccepted); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withLicenseModel(LicenseModel licenseModel) { + super.withLicenseModel(licenseModel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withNcharacterSet(String ncharacterSet) { + super.withNcharacterSet(ncharacterSet); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withScheduledOperations(ScheduledOperationsType scheduledOperations) { + super.withScheduledOperations(scheduledOperations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withPrivateEndpointIp(String privateEndpointIp) { + super.withPrivateEndpointIp(privateEndpointIp); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withPrivateEndpointLabel(String privateEndpointLabel) { + super.withPrivateEndpointLabel(privateEndpointLabel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withSubnetId(String subnetId) { + super.withSubnetId(subnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withVnetId(String vnetId) { + super.withVnetId(vnetId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withDatabaseEdition(DatabaseEditionType databaseEdition) { + super.withDatabaseEdition(databaseEdition); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withAutonomousDatabaseId(String autonomousDatabaseId) { + super.withAutonomousDatabaseId(autonomousDatabaseId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties + withLocalAdgAutoFailoverMaxDataLossLimit(Integer localAdgAutoFailoverMaxDataLossLimit) { + super.withLocalAdgAutoFailoverMaxDataLossLimit(localAdgAutoFailoverMaxDataLossLimit); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withOpenMode(OpenModeType openMode) { + super.withOpenMode(openMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withPermissionLevel(PermissionLevelType permissionLevel) { + super.withPermissionLevel(permissionLevel); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withRole(RoleType role) { + super.withRole(role); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withBackupRetentionPeriodInDays(Integer backupRetentionPeriodInDays) { + super.withBackupRetentionPeriodInDays(backupRetentionPeriodInDays); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutonomousDatabaseProperties withWhitelistedIps(List whitelistedIps) { + super.withWhitelistedIps(whitelistedIps); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseStandbySummary.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseStandbySummary.java new file mode 100644 index 000000000000..2dd90b4a6fbe --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseStandbySummary.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Autonomous Disaster Recovery standby database details. + */ +@Fluent +public final class AutonomousDatabaseStandbySummary { + /* + * The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover. + */ + @JsonProperty(value = "lagTimeInSeconds") + private Integer lagTimeInSeconds; + + /* + * The current state of the Autonomous Database. + */ + @JsonProperty(value = "lifecycleState") + private AutonomousDatabaseLifecycleState lifecycleState; + + /* + * Additional information about the current lifecycle state. + */ + @JsonProperty(value = "lifecycleDetails") + private String lifecycleDetails; + + /* + * The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + */ + @JsonProperty(value = "timeDataGuardRoleChanged") + private String timeDataGuardRoleChanged; + + /* + * The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + */ + @JsonProperty(value = "timeDisasterRecoveryRoleChanged") + private String timeDisasterRecoveryRoleChanged; + + /** + * Creates an instance of AutonomousDatabaseStandbySummary class. + */ + public AutonomousDatabaseStandbySummary() { + } + + /** + * Get the lagTimeInSeconds property: The amount of time, in seconds, that the data of the standby database lags the + * data of the primary database. Can be used to determine the potential data loss in the event of a failover. + * + * @return the lagTimeInSeconds value. + */ + public Integer lagTimeInSeconds() { + return this.lagTimeInSeconds; + } + + /** + * Set the lagTimeInSeconds property: The amount of time, in seconds, that the data of the standby database lags the + * data of the primary database. Can be used to determine the potential data loss in the event of a failover. + * + * @param lagTimeInSeconds the lagTimeInSeconds value to set. + * @return the AutonomousDatabaseStandbySummary object itself. + */ + public AutonomousDatabaseStandbySummary withLagTimeInSeconds(Integer lagTimeInSeconds) { + this.lagTimeInSeconds = lagTimeInSeconds; + return this; + } + + /** + * Get the lifecycleState property: The current state of the Autonomous Database. + * + * @return the lifecycleState value. + */ + public AutonomousDatabaseLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Set the lifecycleState property: The current state of the Autonomous Database. + * + * @param lifecycleState the lifecycleState value to set. + * @return the AutonomousDatabaseStandbySummary object itself. + */ + public AutonomousDatabaseStandbySummary withLifecycleState(AutonomousDatabaseLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Get the lifecycleDetails property: Additional information about the current lifecycle state. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Set the lifecycleDetails property: Additional information about the current lifecycle state. + * + * @param lifecycleDetails the lifecycleDetails value to set. + * @return the AutonomousDatabaseStandbySummary object itself. + */ + public AutonomousDatabaseStandbySummary withLifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + return this; + } + + /** + * Get the timeDataGuardRoleChanged property: The date and time the Autonomous Data Guard role was switched for the + * standby Autonomous Database. + * + * @return the timeDataGuardRoleChanged value. + */ + public String timeDataGuardRoleChanged() { + return this.timeDataGuardRoleChanged; + } + + /** + * Set the timeDataGuardRoleChanged property: The date and time the Autonomous Data Guard role was switched for the + * standby Autonomous Database. + * + * @param timeDataGuardRoleChanged the timeDataGuardRoleChanged value to set. + * @return the AutonomousDatabaseStandbySummary object itself. + */ + public AutonomousDatabaseStandbySummary withTimeDataGuardRoleChanged(String timeDataGuardRoleChanged) { + this.timeDataGuardRoleChanged = timeDataGuardRoleChanged; + return this; + } + + /** + * Get the timeDisasterRecoveryRoleChanged property: The date and time the Disaster Recovery role was switched for + * the standby Autonomous Database. + * + * @return the timeDisasterRecoveryRoleChanged value. + */ + public String timeDisasterRecoveryRoleChanged() { + return this.timeDisasterRecoveryRoleChanged; + } + + /** + * Set the timeDisasterRecoveryRoleChanged property: The date and time the Disaster Recovery role was switched for + * the standby Autonomous Database. + * + * @param timeDisasterRecoveryRoleChanged the timeDisasterRecoveryRoleChanged value to set. + * @return the AutonomousDatabaseStandbySummary object itself. + */ + public AutonomousDatabaseStandbySummary + withTimeDisasterRecoveryRoleChanged(String timeDisasterRecoveryRoleChanged) { + this.timeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseUpdate.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseUpdate.java new file mode 100644 index 000000000000..71855407c959 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseUpdate.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The type used for update operations of the AutonomousDatabase. + */ +@Fluent +public final class AutonomousDatabaseUpdate { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the AutonomousDatabase. + */ + @JsonProperty(value = "properties") + private AutonomousDatabaseUpdateProperties properties; + + /** + * Creates an instance of AutonomousDatabaseUpdate class. + */ + public AutonomousDatabaseUpdate() { + } + + /** + * 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 AutonomousDatabaseUpdate object itself. + */ + public AutonomousDatabaseUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The updatable properties of the AutonomousDatabase. + * + * @return the properties value. + */ + public AutonomousDatabaseUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the AutonomousDatabase. + * + * @param properties the properties value to set. + * @return the AutonomousDatabaseUpdate object itself. + */ + public AutonomousDatabaseUpdate withProperties(AutonomousDatabaseUpdateProperties 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(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseUpdateProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseUpdateProperties.java new file mode 100644 index 000000000000..875762b66845 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseUpdateProperties.java @@ -0,0 +1,635 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The updatable properties of the AutonomousDatabase. + */ +@Fluent +public final class AutonomousDatabaseUpdateProperties { + /* + * Admin password. + */ + @JsonProperty(value = "adminPassword") + private String adminPassword; + + /* + * The maintenance schedule type of the Autonomous Database Serverless. + */ + @JsonProperty(value = "autonomousMaintenanceScheduleType") + private AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType; + + /* + * The compute amount (CPUs) available to the database. + */ + @JsonProperty(value = "computeCount") + private Float computeCount; + + /* + * The number of CPU cores to be made available to the database. + */ + @JsonProperty(value = "cpuCoreCount") + private Integer cpuCoreCount; + + /* + * Customer Contacts. + */ + @JsonProperty(value = "customerContacts") + private List customerContacts; + + /* + * The quantity of data in the database, in terabytes. + */ + @JsonProperty(value = "dataStorageSizeInTbs") + private Integer dataStorageSizeInTbs; + + /* + * The size, in gigabytes, of the data volume that will be created and attached to the database. + */ + @JsonProperty(value = "dataStorageSizeInGbs") + private Integer dataStorageSizeInGbs; + + /* + * The user-friendly name for the Autonomous Database. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + */ + @JsonProperty(value = "isAutoScalingEnabled") + private Boolean isAutoScalingEnabled; + + /* + * Indicates if auto scaling is enabled for the Autonomous Database storage. + */ + @JsonProperty(value = "isAutoScalingForStorageEnabled") + private Boolean isAutoScalingForStorageEnabled; + + /* + * The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + */ + @JsonProperty(value = "peerDbId") + private String peerDbId; + + /* + * Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + */ + @JsonProperty(value = "isLocalDataGuardEnabled") + private Boolean isLocalDataGuardEnabled; + + /* + * Specifies if the Autonomous Database requires mTLS connections. + */ + @JsonProperty(value = "isMtlsConnectionRequired") + private Boolean isMtlsConnectionRequired; + + /* + * The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + */ + @JsonProperty(value = "licenseModel") + private LicenseModel licenseModel; + + /* + * The list of scheduled operations. + */ + @JsonProperty(value = "scheduledOperations") + private ScheduledOperationsTypeUpdate scheduledOperations; + + /* + * The Oracle Database Edition that applies to the Autonomous databases. + */ + @JsonProperty(value = "databaseEdition") + private DatabaseEditionType databaseEdition; + + /* + * Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard + */ + @JsonProperty(value = "localAdgAutoFailoverMaxDataLossLimit") + private Integer localAdgAutoFailoverMaxDataLossLimit; + + /* + * Indicates the Autonomous Database mode. + */ + @JsonProperty(value = "openMode") + private OpenModeType openMode; + + /* + * The Autonomous Database permission level. + */ + @JsonProperty(value = "permissionLevel") + private PermissionLevelType permissionLevel; + + /* + * The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + */ + @JsonProperty(value = "role") + private RoleType role; + + /* + * Retention period, in days, for long-term backups + */ + @JsonProperty(value = "backupRetentionPeriodInDays") + private Integer backupRetentionPeriodInDays; + + /* + * The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + */ + @JsonProperty(value = "whitelistedIps") + private List whitelistedIps; + + /** + * Creates an instance of AutonomousDatabaseUpdateProperties class. + */ + public AutonomousDatabaseUpdateProperties() { + } + + /** + * Get the adminPassword property: Admin password. + * + * @return the adminPassword value. + */ + public String adminPassword() { + return this.adminPassword; + } + + /** + * Set the adminPassword property: Admin password. + * + * @param adminPassword the adminPassword value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withAdminPassword(String adminPassword) { + this.adminPassword = adminPassword; + return this; + } + + /** + * Get the autonomousMaintenanceScheduleType property: The maintenance schedule type of the Autonomous Database + * Serverless. + * + * @return the autonomousMaintenanceScheduleType value. + */ + public AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType() { + return this.autonomousMaintenanceScheduleType; + } + + /** + * Set the autonomousMaintenanceScheduleType property: The maintenance schedule type of the Autonomous Database + * Serverless. + * + * @param autonomousMaintenanceScheduleType the autonomousMaintenanceScheduleType value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties + withAutonomousMaintenanceScheduleType(AutonomousMaintenanceScheduleType autonomousMaintenanceScheduleType) { + this.autonomousMaintenanceScheduleType = autonomousMaintenanceScheduleType; + return this; + } + + /** + * Get the computeCount property: The compute amount (CPUs) available to the database. + * + * @return the computeCount value. + */ + public Float computeCount() { + return this.computeCount; + } + + /** + * Set the computeCount property: The compute amount (CPUs) available to the database. + * + * @param computeCount the computeCount value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withComputeCount(Float computeCount) { + this.computeCount = computeCount; + return this; + } + + /** + * Get the cpuCoreCount property: The number of CPU cores to be made available to the database. + * + * @return the cpuCoreCount value. + */ + public Integer cpuCoreCount() { + return this.cpuCoreCount; + } + + /** + * Set the cpuCoreCount property: The number of CPU cores to be made available to the database. + * + * @param cpuCoreCount the cpuCoreCount value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withCpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + return this; + } + + /** + * Get the customerContacts property: Customer Contacts. + * + * @return the customerContacts value. + */ + public List customerContacts() { + return this.customerContacts; + } + + /** + * Set the customerContacts property: Customer Contacts. + * + * @param customerContacts the customerContacts value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withCustomerContacts(List customerContacts) { + this.customerContacts = customerContacts; + return this; + } + + /** + * Get the dataStorageSizeInTbs property: The quantity of data in the database, in terabytes. + * + * @return the dataStorageSizeInTbs value. + */ + public Integer dataStorageSizeInTbs() { + return this.dataStorageSizeInTbs; + } + + /** + * Set the dataStorageSizeInTbs property: The quantity of data in the database, in terabytes. + * + * @param dataStorageSizeInTbs the dataStorageSizeInTbs value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withDataStorageSizeInTbs(Integer dataStorageSizeInTbs) { + this.dataStorageSizeInTbs = dataStorageSizeInTbs; + return this; + } + + /** + * Get the dataStorageSizeInGbs property: The size, in gigabytes, of the data volume that will be created and + * attached to the database. + * + * @return the dataStorageSizeInGbs value. + */ + public Integer dataStorageSizeInGbs() { + return this.dataStorageSizeInGbs; + } + + /** + * Set the dataStorageSizeInGbs property: The size, in gigabytes, of the data volume that will be created and + * attached to the database. + * + * @param dataStorageSizeInGbs the dataStorageSizeInGbs value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withDataStorageSizeInGbs(Integer dataStorageSizeInGbs) { + this.dataStorageSizeInGbs = dataStorageSizeInGbs; + return this; + } + + /** + * Get the displayName property: The user-friendly name for the Autonomous Database. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The user-friendly name for the Autonomous Database. + * + * @param displayName the displayName value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the isAutoScalingEnabled property: Indicates if auto scaling is enabled for the Autonomous Database CPU core + * count. + * + * @return the isAutoScalingEnabled value. + */ + public Boolean isAutoScalingEnabled() { + return this.isAutoScalingEnabled; + } + + /** + * Set the isAutoScalingEnabled property: Indicates if auto scaling is enabled for the Autonomous Database CPU core + * count. + * + * @param isAutoScalingEnabled the isAutoScalingEnabled value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withIsAutoScalingEnabled(Boolean isAutoScalingEnabled) { + this.isAutoScalingEnabled = isAutoScalingEnabled; + return this; + } + + /** + * Get the isAutoScalingForStorageEnabled property: Indicates if auto scaling is enabled for the Autonomous Database + * storage. + * + * @return the isAutoScalingForStorageEnabled value. + */ + public Boolean isAutoScalingForStorageEnabled() { + return this.isAutoScalingForStorageEnabled; + } + + /** + * Set the isAutoScalingForStorageEnabled property: Indicates if auto scaling is enabled for the Autonomous Database + * storage. + * + * @param isAutoScalingForStorageEnabled the isAutoScalingForStorageEnabled value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties + withIsAutoScalingForStorageEnabled(Boolean isAutoScalingForStorageEnabled) { + this.isAutoScalingForStorageEnabled = isAutoScalingForStorageEnabled; + return this; + } + + /** + * Get the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * different region from the current peer database. + * + * @return the peerDbId value. + */ + public String peerDbId() { + return this.peerDbId; + } + + /** + * Set the peerDbId property: The database OCID 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. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withPeerDbId(String peerDbId) { + this.peerDbId = peerDbId; + return this; + } + + /** + * Get the isLocalDataGuardEnabled property: Indicates whether the Autonomous Database has local or called in-region + * Data Guard enabled. + * + * @return the isLocalDataGuardEnabled value. + */ + public Boolean isLocalDataGuardEnabled() { + return this.isLocalDataGuardEnabled; + } + + /** + * Set the isLocalDataGuardEnabled property: Indicates whether the Autonomous Database has local or called in-region + * Data Guard enabled. + * + * @param isLocalDataGuardEnabled the isLocalDataGuardEnabled value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withIsLocalDataGuardEnabled(Boolean isLocalDataGuardEnabled) { + this.isLocalDataGuardEnabled = isLocalDataGuardEnabled; + return this; + } + + /** + * Get the isMtlsConnectionRequired property: Specifies if the Autonomous Database requires mTLS connections. + * + * @return the isMtlsConnectionRequired value. + */ + public Boolean isMtlsConnectionRequired() { + return this.isMtlsConnectionRequired; + } + + /** + * Set the isMtlsConnectionRequired property: Specifies if the Autonomous Database requires mTLS connections. + * + * @param isMtlsConnectionRequired the isMtlsConnectionRequired value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withIsMtlsConnectionRequired(Boolean isMtlsConnectionRequired) { + this.isMtlsConnectionRequired = isMtlsConnectionRequired; + return this; + } + + /** + * Get the licenseModel property: The Oracle license model that applies to the Oracle Autonomous Database. 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 Oracle Autonomous Database. The + * default is LICENSE_INCLUDED. + * + * @param licenseModel the licenseModel value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withLicenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + return this; + } + + /** + * Get the scheduledOperations property: The list of scheduled operations. + * + * @return the scheduledOperations value. + */ + public ScheduledOperationsTypeUpdate scheduledOperations() { + return this.scheduledOperations; + } + + /** + * Set the scheduledOperations property: The list of scheduled operations. + * + * @param scheduledOperations the scheduledOperations value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties + withScheduledOperations(ScheduledOperationsTypeUpdate scheduledOperations) { + this.scheduledOperations = scheduledOperations; + return this; + } + + /** + * Get the databaseEdition property: The Oracle Database Edition that applies to the Autonomous databases. + * + * @return the databaseEdition value. + */ + public DatabaseEditionType databaseEdition() { + return this.databaseEdition; + } + + /** + * Set the databaseEdition property: The Oracle Database Edition that applies to the Autonomous databases. + * + * @param databaseEdition the databaseEdition value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withDatabaseEdition(DatabaseEditionType databaseEdition) { + this.databaseEdition = databaseEdition; + return this; + } + + /** + * Get the localAdgAutoFailoverMaxDataLossLimit property: Parameter that allows users to select an acceptable + * maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local + * Autonomous Data Guard. + * + * @return the localAdgAutoFailoverMaxDataLossLimit value. + */ + public Integer localAdgAutoFailoverMaxDataLossLimit() { + return this.localAdgAutoFailoverMaxDataLossLimit; + } + + /** + * Set the localAdgAutoFailoverMaxDataLossLimit property: Parameter that allows users to select an acceptable + * maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local + * Autonomous Data Guard. + * + * @param localAdgAutoFailoverMaxDataLossLimit the localAdgAutoFailoverMaxDataLossLimit value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties + withLocalAdgAutoFailoverMaxDataLossLimit(Integer localAdgAutoFailoverMaxDataLossLimit) { + this.localAdgAutoFailoverMaxDataLossLimit = localAdgAutoFailoverMaxDataLossLimit; + return this; + } + + /** + * Get the openMode property: Indicates the Autonomous Database mode. + * + * @return the openMode value. + */ + public OpenModeType openMode() { + return this.openMode; + } + + /** + * Set the openMode property: Indicates the Autonomous Database mode. + * + * @param openMode the openMode value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withOpenMode(OpenModeType openMode) { + this.openMode = openMode; + return this; + } + + /** + * Get the permissionLevel property: The Autonomous Database permission level. + * + * @return the permissionLevel value. + */ + public PermissionLevelType permissionLevel() { + return this.permissionLevel; + } + + /** + * Set the permissionLevel property: The Autonomous Database permission level. + * + * @param permissionLevel the permissionLevel value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withPermissionLevel(PermissionLevelType permissionLevel) { + this.permissionLevel = permissionLevel; + return this; + } + + /** + * Get the role property: The Data Guard role of the Autonomous Container Database or Autonomous Database, if + * Autonomous Data Guard is enabled. + * + * @return the role value. + */ + public RoleType role() { + return this.role; + } + + /** + * Set the role property: The Data Guard role of the Autonomous Container Database or Autonomous Database, if + * Autonomous Data Guard is enabled. + * + * @param role the role value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withRole(RoleType role) { + this.role = role; + return this; + } + + /** + * Get the backupRetentionPeriodInDays property: Retention period, in days, for long-term backups. + * + * @return the backupRetentionPeriodInDays value. + */ + public Integer backupRetentionPeriodInDays() { + return this.backupRetentionPeriodInDays; + } + + /** + * Set the backupRetentionPeriodInDays property: Retention period, in days, for long-term backups. + * + * @param backupRetentionPeriodInDays the backupRetentionPeriodInDays value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withBackupRetentionPeriodInDays(Integer backupRetentionPeriodInDays) { + this.backupRetentionPeriodInDays = backupRetentionPeriodInDays; + return this; + } + + /** + * Get the whitelistedIps property: The client IP access control list (ACL). This is an array of CIDR notations + * and/or IP addresses. Values should be separate strings, separated by commas. Example: + * ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + * + * @return the whitelistedIps value. + */ + public List whitelistedIps() { + return this.whitelistedIps; + } + + /** + * Set the whitelistedIps property: The client IP access control list (ACL). This is an array of CIDR notations + * and/or IP addresses. Values should be separate strings, separated by commas. Example: + * ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + * + * @param whitelistedIps the whitelistedIps value to set. + * @return the AutonomousDatabaseUpdateProperties object itself. + */ + public AutonomousDatabaseUpdateProperties withWhitelistedIps(List whitelistedIps) { + this.whitelistedIps = whitelistedIps; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (customerContacts() != null) { + customerContacts().forEach(e -> e.validate()); + } + if (scheduledOperations() != null) { + scheduledOperations().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseVersions.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseVersions.java new file mode 100644 index 000000000000..6a187da1429b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseVersions.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 AutonomousDatabaseVersions. + */ +public interface AutonomousDatabaseVersions { + /** + * List AutonomousDbVersion resources by Location. + * + * @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 AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocation(String location); + + /** + * List AutonomousDbVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDbVersion list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocation(String location, Context context); + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion along with {@link Response}. + */ + Response getWithResponse(String location, String autonomousdbversionsname, Context context); + + /** + * Get a AutonomousDbVersion. + * + * @param location The name of the Azure region. + * @param autonomousdbversionsname AutonomousDbVersion name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDbVersion. + */ + AutonomousDbVersion get(String location, String autonomousdbversionsname); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseWalletFile.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseWalletFile.java new file mode 100644 index 000000000000..524afedb3d1c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabaseWalletFile.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.oracle.models; + +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseWalletFileInner; + +/** + * An immutable client-side representation of AutonomousDatabaseWalletFile. + */ +public interface AutonomousDatabaseWalletFile { + /** + * Gets the walletFiles property: The base64 encoded wallet files. + * + * @return the walletFiles value. + */ + String walletFiles(); + + /** + * Gets the inner com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseWalletFileInner object. + * + * @return the inner object. + */ + AutonomousDatabaseWalletFileInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabases.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabases.java new file mode 100644 index 000000000000..ae31261b9ae6 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDatabases.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 AutonomousDatabases. + */ +public interface AutonomousDatabases { + /** + * List AutonomousDatabase 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 AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List AutonomousDatabase 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 AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List AutonomousDatabase resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a AutonomousDatabase list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String autonomousdatabasename, + Context context); + + /** + * Get a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a AutonomousDatabase. + */ + AutonomousDatabase getByResourceGroup(String resourceGroupName, String autonomousdatabasename); + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 autonomousdatabasename); + + /** + * Delete a AutonomousDatabase. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String autonomousdatabasename, Context context); + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); + + /** + * Perform failover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 failover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context); + + /** + * Generate wallet action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database Wallet File resource model along with {@link Response}. + */ + Response generateWalletWithResponse(String resourceGroupName, + String autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails body, Context context); + + /** + * Generate wallet action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database Wallet File resource model. + */ + AutonomousDatabaseWalletFile generateWallet(String resourceGroupName, String autonomousdatabasename, + GenerateAutonomousDatabaseWalletDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body); + + /** + * Perform switchover action on Autonomous Database. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param autonomousdatabasename The database name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return autonomous Database resource model. + */ + AutonomousDatabase switchover(String resourceGroupName, String autonomousdatabasename, PeerDbDetails body, + Context context); + + /** + * Get a AutonomousDatabase. + * + * @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 AutonomousDatabase along with {@link Response}. + */ + AutonomousDatabase getById(String id); + + /** + * Get a AutonomousDatabase. + * + * @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 AutonomousDatabase along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a AutonomousDatabase. + * + * @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 AutonomousDatabase. + * + * @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 AutonomousDatabase resource. + * + * @param name resource name. + * @return the first stage of the new AutonomousDatabase definition. + */ + AutonomousDatabase.DefinitionStages.Blank define(String name); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersion.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersion.java new file mode 100644 index 000000000000..42cf2eee1439 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersion.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDbVersionInner; + +/** + * An immutable client-side representation of AutonomousDbVersion. + */ +public interface AutonomousDbVersion { + /** + * 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. + */ + AutonomousDbVersionProperties 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.oracle.fluent.models.AutonomousDbVersionInner object. + * + * @return the inner object. + */ + AutonomousDbVersionInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersionListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersionListResult.java new file mode 100644 index 000000000000..99aec626d46f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersionListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.AutonomousDbVersionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a AutonomousDbVersion list operation. + */ +@Fluent +public final class AutonomousDbVersionListResult { + /* + * The AutonomousDbVersion items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of AutonomousDbVersionListResult class. + */ + public AutonomousDbVersionListResult() { + } + + /** + * Get the value property: The AutonomousDbVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The AutonomousDbVersion items on this page. + * + * @param value the value value to set. + * @return the AutonomousDbVersionListResult object itself. + */ + public AutonomousDbVersionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 AutonomousDbVersionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutonomousDbVersionListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersionProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersionProperties.java new file mode 100644 index 000000000000..8a5001f04cab --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousDbVersionProperties.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AutonomousDbVersion resource model. + */ +@Immutable +public final class AutonomousDbVersionProperties { + /* + * Supported Autonomous Db versions. + */ + @JsonProperty(value = "version", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * The Autonomous Database workload type + */ + @JsonProperty(value = "dbWorkload", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadType dbWorkload; + + /* + * True if this version of the Oracle Database software's default is free. + */ + @JsonProperty(value = "isDefaultForFree", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultForFree; + + /* + * True if this version of the Oracle Database software's default is paid. + */ + @JsonProperty(value = "isDefaultForPaid", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultForPaid; + + /* + * True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + */ + @JsonProperty(value = "isFreeTierEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isFreeTierEnabled; + + /* + * True if this version of the Oracle Database software has payments enabled. + */ + @JsonProperty(value = "isPaidEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPaidEnabled; + + /** + * Creates an instance of AutonomousDbVersionProperties class. + */ + public AutonomousDbVersionProperties() { + } + + /** + * Get the version property: Supported Autonomous Db versions. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the dbWorkload property: The Autonomous Database workload type. + * + * @return the dbWorkload value. + */ + public WorkloadType dbWorkload() { + return this.dbWorkload; + } + + /** + * Get the isDefaultForFree property: True if this version of the Oracle Database software's default is free. + * + * @return the isDefaultForFree value. + */ + public Boolean isDefaultForFree() { + return this.isDefaultForFree; + } + + /** + * Get the isDefaultForPaid property: True if this version of the Oracle Database software's default is paid. + * + * @return the isDefaultForPaid value. + */ + public Boolean isDefaultForPaid() { + return this.isDefaultForPaid; + } + + /** + * Get the isFreeTierEnabled property: True if this version of the Oracle Database software can be used for + * Always-Free Autonomous Databases. + * + * @return the isFreeTierEnabled value. + */ + public Boolean isFreeTierEnabled() { + return this.isFreeTierEnabled; + } + + /** + * Get the isPaidEnabled property: True if this version of the Oracle Database software has payments enabled. + * + * @return the isPaidEnabled value. + */ + public Boolean isPaidEnabled() { + return this.isPaidEnabled; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousMaintenanceScheduleType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousMaintenanceScheduleType.java new file mode 100644 index 000000000000..fe23e64b7a60 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AutonomousMaintenanceScheduleType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * AutonomousMaintenanceScheduleType enum. + */ +public final class AutonomousMaintenanceScheduleType extends ExpandableStringEnum { + /** + * Static value Early for AutonomousMaintenanceScheduleType. + */ + public static final AutonomousMaintenanceScheduleType EARLY = fromString("Early"); + + /** + * Static value Regular for AutonomousMaintenanceScheduleType. + */ + public static final AutonomousMaintenanceScheduleType REGULAR = fromString("Regular"); + + /** + * Creates a new instance of AutonomousMaintenanceScheduleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutonomousMaintenanceScheduleType() { + } + + /** + * Creates or finds a AutonomousMaintenanceScheduleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutonomousMaintenanceScheduleType. + */ + @JsonCreator + public static AutonomousMaintenanceScheduleType fromString(String name) { + return fromString(name, AutonomousMaintenanceScheduleType.class); + } + + /** + * Gets known AutonomousMaintenanceScheduleType values. + * + * @return known AutonomousMaintenanceScheduleType values. + */ + public static Collection values() { + return values(AutonomousMaintenanceScheduleType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AzureResourceProvisioningState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AzureResourceProvisioningState.java new file mode 100644 index 000000000000..b6e1e6c765fa --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/AzureResourceProvisioningState.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.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Azure Resource Provisioning State enum. + */ +public final class AzureResourceProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for AzureResourceProvisioningState. + */ + public static final AzureResourceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for AzureResourceProvisioningState. + */ + public static final AzureResourceProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for AzureResourceProvisioningState. + */ + public static final AzureResourceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Provisioning for AzureResourceProvisioningState. + */ + public static final AzureResourceProvisioningState PROVISIONING = fromString("Provisioning"); + + /** + * Creates a new instance of AzureResourceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AzureResourceProvisioningState() { + } + + /** + * Creates or finds a AzureResourceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding AzureResourceProvisioningState. + */ + @JsonCreator + public static AzureResourceProvisioningState fromString(String name) { + return fromString(name, AzureResourceProvisioningState.class); + } + + /** + * Gets known AzureResourceProvisioningState values. + * + * @return known AzureResourceProvisioningState values. + */ + public static Collection values() { + return values(AzureResourceProvisioningState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloneType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloneType.java new file mode 100644 index 000000000000..5cd843239d7b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloneType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * CloneType enum. + */ +public final class CloneType extends ExpandableStringEnum { + /** + * Static value Full for CloneType. + */ + public static final CloneType FULL = fromString("Full"); + + /** + * Static value Metadata for CloneType. + */ + public static final CloneType METADATA = fromString("Metadata"); + + /** + * Creates a new instance of CloneType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CloneType() { + } + + /** + * Creates or finds a CloneType from its string representation. + * + * @param name a name to look for. + * @return the corresponding CloneType. + */ + @JsonCreator + public static CloneType fromString(String name) { + return fromString(name, CloneType.class); + } + + /** + * Gets known CloneType values. + * + * @return known CloneType values. + */ + public static Collection values() { + return values(CloneType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudAccountDetails.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudAccountDetails.java new file mode 100644 index 000000000000..69a52828276e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudAccountDetails.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.oracle.models; + +import com.azure.resourcemanager.oracle.fluent.models.CloudAccountDetailsInner; + +/** + * An immutable client-side representation of CloudAccountDetails. + */ +public interface CloudAccountDetails { + /** + * Gets the cloudAccountName property: Cloud Account name. + * + * @return the cloudAccountName value. + */ + String cloudAccountName(); + + /** + * Gets the cloudAccountHomeRegion property: Cloud Account Home region. + * + * @return the cloudAccountHomeRegion value. + */ + String cloudAccountHomeRegion(); + + /** + * Gets the inner com.azure.resourcemanager.oracle.fluent.models.CloudAccountDetailsInner object. + * + * @return the inner object. + */ + CloudAccountDetailsInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudAccountProvisioningState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudAccountProvisioningState.java new file mode 100644 index 000000000000..c66fc6c6d493 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudAccountProvisioningState.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * CloudAccountProvisioningState enum. + */ +public final class CloudAccountProvisioningState extends ExpandableStringEnum { + /** + * Static value Pending for CloudAccountProvisioningState. + */ + public static final CloudAccountProvisioningState PENDING = fromString("Pending"); + + /** + * Static value Provisioning for CloudAccountProvisioningState. + */ + public static final CloudAccountProvisioningState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Available for CloudAccountProvisioningState. + */ + public static final CloudAccountProvisioningState AVAILABLE = fromString("Available"); + + /** + * Creates a new instance of CloudAccountProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CloudAccountProvisioningState() { + } + + /** + * Creates or finds a CloudAccountProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CloudAccountProvisioningState. + */ + @JsonCreator + public static CloudAccountProvisioningState fromString(String name) { + return fromString(name, CloudAccountProvisioningState.class); + } + + /** + * Gets known CloudAccountProvisioningState values. + * + * @return known CloudAccountProvisioningState values. + */ + public static Collection values() { + return values(CloudAccountProvisioningState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructure.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructure.java new file mode 100644 index 000000000000..2b6bd06c4048 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructure.java @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.CloudExadataInfrastructureInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of CloudExadataInfrastructure. + */ +public interface CloudExadataInfrastructure { + /** + * 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. + */ + CloudExadataInfrastructureProperties properties(); + + /** + * Gets the zones property: CloudExadataInfrastructure 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.oracle.fluent.models.CloudExadataInfrastructureInner object. + * + * @return the inner object. + */ + CloudExadataInfrastructureInner innerModel(); + + /** + * The entirety of the CloudExadataInfrastructure definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithZones, DefinitionStages.WithCreate { + } + + /** + * The CloudExadataInfrastructure definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the CloudExadataInfrastructure definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the CloudExadataInfrastructure 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 CloudExadataInfrastructure 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. + */ + WithZones withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the CloudExadataInfrastructure definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: CloudExadataInfrastructure zones. + * + * @param zones CloudExadataInfrastructure zones. + * @return the next definition stage. + */ + WithCreate withZones(List zones); + } + + /** + * The stage of the CloudExadataInfrastructure 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + CloudExadataInfrastructure create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CloudExadataInfrastructure create(Context context); + } + + /** + * The stage of the CloudExadataInfrastructure 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 CloudExadataInfrastructure 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(CloudExadataInfrastructureProperties properties); + } + } + + /** + * Begins update for the CloudExadataInfrastructure resource. + * + * @return the stage of resource update. + */ + CloudExadataInfrastructure.Update update(); + + /** + * The template for CloudExadataInfrastructure update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithZones, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CloudExadataInfrastructure apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CloudExadataInfrastructure apply(Context context); + } + + /** + * The CloudExadataInfrastructure update stages. + */ + interface UpdateStages { + /** + * The stage of the CloudExadataInfrastructure 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 CloudExadataInfrastructure update allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: CloudExadataInfrastructure zones. + * + * @param zones CloudExadataInfrastructure zones. + * @return the next definition stage. + */ + Update withZones(List zones); + } + + /** + * The stage of the CloudExadataInfrastructure update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The updatable properties of the CloudExadataInfrastructure.. + * + * @param properties The updatable properties of the CloudExadataInfrastructure. + * @return the next definition stage. + */ + Update withProperties(CloudExadataInfrastructureUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CloudExadataInfrastructure refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CloudExadataInfrastructure refresh(Context context); + + /** + * Perform add storage capacity on exadata infra. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + CloudExadataInfrastructure addStorageCapacity(); + + /** + * Perform add storage capacity on exadata infra. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + CloudExadataInfrastructure addStorageCapacity(Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureLifecycleState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureLifecycleState.java new file mode 100644 index 000000000000..194ab9f5e9ed --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureLifecycleState.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * CloudExadataInfrastructureLifecycleState enum. + */ +public final class CloudExadataInfrastructureLifecycleState + extends ExpandableStringEnum { + /** + * Static value Provisioning for CloudExadataInfrastructureLifecycleState. + */ + public static final CloudExadataInfrastructureLifecycleState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Available for CloudExadataInfrastructureLifecycleState. + */ + public static final CloudExadataInfrastructureLifecycleState AVAILABLE = fromString("Available"); + + /** + * Static value Updating for CloudExadataInfrastructureLifecycleState. + */ + public static final CloudExadataInfrastructureLifecycleState UPDATING = fromString("Updating"); + + /** + * Static value Terminating for CloudExadataInfrastructureLifecycleState. + */ + public static final CloudExadataInfrastructureLifecycleState TERMINATING = fromString("Terminating"); + + /** + * Static value Terminated for CloudExadataInfrastructureLifecycleState. + */ + public static final CloudExadataInfrastructureLifecycleState TERMINATED = fromString("Terminated"); + + /** + * Static value MaintenanceInProgress for CloudExadataInfrastructureLifecycleState. + */ + public static final CloudExadataInfrastructureLifecycleState MAINTENANCE_IN_PROGRESS + = fromString("MaintenanceInProgress"); + + /** + * Static value Failed for CloudExadataInfrastructureLifecycleState. + */ + public static final CloudExadataInfrastructureLifecycleState FAILED = fromString("Failed"); + + /** + * Creates a new instance of CloudExadataInfrastructureLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CloudExadataInfrastructureLifecycleState() { + } + + /** + * Creates or finds a CloudExadataInfrastructureLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CloudExadataInfrastructureLifecycleState. + */ + @JsonCreator + public static CloudExadataInfrastructureLifecycleState fromString(String name) { + return fromString(name, CloudExadataInfrastructureLifecycleState.class); + } + + /** + * Gets known CloudExadataInfrastructureLifecycleState values. + * + * @return known CloudExadataInfrastructureLifecycleState values. + */ + public static Collection values() { + return values(CloudExadataInfrastructureLifecycleState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureListResult.java new file mode 100644 index 000000000000..5aac03c28795 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.CloudExadataInfrastructureInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a CloudExadataInfrastructure list operation. + */ +@Fluent +public final class CloudExadataInfrastructureListResult { + /* + * The CloudExadataInfrastructure items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of CloudExadataInfrastructureListResult class. + */ + public CloudExadataInfrastructureListResult() { + } + + /** + * Get the value property: The CloudExadataInfrastructure items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The CloudExadataInfrastructure items on this page. + * + * @param value the value value to set. + * @return the CloudExadataInfrastructureListResult object itself. + */ + public CloudExadataInfrastructureListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 CloudExadataInfrastructureListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudExadataInfrastructureListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureProperties.java new file mode 100644 index 000000000000..65a7d424dd28 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureProperties.java @@ -0,0 +1,597 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * CloudExadataInfrastructure resource model. + */ +@Fluent +public final class CloudExadataInfrastructureProperties { + /* + * Exadata infra ocid + */ + @JsonProperty(value = "ocid", access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * The number of compute servers for the cloud Exadata infrastructure. + */ + @JsonProperty(value = "computeCount") + private Integer computeCount; + + /* + * The number of storage servers for the cloud Exadata infrastructure. + */ + @JsonProperty(value = "storageCount") + private Integer storageCount; + + /* + * The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + */ + @JsonProperty(value = "totalStorageSizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalStorageSizeInGbs; + + /* + * The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + */ + @JsonProperty(value = "availableStorageSizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer availableStorageSizeInGbs; + + /* + * The date and time the cloud Exadata infrastructure resource was created. + */ + @JsonProperty(value = "timeCreated", access = JsonProperty.Access.WRITE_ONLY) + private String timeCreated; + + /* + * Additional information about the current lifecycle state. + */ + @JsonProperty(value = "lifecycleDetails", access = JsonProperty.Access.WRITE_ONLY) + private String lifecycleDetails; + + /* + * maintenanceWindow property + */ + @JsonProperty(value = "maintenanceWindow") + private MaintenanceWindow maintenanceWindow; + + /* + * The estimated total time required in minutes for all patching operations (database server, storage server, and network switch patching). + */ + @JsonProperty(value = "estimatedPatchingTime", access = JsonProperty.Access.WRITE_ONLY) + private EstimatedPatchingTime estimatedPatchingTime; + + /* + * The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + */ + @JsonProperty(value = "customerContacts") + private List customerContacts; + + /* + * CloudExadataInfrastructure provisioning state + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AzureResourceProvisioningState provisioningState; + + /* + * CloudExadataInfrastructure lifecycle state + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private CloudExadataInfrastructureLifecycleState lifecycleState; + + /* + * The model name of the cloud Exadata infrastructure resource. + */ + @JsonProperty(value = "shape", required = true) + private String shape; + + /* + * HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + */ + @JsonProperty(value = "ociUrl", access = JsonProperty.Access.WRITE_ONLY) + private String ociUrl; + + /* + * The total number of CPU cores allocated. + */ + @JsonProperty(value = "cpuCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer cpuCount; + + /* + * The total number of CPU cores available. + */ + @JsonProperty(value = "maxCpuCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxCpuCount; + + /* + * The memory allocated in GBs. + */ + @JsonProperty(value = "memorySizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer memorySizeInGbs; + + /* + * The total memory available in GBs. + */ + @JsonProperty(value = "maxMemoryInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxMemoryInGbs; + + /* + * The local node storage to be allocated in GBs. + */ + @JsonProperty(value = "dbNodeStorageSizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer dbNodeStorageSizeInGbs; + + /* + * The total local node storage available in GBs. + */ + @JsonProperty(value = "maxDbNodeStorageSizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxDbNodeStorageSizeInGbs; + + /* + * The quantity of data in the database, in terabytes. + */ + @JsonProperty(value = "dataStorageSizeInTbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer dataStorageSizeInTbs; + + /* + * The total available DATA disk group size. + */ + @JsonProperty(value = "maxDataStorageInTbs", access = JsonProperty.Access.WRITE_ONLY) + private Double maxDataStorageInTbs; + + /* + * The software version of the database servers (dom0) in the Exadata infrastructure. + */ + @JsonProperty(value = "dbServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String dbServerVersion; + + /* + * The software version of the storage servers (cells) in the Exadata infrastructure. + */ + @JsonProperty(value = "storageServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String storageServerVersion; + + /* + * The requested number of additional storage servers activated for the Exadata infrastructure. + */ + @JsonProperty(value = "activatedStorageCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer activatedStorageCount; + + /* + * The requested number of additional storage servers for the Exadata infrastructure. + */ + @JsonProperty(value = "additionalStorageCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer additionalStorageCount; + + /* + * The name for the Exadata infrastructure. + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * The OCID of the last maintenance run. + */ + @JsonProperty(value = "lastMaintenanceRunId", access = JsonProperty.Access.WRITE_ONLY) + private String lastMaintenanceRunId; + + /* + * The OCID of the next maintenance run. + */ + @JsonProperty(value = "nextMaintenanceRunId", access = JsonProperty.Access.WRITE_ONLY) + private String nextMaintenanceRunId; + + /* + * Monthly Db Server version + */ + @JsonProperty(value = "monthlyDbServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String monthlyDbServerVersion; + + /* + * Monthly Storage Server version + */ + @JsonProperty(value = "monthlyStorageServerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String monthlyStorageServerVersion; + + /** + * Creates an instance of CloudExadataInfrastructureProperties class. + */ + public CloudExadataInfrastructureProperties() { + } + + /** + * Get the ocid property: Exadata infra ocid. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the computeCount property: The number of compute servers for the cloud Exadata infrastructure. + * + * @return the computeCount value. + */ + public Integer computeCount() { + return this.computeCount; + } + + /** + * Set the computeCount property: The number of compute servers for the cloud Exadata infrastructure. + * + * @param computeCount the computeCount value to set. + * @return the CloudExadataInfrastructureProperties object itself. + */ + public CloudExadataInfrastructureProperties withComputeCount(Integer computeCount) { + this.computeCount = computeCount; + return this; + } + + /** + * Get the storageCount property: The number of storage servers for the cloud Exadata infrastructure. + * + * @return the storageCount value. + */ + public Integer storageCount() { + return this.storageCount; + } + + /** + * Set the storageCount property: The number of storage servers for the cloud Exadata infrastructure. + * + * @param storageCount the storageCount value to set. + * @return the CloudExadataInfrastructureProperties object itself. + */ + public CloudExadataInfrastructureProperties withStorageCount(Integer storageCount) { + this.storageCount = storageCount; + return this; + } + + /** + * Get the totalStorageSizeInGbs property: The total storage allocated to the cloud Exadata infrastructure resource, + * in gigabytes (GB). + * + * @return the totalStorageSizeInGbs value. + */ + public Integer totalStorageSizeInGbs() { + return this.totalStorageSizeInGbs; + } + + /** + * Get the availableStorageSizeInGbs property: The available storage can be allocated to the cloud Exadata + * infrastructure resource, in gigabytes (GB). + * + * @return the availableStorageSizeInGbs value. + */ + public Integer availableStorageSizeInGbs() { + return this.availableStorageSizeInGbs; + } + + /** + * Get the timeCreated property: The date and time the cloud Exadata infrastructure resource was created. + * + * @return the timeCreated value. + */ + public String timeCreated() { + return this.timeCreated; + } + + /** + * Get the lifecycleDetails property: Additional information about the current lifecycle state. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Get the maintenanceWindow property: maintenanceWindow property. + * + * @return the maintenanceWindow value. + */ + public MaintenanceWindow maintenanceWindow() { + return this.maintenanceWindow; + } + + /** + * Set the maintenanceWindow property: maintenanceWindow property. + * + * @param maintenanceWindow the maintenanceWindow value to set. + * @return the CloudExadataInfrastructureProperties object itself. + */ + public CloudExadataInfrastructureProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + /** + * Get the estimatedPatchingTime property: The estimated total time required in minutes for all patching operations + * (database server, storage server, and network switch patching). + * + * @return the estimatedPatchingTime value. + */ + public EstimatedPatchingTime estimatedPatchingTime() { + return this.estimatedPatchingTime; + } + + /** + * Get the customerContacts property: The list of customer email addresses that receive information from Oracle + * about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about + * planned and unplanned software maintenance updates, information about system hardware, and other information + * needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata + * infrastructure instance. + * + * @return the customerContacts value. + */ + public List customerContacts() { + return this.customerContacts; + } + + /** + * Set the customerContacts property: The list of customer email addresses that receive information from Oracle + * about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about + * planned and unplanned software maintenance updates, information about system hardware, and other information + * needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata + * infrastructure instance. + * + * @param customerContacts the customerContacts value to set. + * @return the CloudExadataInfrastructureProperties object itself. + */ + public CloudExadataInfrastructureProperties withCustomerContacts(List customerContacts) { + this.customerContacts = customerContacts; + return this; + } + + /** + * Get the provisioningState property: CloudExadataInfrastructure provisioning state. + * + * @return the provisioningState value. + */ + public AzureResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the lifecycleState property: CloudExadataInfrastructure lifecycle state. + * + * @return the lifecycleState value. + */ + public CloudExadataInfrastructureLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the shape property: The model name of the cloud Exadata infrastructure resource. + * + * @return the shape value. + */ + public String shape() { + return this.shape; + } + + /** + * Set the shape property: The model name of the cloud Exadata infrastructure resource. + * + * @param shape the shape value to set. + * @return the CloudExadataInfrastructureProperties object itself. + */ + public CloudExadataInfrastructureProperties withShape(String shape) { + this.shape = shape; + return this; + } + + /** + * 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 cpuCount property: The total number of CPU cores allocated. + * + * @return the cpuCount value. + */ + public Integer cpuCount() { + return this.cpuCount; + } + + /** + * Get the maxCpuCount property: The total number of CPU cores available. + * + * @return the maxCpuCount value. + */ + public Integer maxCpuCount() { + return this.maxCpuCount; + } + + /** + * Get the memorySizeInGbs property: The memory allocated in GBs. + * + * @return the memorySizeInGbs value. + */ + public Integer memorySizeInGbs() { + return this.memorySizeInGbs; + } + + /** + * Get the maxMemoryInGbs property: The total memory available in GBs. + * + * @return the maxMemoryInGbs value. + */ + public Integer maxMemoryInGbs() { + return this.maxMemoryInGbs; + } + + /** + * Get the dbNodeStorageSizeInGbs property: The local node storage to be allocated in GBs. + * + * @return the dbNodeStorageSizeInGbs value. + */ + public Integer dbNodeStorageSizeInGbs() { + return this.dbNodeStorageSizeInGbs; + } + + /** + * Get the maxDbNodeStorageSizeInGbs property: The total local node storage available in GBs. + * + * @return the maxDbNodeStorageSizeInGbs value. + */ + public Integer maxDbNodeStorageSizeInGbs() { + return this.maxDbNodeStorageSizeInGbs; + } + + /** + * Get the dataStorageSizeInTbs property: The quantity of data in the database, in terabytes. + * + * @return the dataStorageSizeInTbs value. + */ + public Integer dataStorageSizeInTbs() { + return this.dataStorageSizeInTbs; + } + + /** + * Get the maxDataStorageInTbs property: The total available DATA disk group size. + * + * @return the maxDataStorageInTbs value. + */ + public Double maxDataStorageInTbs() { + return this.maxDataStorageInTbs; + } + + /** + * Get the dbServerVersion property: The software version of the database servers (dom0) in the Exadata + * infrastructure. + * + * @return the dbServerVersion value. + */ + public String dbServerVersion() { + return this.dbServerVersion; + } + + /** + * Get the storageServerVersion property: The software version of the storage servers (cells) in the Exadata + * infrastructure. + * + * @return the storageServerVersion value. + */ + public String storageServerVersion() { + return this.storageServerVersion; + } + + /** + * Get the activatedStorageCount property: The requested number of additional storage servers activated for the + * Exadata infrastructure. + * + * @return the activatedStorageCount value. + */ + public Integer activatedStorageCount() { + return this.activatedStorageCount; + } + + /** + * Get the additionalStorageCount property: The requested number of additional storage servers for the Exadata + * infrastructure. + * + * @return the additionalStorageCount value. + */ + public Integer additionalStorageCount() { + return this.additionalStorageCount; + } + + /** + * Get the displayName property: The name for the Exadata infrastructure. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The name for the Exadata infrastructure. + * + * @param displayName the displayName value to set. + * @return the CloudExadataInfrastructureProperties object itself. + */ + public CloudExadataInfrastructureProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the lastMaintenanceRunId property: The OCID of the last maintenance run. + * + * @return the lastMaintenanceRunId value. + */ + public String lastMaintenanceRunId() { + return this.lastMaintenanceRunId; + } + + /** + * Get the nextMaintenanceRunId property: The OCID of the next maintenance run. + * + * @return the nextMaintenanceRunId value. + */ + public String nextMaintenanceRunId() { + return this.nextMaintenanceRunId; + } + + /** + * Get the monthlyDbServerVersion property: Monthly Db Server version. + * + * @return the monthlyDbServerVersion value. + */ + public String monthlyDbServerVersion() { + return this.monthlyDbServerVersion; + } + + /** + * Get the monthlyStorageServerVersion property: Monthly Storage Server version. + * + * @return the monthlyStorageServerVersion value. + */ + public String monthlyStorageServerVersion() { + return this.monthlyStorageServerVersion; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (maintenanceWindow() != null) { + maintenanceWindow().validate(); + } + if (estimatedPatchingTime() != null) { + estimatedPatchingTime().validate(); + } + if (customerContacts() != null) { + customerContacts().forEach(e -> e.validate()); + } + if (shape() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property shape in model CloudExadataInfrastructureProperties")); + } + if (displayName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property displayName in model CloudExadataInfrastructureProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudExadataInfrastructureProperties.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureUpdate.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureUpdate.java new file mode 100644 index 000000000000..048255f2b729 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureUpdate.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.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * The type used for update operations of the CloudExadataInfrastructure. + */ +@Fluent +public final class CloudExadataInfrastructureUpdate { + /* + * CloudExadataInfrastructure zones + */ + @JsonProperty(value = "zones") + private List zones; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the CloudExadataInfrastructure. + */ + @JsonProperty(value = "properties") + private CloudExadataInfrastructureUpdateProperties properties; + + /** + * Creates an instance of CloudExadataInfrastructureUpdate class. + */ + public CloudExadataInfrastructureUpdate() { + } + + /** + * Get the zones property: CloudExadataInfrastructure zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: CloudExadataInfrastructure zones. + * + * @param zones the zones value to set. + * @return the CloudExadataInfrastructureUpdate object itself. + */ + public CloudExadataInfrastructureUpdate 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 CloudExadataInfrastructureUpdate object itself. + */ + public CloudExadataInfrastructureUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The updatable properties of the CloudExadataInfrastructure. + * + * @return the properties value. + */ + public CloudExadataInfrastructureUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the CloudExadataInfrastructure. + * + * @param properties the properties value to set. + * @return the CloudExadataInfrastructureUpdate object itself. + */ + public CloudExadataInfrastructureUpdate withProperties(CloudExadataInfrastructureUpdateProperties 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(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureUpdateProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureUpdateProperties.java new file mode 100644 index 000000000000..19a43ce5a57f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructureUpdateProperties.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The updatable properties of the CloudExadataInfrastructure. + */ +@Fluent +public final class CloudExadataInfrastructureUpdateProperties { + /* + * The number of compute servers for the cloud Exadata infrastructure. + */ + @JsonProperty(value = "computeCount") + private Integer computeCount; + + /* + * The number of storage servers for the cloud Exadata infrastructure. + */ + @JsonProperty(value = "storageCount") + private Integer storageCount; + + /* + * maintenanceWindow property + */ + @JsonProperty(value = "maintenanceWindow") + private MaintenanceWindow maintenanceWindow; + + /* + * The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + */ + @JsonProperty(value = "customerContacts") + private List customerContacts; + + /* + * The name for the Exadata infrastructure. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Creates an instance of CloudExadataInfrastructureUpdateProperties class. + */ + public CloudExadataInfrastructureUpdateProperties() { + } + + /** + * Get the computeCount property: The number of compute servers for the cloud Exadata infrastructure. + * + * @return the computeCount value. + */ + public Integer computeCount() { + return this.computeCount; + } + + /** + * Set the computeCount property: The number of compute servers for the cloud Exadata infrastructure. + * + * @param computeCount the computeCount value to set. + * @return the CloudExadataInfrastructureUpdateProperties object itself. + */ + public CloudExadataInfrastructureUpdateProperties withComputeCount(Integer computeCount) { + this.computeCount = computeCount; + return this; + } + + /** + * Get the storageCount property: The number of storage servers for the cloud Exadata infrastructure. + * + * @return the storageCount value. + */ + public Integer storageCount() { + return this.storageCount; + } + + /** + * Set the storageCount property: The number of storage servers for the cloud Exadata infrastructure. + * + * @param storageCount the storageCount value to set. + * @return the CloudExadataInfrastructureUpdateProperties object itself. + */ + public CloudExadataInfrastructureUpdateProperties withStorageCount(Integer storageCount) { + this.storageCount = storageCount; + return this; + } + + /** + * Get the maintenanceWindow property: maintenanceWindow property. + * + * @return the maintenanceWindow value. + */ + public MaintenanceWindow maintenanceWindow() { + return this.maintenanceWindow; + } + + /** + * Set the maintenanceWindow property: maintenanceWindow property. + * + * @param maintenanceWindow the maintenanceWindow value to set. + * @return the CloudExadataInfrastructureUpdateProperties object itself. + */ + public CloudExadataInfrastructureUpdateProperties withMaintenanceWindow(MaintenanceWindow maintenanceWindow) { + this.maintenanceWindow = maintenanceWindow; + return this; + } + + /** + * Get the customerContacts property: The list of customer email addresses that receive information from Oracle + * about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about + * planned and unplanned software maintenance updates, information about system hardware, and other information + * needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata + * infrastructure instance. + * + * @return the customerContacts value. + */ + public List customerContacts() { + return this.customerContacts; + } + + /** + * Set the customerContacts property: The list of customer email addresses that receive information from Oracle + * about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about + * planned and unplanned software maintenance updates, information about system hardware, and other information + * needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata + * infrastructure instance. + * + * @param customerContacts the customerContacts value to set. + * @return the CloudExadataInfrastructureUpdateProperties object itself. + */ + public CloudExadataInfrastructureUpdateProperties withCustomerContacts(List customerContacts) { + this.customerContacts = customerContacts; + return this; + } + + /** + * Get the displayName property: The name for the Exadata infrastructure. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The name for the Exadata infrastructure. + * + * @param displayName the displayName value to set. + * @return the CloudExadataInfrastructureUpdateProperties object itself. + */ + public CloudExadataInfrastructureUpdateProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (maintenanceWindow() != null) { + maintenanceWindow().validate(); + } + if (customerContacts() != null) { + customerContacts().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructures.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructures.java new file mode 100644 index 000000000000..bb71e52f3108 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudExadataInfrastructures.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 CloudExadataInfrastructures. + */ +public interface CloudExadataInfrastructures { + /** + * List CloudExadataInfrastructure 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 CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List CloudExadataInfrastructure 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 CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List CloudExadataInfrastructure resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudExadataInfrastructure list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, + String cloudexadatainfrastructurename, Context context); + + /** + * Get a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudExadataInfrastructure. + */ + CloudExadataInfrastructure getByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String cloudexadatainfrastructurename); + + /** + * Delete a CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String cloudexadatainfrastructurename, Context context); + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + CloudExadataInfrastructure addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename); + + /** + * Perform add storage capacity on exadata infra. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudExadataInfrastructure resource definition. + */ + CloudExadataInfrastructure addStorageCapacity(String resourceGroupName, String cloudexadatainfrastructurename, + Context context); + + /** + * Get a CloudExadataInfrastructure. + * + * @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 CloudExadataInfrastructure along with {@link Response}. + */ + CloudExadataInfrastructure getById(String id); + + /** + * Get a CloudExadataInfrastructure. + * + * @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 CloudExadataInfrastructure along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a CloudExadataInfrastructure. + * + * @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 CloudExadataInfrastructure. + * + * @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 CloudExadataInfrastructure resource. + * + * @param name resource name. + * @return the first stage of the new CloudExadataInfrastructure definition. + */ + CloudExadataInfrastructure.DefinitionStages.Blank define(String name); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmCluster.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmCluster.java new file mode 100644 index 000000000000..36c2bde7ac07 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmCluster.java @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.CloudVmClusterInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of CloudVmCluster. + */ +public interface CloudVmCluster { + /** + * 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. + */ + CloudVmClusterProperties properties(); + + /** + * 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.oracle.fluent.models.CloudVmClusterInner object. + * + * @return the inner object. + */ + CloudVmClusterInner innerModel(); + + /** + * The entirety of the CloudVmCluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The CloudVmCluster definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the CloudVmCluster definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the CloudVmCluster 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 CloudVmCluster 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 CloudVmCluster 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + CloudVmCluster create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CloudVmCluster create(Context context); + } + + /** + * The stage of the CloudVmCluster 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 CloudVmCluster 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(CloudVmClusterProperties properties); + } + } + + /** + * Begins update for the CloudVmCluster resource. + * + * @return the stage of resource update. + */ + CloudVmCluster.Update update(); + + /** + * The template for CloudVmCluster update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CloudVmCluster apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CloudVmCluster apply(Context context); + } + + /** + * The CloudVmCluster update stages. + */ + interface UpdateStages { + /** + * The stage of the CloudVmCluster 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 CloudVmCluster update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The updatable properties of the CloudVmCluster.. + * + * @param properties The updatable properties of the CloudVmCluster. + * @return the next definition stage. + */ + Update withProperties(CloudVmClusterUpdateProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CloudVmCluster refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CloudVmCluster refresh(Context context); + + /** + * Add VMs to 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 cloudVmCluster resource definition. + */ + CloudVmCluster addVms(AddRemoveDbNode body); + + /** + * Add VMs to 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 cloudVmCluster resource definition. + */ + CloudVmCluster addVms(AddRemoveDbNode body, Context context); + + /** + * List Private IP Addresses by the provided filter. + * + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties along with {@link Response}. + */ + Response> listPrivateIpAddressesWithResponse(PrivateIpAddressesFilter body, + Context context); + + /** + * List Private IP Addresses by the provided filter. + * + * @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 array of PrivateIpAddressProperties. + */ + List listPrivateIpAddresses(PrivateIpAddressesFilter body); + + /** + * 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 cloudVmCluster resource definition. + */ + CloudVmCluster removeVms(AddRemoveDbNode 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 cloudVmCluster resource definition. + */ + CloudVmCluster removeVms(AddRemoveDbNode body, Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterLifecycleState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterLifecycleState.java new file mode 100644 index 000000000000..b9d0c3931c7b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterLifecycleState.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * CloudVmClusterLifecycleState enum. + */ +public final class CloudVmClusterLifecycleState extends ExpandableStringEnum { + /** + * Static value Provisioning for CloudVmClusterLifecycleState. + */ + public static final CloudVmClusterLifecycleState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Available for CloudVmClusterLifecycleState. + */ + public static final CloudVmClusterLifecycleState AVAILABLE = fromString("Available"); + + /** + * Static value Updating for CloudVmClusterLifecycleState. + */ + public static final CloudVmClusterLifecycleState UPDATING = fromString("Updating"); + + /** + * Static value Terminating for CloudVmClusterLifecycleState. + */ + public static final CloudVmClusterLifecycleState TERMINATING = fromString("Terminating"); + + /** + * Static value Terminated for CloudVmClusterLifecycleState. + */ + public static final CloudVmClusterLifecycleState TERMINATED = fromString("Terminated"); + + /** + * Static value MaintenanceInProgress for CloudVmClusterLifecycleState. + */ + public static final CloudVmClusterLifecycleState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); + + /** + * Static value Failed for CloudVmClusterLifecycleState. + */ + public static final CloudVmClusterLifecycleState FAILED = fromString("Failed"); + + /** + * Creates a new instance of CloudVmClusterLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CloudVmClusterLifecycleState() { + } + + /** + * Creates or finds a CloudVmClusterLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CloudVmClusterLifecycleState. + */ + @JsonCreator + public static CloudVmClusterLifecycleState fromString(String name) { + return fromString(name, CloudVmClusterLifecycleState.class); + } + + /** + * Gets known CloudVmClusterLifecycleState values. + * + * @return known CloudVmClusterLifecycleState values. + */ + public static Collection values() { + return values(CloudVmClusterLifecycleState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterListResult.java new file mode 100644 index 000000000000..52b1374aa5c3 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.CloudVmClusterInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a CloudVmCluster list operation. + */ +@Fluent +public final class CloudVmClusterListResult { + /* + * The CloudVmCluster items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of CloudVmClusterListResult class. + */ + public CloudVmClusterListResult() { + } + + /** + * Get the value property: The CloudVmCluster items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The CloudVmCluster items on this page. + * + * @param value the value value to set. + * @return the CloudVmClusterListResult object itself. + */ + public CloudVmClusterListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 CloudVmClusterListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudVmClusterListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterProperties.java new file mode 100644 index 000000000000..18a6b8ff72a0 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterProperties.java @@ -0,0 +1,1145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * CloudVmCluster resource model. + */ +@Fluent +public final class CloudVmClusterProperties { + /* + * Cloud VM Cluster ocid + */ + @JsonProperty(value = "ocid", access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * The port number configured for the listener on the cloud VM cluster. + */ + @JsonProperty(value = "listenerPort", access = JsonProperty.Access.WRITE_ONLY) + private Long listenerPort; + + /* + * The number of nodes in the cloud VM cluster. + */ + @JsonProperty(value = "nodeCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer nodeCount; + + /* + * The data disk group size to be allocated in GBs per VM. + */ + @JsonProperty(value = "storageSizeInGbs") + private Integer storageSizeInGbs; + + /* + * The data disk group size to be allocated in TBs. + */ + @JsonProperty(value = "dataStorageSizeInTbs") + private Double dataStorageSizeInTbs; + + /* + * The local node storage to be allocated in GBs. + */ + @JsonProperty(value = "dbNodeStorageSizeInGbs") + private Integer dbNodeStorageSizeInGbs; + + /* + * The memory to be allocated in GBs. + */ + @JsonProperty(value = "memorySizeInGbs") + private Integer memorySizeInGbs; + + /* + * The date and time that the cloud VM cluster was created. + */ + @JsonProperty(value = "timeCreated", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeCreated; + + /* + * Additional information about the current lifecycle state. + */ + @JsonProperty(value = "lifecycleDetails", access = JsonProperty.Access.WRITE_ONLY) + private String lifecycleDetails; + + /* + * The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + */ + @JsonProperty(value = "timeZone") + private String timeZone; + + /* + * The OCID of the zone the cloud VM cluster is associated with. + */ + @JsonProperty(value = "zoneId") + private String zoneId; + + /* + * The hostname for the cloud VM cluster. + */ + @JsonProperty(value = "hostname", required = true) + private String hostname; + + /* + * The domain name for the cloud VM cluster. + */ + @JsonProperty(value = "domain") + private String domain; + + /* + * The number of CPU cores enabled on the cloud VM cluster. + */ + @JsonProperty(value = "cpuCoreCount", required = true) + private int cpuCoreCount; + + /* + * The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + */ + @JsonProperty(value = "ocpuCount") + private Float ocpuCount; + + /* + * The cluster name for cloud VM cluster. 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. + */ + @JsonProperty(value = "clusterName") + private String clusterName; + + /* + * The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + */ + @JsonProperty(value = "dataStoragePercentage") + private Integer dataStoragePercentage; + + /* + * If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. + */ + @JsonProperty(value = "isLocalBackupEnabled") + private Boolean isLocalBackupEnabled; + + /* + * Cloud Exadata Infrastructure ID + */ + @JsonProperty(value = "cloudExadataInfrastructureId", required = true) + private String cloudExadataInfrastructureId; + + /* + * If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + */ + @JsonProperty(value = "isSparseDiskgroupEnabled") + private Boolean isSparseDiskgroupEnabled; + + /* + * Operating system version of the image. + */ + @JsonProperty(value = "systemVersion", access = JsonProperty.Access.WRITE_ONLY) + private String systemVersion; + + /* + * The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + */ + @JsonProperty(value = "sshPublicKeys", required = true) + private List sshPublicKeys; + + /* + * The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + */ + @JsonProperty(value = "licenseModel") + private LicenseModel licenseModel; + + /* + * The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + */ + @JsonProperty(value = "diskRedundancy", access = JsonProperty.Access.WRITE_ONLY) + private DiskRedundancy diskRedundancy; + + /* + * The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. 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. + */ + @JsonProperty(value = "scanIpIds", access = JsonProperty.Access.WRITE_ONLY) + private List scanIpIds; + + /* + * The virtual IP (VIP) addresses associated with the cloud VM cluster. 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. + */ + @JsonProperty(value = "vipIds", access = JsonProperty.Access.WRITE_ONLY) + private List vipIds; + + /* + * The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + */ + @JsonProperty(value = "scanDnsName", access = JsonProperty.Access.WRITE_ONLY) + private String scanDnsName; + + /* + * The TCP Single Client Access Name (SCAN) port. The default port is 1521. + */ + @JsonProperty(value = "scanListenerPortTcp") + private Integer scanListenerPortTcp; + + /* + * The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + */ + @JsonProperty(value = "scanListenerPortTcpSsl") + private Integer scanListenerPortTcpSsl; + + /* + * The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + */ + @JsonProperty(value = "scanDnsRecordId", access = JsonProperty.Access.WRITE_ONLY) + private String scanDnsRecordId; + + /* + * The model name of the Exadata hardware running the cloud VM cluster. + */ + @JsonProperty(value = "shape", access = JsonProperty.Access.WRITE_ONLY) + private String shape; + + /* + * CloudVmCluster provisioning state + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AzureResourceProvisioningState provisioningState; + + /* + * CloudVmCluster lifecycle state + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private CloudVmClusterLifecycleState lifecycleState; + + /* + * VNET for network connectivity + */ + @JsonProperty(value = "vnetId", required = true) + private String vnetId; + + /* + * Oracle Grid Infrastructure (GI) software version + */ + @JsonProperty(value = "giVersion", required = true) + private String giVersion; + + /* + * HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + */ + @JsonProperty(value = "ociUrl", access = JsonProperty.Access.WRITE_ONLY) + private String ociUrl; + + /* + * HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + */ + @JsonProperty(value = "nsgUrl", access = JsonProperty.Access.WRITE_ONLY) + private String nsgUrl; + + /* + * Client subnet + */ + @JsonProperty(value = "subnetId", required = true) + private String subnetId; + + /* + * Client OCI backup subnet CIDR, default is 192.168.252.0/22 + */ + @JsonProperty(value = "backupSubnetCidr") + private String backupSubnetCidr; + + /* + * CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + */ + @JsonProperty(value = "nsgCidrs") + private List nsgCidrs; + + /* + * Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + */ + @JsonProperty(value = "dataCollectionOptions") + private DataCollectionOptions dataCollectionOptions; + + /* + * Display Name + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * The list of compute servers to be added to the cloud VM cluster. + */ + @JsonProperty(value = "computeNodes") + private List computeNodes; + + /* + * iormConfigCache details for cloud VM cluster. + */ + @JsonProperty(value = "iormConfigCache", access = JsonProperty.Access.WRITE_ONLY) + private ExadataIormConfig iormConfigCache; + + /* + * The OCID of the last maintenance update history entry. + */ + @JsonProperty(value = "lastUpdateHistoryEntryId", access = JsonProperty.Access.WRITE_ONLY) + private String lastUpdateHistoryEntryId; + + /* + * The list of DB servers. + */ + @JsonProperty(value = "dbServers") + private List dbServers; + + /* + * Cluster compartmentId + */ + @JsonProperty(value = "compartmentId", access = JsonProperty.Access.WRITE_ONLY) + private String compartmentId; + + /* + * Cluster subnet ocid + */ + @JsonProperty(value = "subnetOcid", access = JsonProperty.Access.WRITE_ONLY) + private String subnetOcid; + + /** + * Creates an instance of CloudVmClusterProperties class. + */ + public CloudVmClusterProperties() { + } + + /** + * Get the ocid property: Cloud VM Cluster ocid. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the listenerPort property: The port number configured for the listener on the cloud VM cluster. + * + * @return the listenerPort value. + */ + public Long listenerPort() { + return this.listenerPort; + } + + /** + * Get the nodeCount property: The number of nodes in the cloud VM cluster. + * + * @return the nodeCount value. + */ + public Integer nodeCount() { + return this.nodeCount; + } + + /** + * Get the storageSizeInGbs property: The data disk group size to be allocated in GBs per VM. + * + * @return the storageSizeInGbs value. + */ + public Integer storageSizeInGbs() { + return this.storageSizeInGbs; + } + + /** + * Set the storageSizeInGbs property: The data disk group size to be allocated in GBs per VM. + * + * @param storageSizeInGbs the storageSizeInGbs value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withStorageSizeInGbs(Integer storageSizeInGbs) { + this.storageSizeInGbs = storageSizeInGbs; + return this; + } + + /** + * Get the dataStorageSizeInTbs property: The data disk group size to be allocated in TBs. + * + * @return the dataStorageSizeInTbs value. + */ + public Double dataStorageSizeInTbs() { + return this.dataStorageSizeInTbs; + } + + /** + * Set the dataStorageSizeInTbs property: The data disk group size to be allocated in TBs. + * + * @param dataStorageSizeInTbs the dataStorageSizeInTbs value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withDataStorageSizeInTbs(Double dataStorageSizeInTbs) { + this.dataStorageSizeInTbs = dataStorageSizeInTbs; + return this; + } + + /** + * Get the dbNodeStorageSizeInGbs property: The local node storage to be allocated in GBs. + * + * @return the dbNodeStorageSizeInGbs value. + */ + public Integer dbNodeStorageSizeInGbs() { + return this.dbNodeStorageSizeInGbs; + } + + /** + * Set the dbNodeStorageSizeInGbs property: The local node storage to be allocated in GBs. + * + * @param dbNodeStorageSizeInGbs the dbNodeStorageSizeInGbs value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withDbNodeStorageSizeInGbs(Integer dbNodeStorageSizeInGbs) { + this.dbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + return this; + } + + /** + * Get the memorySizeInGbs property: The memory to be allocated in GBs. + * + * @return the memorySizeInGbs value. + */ + public Integer memorySizeInGbs() { + return this.memorySizeInGbs; + } + + /** + * Set the memorySizeInGbs property: The memory to be allocated in GBs. + * + * @param memorySizeInGbs the memorySizeInGbs value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withMemorySizeInGbs(Integer memorySizeInGbs) { + this.memorySizeInGbs = memorySizeInGbs; + return this; + } + + /** + * Get the timeCreated property: The date and time that the cloud VM cluster was created. + * + * @return the timeCreated value. + */ + public OffsetDateTime timeCreated() { + return this.timeCreated; + } + + /** + * Get the lifecycleDetails property: Additional information about the current lifecycle state. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Get the timeZone property: The time zone of the cloud VM cluster. 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 cloud VM cluster. For details, see [Exadata Infrastructure Time + * Zones](/Content/Database/References/timezones.htm). + * + * @param timeZone the timeZone value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the zoneId property: The OCID of the zone the cloud VM cluster is associated with. + * + * @return the zoneId value. + */ + public String zoneId() { + return this.zoneId; + } + + /** + * Set the zoneId property: The OCID of the zone the cloud VM cluster is associated with. + * + * @param zoneId the zoneId value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withZoneId(String zoneId) { + this.zoneId = zoneId; + return this; + } + + /** + * Get the hostname property: The hostname for the cloud VM cluster. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: The hostname for the cloud VM cluster. + * + * @param hostname the hostname value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the domain property: The domain name for the cloud VM cluster. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: The domain name for the cloud VM cluster. + * + * @param domain the domain value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the cpuCoreCount property: The number of CPU cores enabled on the cloud VM cluster. + * + * @return the cpuCoreCount value. + */ + public int cpuCoreCount() { + return this.cpuCoreCount; + } + + /** + * Set the cpuCoreCount property: The number of CPU cores enabled on the cloud VM cluster. + * + * @param cpuCoreCount the cpuCoreCount value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withCpuCoreCount(int cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + return this; + } + + /** + * Get the ocpuCount property: The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is + * allowed for the fractional part. + * + * @return the ocpuCount value. + */ + public Float ocpuCount() { + return this.ocpuCount; + } + + /** + * Set the ocpuCount property: The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is + * allowed for the fractional part. + * + * @param ocpuCount the ocpuCount value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withOcpuCount(Float ocpuCount) { + this.ocpuCount = ocpuCount; + return this; + } + + /** + * Get the clusterName property: The cluster name for cloud VM cluster. 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 cloud VM cluster. 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withClusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * Get the dataStoragePercentage property: The percentage assigned to DATA storage (user data and database files). + * The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager + * backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage + * Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on + * the impact of the configuration settings on storage. + * + * @return the dataStoragePercentage value. + */ + public Integer dataStoragePercentage() { + return this.dataStoragePercentage; + } + + /** + * Set the dataStoragePercentage property: The percentage assigned to DATA storage (user data and database files). + * The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager + * backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage + * Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on + * the impact of the configuration settings on storage. + * + * @param dataStoragePercentage the dataStoragePercentage value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withDataStoragePercentage(Integer dataStoragePercentage) { + this.dataStoragePercentage = dataStoragePercentage; + return this; + } + + /** + * Get the isLocalBackupEnabled property: If true, database backup on local Exadata storage is configured for the + * cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. + * + * @return the isLocalBackupEnabled value. + */ + public Boolean isLocalBackupEnabled() { + return this.isLocalBackupEnabled; + } + + /** + * Set the isLocalBackupEnabled property: If true, database backup on local Exadata storage is configured for the + * cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. + * + * @param isLocalBackupEnabled the isLocalBackupEnabled value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withIsLocalBackupEnabled(Boolean isLocalBackupEnabled) { + this.isLocalBackupEnabled = isLocalBackupEnabled; + return this; + } + + /** + * Get the cloudExadataInfrastructureId property: Cloud Exadata Infrastructure ID. + * + * @return the cloudExadataInfrastructureId value. + */ + public String cloudExadataInfrastructureId() { + return this.cloudExadataInfrastructureId; + } + + /** + * Set the cloudExadataInfrastructureId property: Cloud Exadata Infrastructure ID. + * + * @param cloudExadataInfrastructureId the cloudExadataInfrastructureId value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withCloudExadataInfrastructureId(String cloudExadataInfrastructureId) { + this.cloudExadataInfrastructureId = cloudExadataInfrastructureId; + return this; + } + + /** + * Get the isSparseDiskgroupEnabled property: If true, sparse disk group is configured for the cloud VM cluster. If + * false, sparse disk group is not created. + * + * @return the isSparseDiskgroupEnabled value. + */ + public Boolean isSparseDiskgroupEnabled() { + return this.isSparseDiskgroupEnabled; + } + + /** + * Set the isSparseDiskgroupEnabled property: If true, sparse disk group is configured for the cloud VM cluster. If + * false, sparse disk group is not created. + * + * @param isSparseDiskgroupEnabled the isSparseDiskgroupEnabled value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withIsSparseDiskgroupEnabled(Boolean isSparseDiskgroupEnabled) { + this.isSparseDiskgroupEnabled = isSparseDiskgroupEnabled; + return this; + } + + /** + * Get the systemVersion property: Operating system version of the image. + * + * @return the systemVersion value. + */ + public String systemVersion() { + return this.systemVersion; + } + + /** + * Get the sshPublicKeys property: The public key portion of one or more key pairs used for SSH access to the cloud + * VM cluster. + * + * @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 cloud + * VM cluster. + * + * @param sshPublicKeys the sshPublicKeys value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withSshPublicKeys(List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + return this; + } + + /** + * Get the licenseModel property: The Oracle license model that applies to the cloud VM cluster. 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 cloud VM cluster. The default is + * LICENSE_INCLUDED. + * + * @param licenseModel the licenseModel value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withLicenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + return this; + } + + /** + * Get the diskRedundancy property: The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way + * redundancy. HIGH is 3-way redundancy. + * + * @return the diskRedundancy value. + */ + public DiskRedundancy diskRedundancy() { + return this.diskRedundancy; + } + + /** + * Get the scanIpIds property: The Single Client Access Name (SCAN) IP addresses associated with the cloud VM + * cluster. 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 vipIds property: The virtual IP (VIP) addresses associated with the cloud VM cluster. 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 scanDnsName property: The FQDN of the DNS record for the SCAN IP addresses that are associated with the + * cloud VM cluster. + * + * @return the scanDnsName value. + */ + public String scanDnsName() { + return this.scanDnsName; + } + + /** + * 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withScanListenerPortTcpSsl(Integer scanListenerPortTcpSsl) { + this.scanListenerPortTcpSsl = scanListenerPortTcpSsl; + return this; + } + + /** + * Get the scanDnsRecordId property: The OCID of the DNS record for the SCAN IP addresses that are associated with + * the cloud VM cluster. + * + * @return the scanDnsRecordId value. + */ + public String scanDnsRecordId() { + return this.scanDnsRecordId; + } + + /** + * Get the shape property: The model name of the Exadata hardware running the cloud VM cluster. + * + * @return the shape value. + */ + public String shape() { + return this.shape; + } + + /** + * Get the provisioningState property: CloudVmCluster provisioning state. + * + * @return the provisioningState value. + */ + public AzureResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the lifecycleState property: CloudVmCluster lifecycle state. + * + * @return the lifecycleState value. + */ + public CloudVmClusterLifecycleState 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withVnetId(String vnetId) { + this.vnetId = vnetId; + return this; + } + + /** + * Get the giVersion property: Oracle Grid Infrastructure (GI) software version. + * + * @return the giVersion value. + */ + public String giVersion() { + return this.giVersion; + } + + /** + * Set the giVersion property: Oracle Grid Infrastructure (GI) software version. + * + * @param giVersion the giVersion value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withGiVersion(String giVersion) { + this.giVersion = giVersion; + return this; + } + + /** + * 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 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 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withSubnetId(String subnetId) { + this.subnetId = subnetId; + 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withBackupSubnetCidr(String backupSubnetCidr) { + this.backupSubnetCidr = backupSubnetCidr; + 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withNsgCidrs(List nsgCidrs) { + this.nsgCidrs = nsgCidrs; + 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties 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 CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the computeNodes property: The list of compute servers to be added to the cloud VM cluster. + * + * @return the computeNodes value. + */ + public List computeNodes() { + return this.computeNodes; + } + + /** + * Set the computeNodes property: The list of compute servers to be added to the cloud VM cluster. + * + * @param computeNodes the computeNodes value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withComputeNodes(List computeNodes) { + this.computeNodes = computeNodes; + return this; + } + + /** + * Get the iormConfigCache property: iormConfigCache details for cloud VM cluster. + * + * @return the iormConfigCache value. + */ + public ExadataIormConfig iormConfigCache() { + return this.iormConfigCache; + } + + /** + * Get the lastUpdateHistoryEntryId property: The OCID of the last maintenance update history entry. + * + * @return the lastUpdateHistoryEntryId value. + */ + public String lastUpdateHistoryEntryId() { + return this.lastUpdateHistoryEntryId; + } + + /** + * Get the dbServers property: The list of DB servers. + * + * @return the dbServers value. + */ + public List dbServers() { + return this.dbServers; + } + + /** + * Set the dbServers property: The list of DB servers. + * + * @param dbServers the dbServers value to set. + * @return the CloudVmClusterProperties object itself. + */ + public CloudVmClusterProperties withDbServers(List dbServers) { + this.dbServers = dbServers; + return this; + } + + /** + * Get the compartmentId property: Cluster compartmentId. + * + * @return the compartmentId value. + */ + public String compartmentId() { + return this.compartmentId; + } + + /** + * 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 (hostname() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property hostname in model CloudVmClusterProperties")); + } + if (cloudExadataInfrastructureId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property cloudExadataInfrastructureId in model CloudVmClusterProperties")); + } + if (sshPublicKeys() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sshPublicKeys in model CloudVmClusterProperties")); + } + if (vnetId() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property vnetId in model CloudVmClusterProperties")); + } + if (giVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property giVersion in model CloudVmClusterProperties")); + } + if (subnetId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetId in model CloudVmClusterProperties")); + } + if (nsgCidrs() != null) { + nsgCidrs().forEach(e -> e.validate()); + } + if (dataCollectionOptions() != null) { + dataCollectionOptions().validate(); + } + if (displayName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property displayName in model CloudVmClusterProperties")); + } + if (iormConfigCache() != null) { + iormConfigCache().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudVmClusterProperties.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterUpdate.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterUpdate.java new file mode 100644 index 000000000000..e30392c0098a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterUpdate.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The type used for update operations of the CloudVmCluster. + */ +@Fluent +public final class CloudVmClusterUpdate { + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the CloudVmCluster. + */ + @JsonProperty(value = "properties") + private CloudVmClusterUpdateProperties properties; + + /** + * Creates an instance of CloudVmClusterUpdate class. + */ + public CloudVmClusterUpdate() { + } + + /** + * 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 CloudVmClusterUpdate object itself. + */ + public CloudVmClusterUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the properties property: The updatable properties of the CloudVmCluster. + * + * @return the properties value. + */ + public CloudVmClusterUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the CloudVmCluster. + * + * @param properties the properties value to set. + * @return the CloudVmClusterUpdate object itself. + */ + public CloudVmClusterUpdate withProperties(CloudVmClusterUpdateProperties 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(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterUpdateProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterUpdateProperties.java new file mode 100644 index 000000000000..75ab05b0bce1 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusterUpdateProperties.java @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The updatable properties of the CloudVmCluster. + */ +@Fluent +public final class CloudVmClusterUpdateProperties { + /* + * The data disk group size to be allocated in GBs per VM. + */ + @JsonProperty(value = "storageSizeInGbs") + private Integer storageSizeInGbs; + + /* + * The data disk group size to be allocated in TBs. + */ + @JsonProperty(value = "dataStorageSizeInTbs") + private Double dataStorageSizeInTbs; + + /* + * The local node storage to be allocated in GBs. + */ + @JsonProperty(value = "dbNodeStorageSizeInGbs") + private Integer dbNodeStorageSizeInGbs; + + /* + * The memory to be allocated in GBs. + */ + @JsonProperty(value = "memorySizeInGbs") + private Integer memorySizeInGbs; + + /* + * The number of CPU cores enabled on the cloud VM cluster. + */ + @JsonProperty(value = "cpuCoreCount") + private Integer cpuCoreCount; + + /* + * The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + */ + @JsonProperty(value = "ocpuCount") + private Float ocpuCount; + + /* + * The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + */ + @JsonProperty(value = "sshPublicKeys") + private List sshPublicKeys; + + /* + * The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + */ + @JsonProperty(value = "licenseModel") + private LicenseModel licenseModel; + + /* + * Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + */ + @JsonProperty(value = "dataCollectionOptions") + private DataCollectionOptions dataCollectionOptions; + + /* + * Display Name + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The list of compute servers to be added to the cloud VM cluster. + */ + @JsonProperty(value = "computeNodes") + private List computeNodes; + + /** + * Creates an instance of CloudVmClusterUpdateProperties class. + */ + public CloudVmClusterUpdateProperties() { + } + + /** + * Get the storageSizeInGbs property: The data disk group size to be allocated in GBs per VM. + * + * @return the storageSizeInGbs value. + */ + public Integer storageSizeInGbs() { + return this.storageSizeInGbs; + } + + /** + * Set the storageSizeInGbs property: The data disk group size to be allocated in GBs per VM. + * + * @param storageSizeInGbs the storageSizeInGbs value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withStorageSizeInGbs(Integer storageSizeInGbs) { + this.storageSizeInGbs = storageSizeInGbs; + return this; + } + + /** + * Get the dataStorageSizeInTbs property: The data disk group size to be allocated in TBs. + * + * @return the dataStorageSizeInTbs value. + */ + public Double dataStorageSizeInTbs() { + return this.dataStorageSizeInTbs; + } + + /** + * Set the dataStorageSizeInTbs property: The data disk group size to be allocated in TBs. + * + * @param dataStorageSizeInTbs the dataStorageSizeInTbs value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withDataStorageSizeInTbs(Double dataStorageSizeInTbs) { + this.dataStorageSizeInTbs = dataStorageSizeInTbs; + return this; + } + + /** + * Get the dbNodeStorageSizeInGbs property: The local node storage to be allocated in GBs. + * + * @return the dbNodeStorageSizeInGbs value. + */ + public Integer dbNodeStorageSizeInGbs() { + return this.dbNodeStorageSizeInGbs; + } + + /** + * Set the dbNodeStorageSizeInGbs property: The local node storage to be allocated in GBs. + * + * @param dbNodeStorageSizeInGbs the dbNodeStorageSizeInGbs value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withDbNodeStorageSizeInGbs(Integer dbNodeStorageSizeInGbs) { + this.dbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + return this; + } + + /** + * Get the memorySizeInGbs property: The memory to be allocated in GBs. + * + * @return the memorySizeInGbs value. + */ + public Integer memorySizeInGbs() { + return this.memorySizeInGbs; + } + + /** + * Set the memorySizeInGbs property: The memory to be allocated in GBs. + * + * @param memorySizeInGbs the memorySizeInGbs value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withMemorySizeInGbs(Integer memorySizeInGbs) { + this.memorySizeInGbs = memorySizeInGbs; + return this; + } + + /** + * Get the cpuCoreCount property: The number of CPU cores enabled on the cloud VM cluster. + * + * @return the cpuCoreCount value. + */ + public Integer cpuCoreCount() { + return this.cpuCoreCount; + } + + /** + * Set the cpuCoreCount property: The number of CPU cores enabled on the cloud VM cluster. + * + * @param cpuCoreCount the cpuCoreCount value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withCpuCoreCount(Integer cpuCoreCount) { + this.cpuCoreCount = cpuCoreCount; + return this; + } + + /** + * Get the ocpuCount property: The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is + * allowed for the fractional part. + * + * @return the ocpuCount value. + */ + public Float ocpuCount() { + return this.ocpuCount; + } + + /** + * Set the ocpuCount property: The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is + * allowed for the fractional part. + * + * @param ocpuCount the ocpuCount value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withOcpuCount(Float ocpuCount) { + this.ocpuCount = ocpuCount; + return this; + } + + /** + * Get the sshPublicKeys property: The public key portion of one or more key pairs used for SSH access to the cloud + * VM cluster. + * + * @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 cloud + * VM cluster. + * + * @param sshPublicKeys the sshPublicKeys value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withSshPublicKeys(List sshPublicKeys) { + this.sshPublicKeys = sshPublicKeys; + return this; + } + + /** + * Get the licenseModel property: The Oracle license model that applies to the cloud VM cluster. 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 cloud VM cluster. The default is + * LICENSE_INCLUDED. + * + * @param licenseModel the licenseModel value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withLicenseModel(LicenseModel licenseModel) { + this.licenseModel = licenseModel; + 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 CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties 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 CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the computeNodes property: The list of compute servers to be added to the cloud VM cluster. + * + * @return the computeNodes value. + */ + public List computeNodes() { + return this.computeNodes; + } + + /** + * Set the computeNodes property: The list of compute servers to be added to the cloud VM cluster. + * + * @param computeNodes the computeNodes value to set. + * @return the CloudVmClusterUpdateProperties object itself. + */ + public CloudVmClusterUpdateProperties withComputeNodes(List computeNodes) { + this.computeNodes = computeNodes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataCollectionOptions() != null) { + dataCollectionOptions().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusters.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusters.java new file mode 100644 index 000000000000..e8b3d77f4f01 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CloudVmClusters.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** + * Resource collection API of CloudVmClusters. + */ +public interface CloudVmClusters { + /** + * List CloudVmCluster 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 CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List CloudVmCluster 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 CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List CloudVmCluster resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a CloudVmCluster list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String cloudvmclustername, + Context context); + + /** + * Get a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a CloudVmCluster. + */ + CloudVmCluster getByResourceGroup(String resourceGroupName, String cloudvmclustername); + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 cloudvmclustername); + + /** + * Delete a CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String cloudvmclustername, Context context); + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + CloudVmCluster addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); + + /** + * Add VMs to the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + CloudVmCluster addVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, Context context); + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties along with {@link Response}. + */ + Response> listPrivateIpAddressesWithResponse(String resourceGroupName, + String cloudvmclustername, PrivateIpAddressesFilter body, Context context); + + /** + * List Private IP Addresses by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of PrivateIpAddressProperties. + */ + List listPrivateIpAddresses(String resourceGroupName, String cloudvmclustername, + PrivateIpAddressesFilter body); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body); + + /** + * Remove VMs from the VM Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloudVmCluster resource definition. + */ + CloudVmCluster removeVms(String resourceGroupName, String cloudvmclustername, AddRemoveDbNode body, + Context context); + + /** + * Get a CloudVmCluster. + * + * @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 CloudVmCluster along with {@link Response}. + */ + CloudVmCluster getById(String id); + + /** + * Get a CloudVmCluster. + * + * @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 CloudVmCluster along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a CloudVmCluster. + * + * @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 CloudVmCluster. + * + * @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 CloudVmCluster resource. + * + * @param name resource name. + * @return the first stage of the new CloudVmCluster definition. + */ + CloudVmCluster.DefinitionStages.Blank define(String name); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ComputeModel.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ComputeModel.java new file mode 100644 index 000000000000..846431ff12ac --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ComputeModel.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * ComputeModel enum. + */ +public final class ComputeModel extends ExpandableStringEnum { + /** + * Static value ECPU for ComputeModel. + */ + public static final ComputeModel ECPU = fromString("ECPU"); + + /** + * Static value OCPU for ComputeModel. + */ + public static final ComputeModel OCPU = fromString("OCPU"); + + /** + * Creates a new instance of ComputeModel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ComputeModel() { + } + + /** + * Creates or finds a ComputeModel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ComputeModel. + */ + @JsonCreator + public static ComputeModel fromString(String name) { + return fromString(name, ComputeModel.class); + } + + /** + * Gets known ComputeModel values. + * + * @return known ComputeModel values. + */ + public static Collection values() { + return values(ComputeModel.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConnectionStringType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConnectionStringType.java new file mode 100644 index 000000000000..f571d7549e0e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConnectionStringType.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Connection strings to connect to an Oracle Autonomous Database. + */ +@Fluent +public final class ConnectionStringType { + /* + * Returns all connection strings that can be used to connect to the Autonomous Database. + */ + @JsonProperty(value = "allConnectionStrings") + private AllConnectionStringType allConnectionStrings; + + /* + * The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + */ + @JsonProperty(value = "dedicated") + private String dedicated; + + /* + * The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + */ + @JsonProperty(value = "high") + private String high; + + /* + * The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + */ + @JsonProperty(value = "low") + private String low; + + /* + * The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + */ + @JsonProperty(value = "medium") + private String medium; + + /* + * A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata. + */ + @JsonProperty(value = "profiles") + private List profiles; + + /** + * Creates an instance of ConnectionStringType class. + */ + public ConnectionStringType() { + } + + /** + * Get the allConnectionStrings property: Returns all connection strings that can be used to connect to the + * Autonomous Database. + * + * @return the allConnectionStrings value. + */ + public AllConnectionStringType allConnectionStrings() { + return this.allConnectionStrings; + } + + /** + * Set the allConnectionStrings property: Returns all connection strings that can be used to connect to the + * Autonomous Database. + * + * @param allConnectionStrings the allConnectionStrings value to set. + * @return the ConnectionStringType object itself. + */ + public ConnectionStringType withAllConnectionStrings(AllConnectionStringType allConnectionStrings) { + this.allConnectionStrings = allConnectionStrings; + return this; + } + + /** + * Get the dedicated property: The database service provides the least level of resources to each SQL statement, but + * supports the most number of concurrent SQL statements. + * + * @return the dedicated value. + */ + public String dedicated() { + return this.dedicated; + } + + /** + * Set the dedicated property: The database service provides the least level of resources to each SQL statement, but + * supports the most number of concurrent SQL statements. + * + * @param dedicated the dedicated value to set. + * @return the ConnectionStringType object itself. + */ + public ConnectionStringType withDedicated(String dedicated) { + this.dedicated = dedicated; + return this; + } + + /** + * Get the high property: The High database service provides the highest level of resources to each SQL statement + * resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + * + * @return the high value. + */ + public String high() { + return this.high; + } + + /** + * Set the high property: The High database service provides the highest level of resources to each SQL statement + * resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + * + * @param high the high value to set. + * @return the ConnectionStringType object itself. + */ + public ConnectionStringType withHigh(String high) { + this.high = high; + return this; + } + + /** + * Get the low property: The Low database service provides the least level of resources to each SQL statement, but + * supports the most number of concurrent SQL statements. + * + * @return the low value. + */ + public String low() { + return this.low; + } + + /** + * Set the low property: The Low database service provides the least level of resources to each SQL statement, but + * supports the most number of concurrent SQL statements. + * + * @param low the low value to set. + * @return the ConnectionStringType object itself. + */ + public ConnectionStringType withLow(String low) { + this.low = low; + return this; + } + + /** + * Get the medium property: The Medium database service provides a lower level of resources to each SQL statement + * potentially resulting a lower level of performance, but supports more concurrent SQL statements. + * + * @return the medium value. + */ + public String medium() { + return this.medium; + } + + /** + * Set the medium property: The Medium database service provides a lower level of resources to each SQL statement + * potentially resulting a lower level of performance, but supports more concurrent SQL statements. + * + * @param medium the medium value to set. + * @return the ConnectionStringType object itself. + */ + public ConnectionStringType withMedium(String medium) { + this.medium = medium; + return this; + } + + /** + * Get the profiles property: A list of connection string profiles to allow clients to group, filter and select + * connection string values based on structured metadata. + * + * @return the profiles value. + */ + public List profiles() { + return this.profiles; + } + + /** + * Set the profiles property: A list of connection string profiles to allow clients to group, filter and select + * connection string values based on structured metadata. + * + * @param profiles the profiles value to set. + * @return the ConnectionStringType object itself. + */ + public ConnectionStringType withProfiles(List profiles) { + this.profiles = profiles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (allConnectionStrings() != null) { + allConnectionStrings().validate(); + } + if (profiles() != null) { + profiles().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConnectionUrlType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConnectionUrlType.java new file mode 100644 index 000000000000..88b1a1bab84e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConnectionUrlType.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + * within your VCN or that has a direct connection to your VCN. + */ +@Fluent +public final class ConnectionUrlType { + /* + * Oracle Application Express (APEX) URL. + */ + @JsonProperty(value = "apexUrl") + private String apexUrl; + + /* + * The URL of the Database Transforms for the Autonomous Database. + */ + @JsonProperty(value = "databaseTransformsUrl") + private String databaseTransformsUrl; + + /* + * The URL of the Graph Studio for the Autonomous Database. + */ + @JsonProperty(value = "graphStudioUrl") + private String graphStudioUrl; + + /* + * The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + */ + @JsonProperty(value = "machineLearningNotebookUrl") + private String machineLearningNotebookUrl; + + /* + * The URL of the MongoDB API for the Autonomous Database. + */ + @JsonProperty(value = "mongoDbUrl") + private String mongoDbUrl; + + /* + * The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + */ + @JsonProperty(value = "ordsUrl") + private String ordsUrl; + + /* + * Oracle SQL Developer Web URL. + */ + @JsonProperty(value = "sqlDevWebUrl") + private String sqlDevWebUrl; + + /** + * Creates an instance of ConnectionUrlType class. + */ + public ConnectionUrlType() { + } + + /** + * Get the apexUrl property: Oracle Application Express (APEX) URL. + * + * @return the apexUrl value. + */ + public String apexUrl() { + return this.apexUrl; + } + + /** + * Set the apexUrl property: Oracle Application Express (APEX) URL. + * + * @param apexUrl the apexUrl value to set. + * @return the ConnectionUrlType object itself. + */ + public ConnectionUrlType withApexUrl(String apexUrl) { + this.apexUrl = apexUrl; + return this; + } + + /** + * Get the databaseTransformsUrl property: The URL of the Database Transforms for the Autonomous Database. + * + * @return the databaseTransformsUrl value. + */ + public String databaseTransformsUrl() { + return this.databaseTransformsUrl; + } + + /** + * Set the databaseTransformsUrl property: The URL of the Database Transforms for the Autonomous Database. + * + * @param databaseTransformsUrl the databaseTransformsUrl value to set. + * @return the ConnectionUrlType object itself. + */ + public ConnectionUrlType withDatabaseTransformsUrl(String databaseTransformsUrl) { + this.databaseTransformsUrl = databaseTransformsUrl; + return this; + } + + /** + * Get the graphStudioUrl property: The URL of the Graph Studio for the Autonomous Database. + * + * @return the graphStudioUrl value. + */ + public String graphStudioUrl() { + return this.graphStudioUrl; + } + + /** + * Set the graphStudioUrl property: The URL of the Graph Studio for the Autonomous Database. + * + * @param graphStudioUrl the graphStudioUrl value to set. + * @return the ConnectionUrlType object itself. + */ + public ConnectionUrlType withGraphStudioUrl(String graphStudioUrl) { + this.graphStudioUrl = graphStudioUrl; + return this; + } + + /** + * Get the machineLearningNotebookUrl property: The URL of the Oracle Machine Learning (OML) Notebook for the + * Autonomous Database. + * + * @return the machineLearningNotebookUrl value. + */ + public String machineLearningNotebookUrl() { + return this.machineLearningNotebookUrl; + } + + /** + * Set the machineLearningNotebookUrl property: The URL of the Oracle Machine Learning (OML) Notebook for the + * Autonomous Database. + * + * @param machineLearningNotebookUrl the machineLearningNotebookUrl value to set. + * @return the ConnectionUrlType object itself. + */ + public ConnectionUrlType withMachineLearningNotebookUrl(String machineLearningNotebookUrl) { + this.machineLearningNotebookUrl = machineLearningNotebookUrl; + return this; + } + + /** + * Get the mongoDbUrl property: The URL of the MongoDB API for the Autonomous Database. + * + * @return the mongoDbUrl value. + */ + public String mongoDbUrl() { + return this.mongoDbUrl; + } + + /** + * Set the mongoDbUrl property: The URL of the MongoDB API for the Autonomous Database. + * + * @param mongoDbUrl the mongoDbUrl value to set. + * @return the ConnectionUrlType object itself. + */ + public ConnectionUrlType withMongoDbUrl(String mongoDbUrl) { + this.mongoDbUrl = mongoDbUrl; + return this; + } + + /** + * Get the ordsUrl property: The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + * + * @return the ordsUrl value. + */ + public String ordsUrl() { + return this.ordsUrl; + } + + /** + * Set the ordsUrl property: The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + * + * @param ordsUrl the ordsUrl value to set. + * @return the ConnectionUrlType object itself. + */ + public ConnectionUrlType withOrdsUrl(String ordsUrl) { + this.ordsUrl = ordsUrl; + return this; + } + + /** + * Get the sqlDevWebUrl property: Oracle SQL Developer Web URL. + * + * @return the sqlDevWebUrl value. + */ + public String sqlDevWebUrl() { + return this.sqlDevWebUrl; + } + + /** + * Set the sqlDevWebUrl property: Oracle SQL Developer Web URL. + * + * @param sqlDevWebUrl the sqlDevWebUrl value to set. + * @return the ConnectionUrlType object itself. + */ + public ConnectionUrlType withSqlDevWebUrl(String sqlDevWebUrl) { + this.sqlDevWebUrl = sqlDevWebUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConsumerGroup.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConsumerGroup.java new file mode 100644 index 000000000000..f29bb8abac34 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ConsumerGroup.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * ConsumerGroup enum. + */ +public final class ConsumerGroup extends ExpandableStringEnum { + /** + * Static value High for ConsumerGroup. + */ + public static final ConsumerGroup HIGH = fromString("High"); + + /** + * Static value Medium for ConsumerGroup. + */ + public static final ConsumerGroup MEDIUM = fromString("Medium"); + + /** + * Static value Low for ConsumerGroup. + */ + public static final ConsumerGroup LOW = fromString("Low"); + + /** + * Static value Tp for ConsumerGroup. + */ + public static final ConsumerGroup TP = fromString("Tp"); + + /** + * Static value Tpurgent for ConsumerGroup. + */ + public static final ConsumerGroup TPURGENT = fromString("Tpurgent"); + + /** + * Creates a new instance of ConsumerGroup value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConsumerGroup() { + } + + /** + * Creates or finds a ConsumerGroup from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConsumerGroup. + */ + @JsonCreator + public static ConsumerGroup fromString(String name) { + return fromString(name, ConsumerGroup.class); + } + + /** + * Gets known ConsumerGroup values. + * + * @return known ConsumerGroup values. + */ + public static Collection values() { + return values(ConsumerGroup.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CustomerContact.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CustomerContact.java new file mode 100644 index 000000000000..0f5a76d30bf1 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/CustomerContact.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.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * CustomerContact resource properties. + */ +@Fluent +public final class CustomerContact { + /* + * The email address used by Oracle to send notifications regarding databases and infrastructure. + */ + @JsonProperty(value = "email", required = true) + private String email; + + /** + * Creates an instance of CustomerContact class. + */ + public CustomerContact() { + } + + /** + * Get the email property: The email address used by Oracle to send notifications regarding databases and + * infrastructure. + * + * @return the email value. + */ + public String email() { + return this.email; + } + + /** + * Set the email property: The email address used by Oracle to send notifications regarding databases and + * infrastructure. + * + * @param email the email value to set. + * @return the CustomerContact object itself. + */ + public CustomerContact withEmail(String email) { + this.email = email; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (email() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property email in model CustomerContact")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomerContact.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataBaseType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataBaseType.java new file mode 100644 index 000000000000..eda12142a307 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataBaseType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DataBaseType enum. + */ +public final class DataBaseType extends ExpandableStringEnum { + /** + * Static value Regular for DataBaseType. + */ + public static final DataBaseType REGULAR = fromString("Regular"); + + /** + * Static value Clone for DataBaseType. + */ + public static final DataBaseType CLONE = fromString("Clone"); + + /** + * Creates a new instance of DataBaseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataBaseType() { + } + + /** + * Creates or finds a DataBaseType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataBaseType. + */ + @JsonCreator + public static DataBaseType fromString(String name) { + return fromString(name, DataBaseType.class); + } + + /** + * Gets known DataBaseType values. + * + * @return known DataBaseType values. + */ + public static Collection values() { + return values(DataBaseType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataCollectionOptions.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataCollectionOptions.java new file mode 100644 index 000000000000..0bb35bb9c0eb --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataCollectionOptions.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.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DataCollectionOptions resource properties. + */ +@Fluent +public final class DataCollectionOptions { + /* + * Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + */ + @JsonProperty(value = "isDiagnosticsEventsEnabled") + private Boolean isDiagnosticsEventsEnabled; + + /* + * Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + */ + @JsonProperty(value = "isHealthMonitoringEnabled") + private Boolean isHealthMonitoringEnabled; + + /* + * Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + */ + @JsonProperty(value = "isIncidentLogsEnabled") + private Boolean isIncidentLogsEnabled; + + /** + * Creates an instance of DataCollectionOptions class. + */ + public DataCollectionOptions() { + } + + /** + * Get the isDiagnosticsEventsEnabled property: Indicates whether diagnostic collection is enabled for the VM + * cluster/Cloud VM cluster/VMBM DBCS. + * + * @return the isDiagnosticsEventsEnabled value. + */ + public Boolean isDiagnosticsEventsEnabled() { + return this.isDiagnosticsEventsEnabled; + } + + /** + * Set the isDiagnosticsEventsEnabled property: Indicates whether diagnostic collection is enabled for the VM + * cluster/Cloud VM cluster/VMBM DBCS. + * + * @param isDiagnosticsEventsEnabled the isDiagnosticsEventsEnabled value to set. + * @return the DataCollectionOptions object itself. + */ + public DataCollectionOptions withIsDiagnosticsEventsEnabled(Boolean isDiagnosticsEventsEnabled) { + this.isDiagnosticsEventsEnabled = isDiagnosticsEventsEnabled; + return this; + } + + /** + * Get the isHealthMonitoringEnabled property: Indicates whether health monitoring is enabled for the VM cluster / + * Cloud VM cluster / VMBM DBCS. + * + * @return the isHealthMonitoringEnabled value. + */ + public Boolean isHealthMonitoringEnabled() { + return this.isHealthMonitoringEnabled; + } + + /** + * Set the isHealthMonitoringEnabled property: Indicates whether health monitoring is enabled for the VM cluster / + * Cloud VM cluster / VMBM DBCS. + * + * @param isHealthMonitoringEnabled the isHealthMonitoringEnabled value to set. + * @return the DataCollectionOptions object itself. + */ + public DataCollectionOptions withIsHealthMonitoringEnabled(Boolean isHealthMonitoringEnabled) { + this.isHealthMonitoringEnabled = isHealthMonitoringEnabled; + return this; + } + + /** + * Get the isIncidentLogsEnabled property: Indicates whether incident logs and trace collection are enabled for the + * VM cluster / Cloud VM cluster / VMBM DBCS. + * + * @return the isIncidentLogsEnabled value. + */ + public Boolean isIncidentLogsEnabled() { + return this.isIncidentLogsEnabled; + } + + /** + * Set the isIncidentLogsEnabled property: Indicates whether incident logs and trace collection are enabled for the + * VM cluster / Cloud VM cluster / VMBM DBCS. + * + * @param isIncidentLogsEnabled the isIncidentLogsEnabled value to set. + * @return the DataCollectionOptions object itself. + */ + public DataCollectionOptions withIsIncidentLogsEnabled(Boolean isIncidentLogsEnabled) { + this.isIncidentLogsEnabled = isIncidentLogsEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataSafeStatusType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataSafeStatusType.java new file mode 100644 index 000000000000..0edec96ec745 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DataSafeStatusType.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DataSafeStatusType enum. + */ +public final class DataSafeStatusType extends ExpandableStringEnum { + /** + * Static value Registering for DataSafeStatusType. + */ + public static final DataSafeStatusType REGISTERING = fromString("Registering"); + + /** + * Static value Registered for DataSafeStatusType. + */ + public static final DataSafeStatusType REGISTERED = fromString("Registered"); + + /** + * Static value Deregistering for DataSafeStatusType. + */ + public static final DataSafeStatusType DEREGISTERING = fromString("Deregistering"); + + /** + * Static value NotRegistered for DataSafeStatusType. + */ + public static final DataSafeStatusType NOT_REGISTERED = fromString("NotRegistered"); + + /** + * Static value Failed for DataSafeStatusType. + */ + public static final DataSafeStatusType FAILED = fromString("Failed"); + + /** + * Creates a new instance of DataSafeStatusType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataSafeStatusType() { + } + + /** + * Creates or finds a DataSafeStatusType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataSafeStatusType. + */ + @JsonCreator + public static DataSafeStatusType fromString(String name) { + return fromString(name, DataSafeStatusType.class); + } + + /** + * Gets known DataSafeStatusType values. + * + * @return known DataSafeStatusType values. + */ + public static Collection values() { + return values(DataSafeStatusType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DatabaseEditionType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DatabaseEditionType.java new file mode 100644 index 000000000000..8167009000c2 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DatabaseEditionType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DatabaseEditionType enum. + */ +public final class DatabaseEditionType extends ExpandableStringEnum { + /** + * Static value StandardEdition for DatabaseEditionType. + */ + public static final DatabaseEditionType STANDARD_EDITION = fromString("StandardEdition"); + + /** + * Static value EnterpriseEdition for DatabaseEditionType. + */ + public static final DatabaseEditionType ENTERPRISE_EDITION = fromString("EnterpriseEdition"); + + /** + * Creates a new instance of DatabaseEditionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DatabaseEditionType() { + } + + /** + * Creates or finds a DatabaseEditionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DatabaseEditionType. + */ + @JsonCreator + public static DatabaseEditionType fromString(String name) { + return fromString(name, DatabaseEditionType.class); + } + + /** + * Gets known DatabaseEditionType values. + * + * @return known DatabaseEditionType values. + */ + public static Collection values() { + return values(DatabaseEditionType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeek.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeek.java new file mode 100644 index 000000000000..4bf565bfd23c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeek.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DayOfWeek resource properties. + */ +@Fluent +public final class DayOfWeek { + /* + * Name of the day of the week. + */ + @JsonProperty(value = "name", required = true) + private DayOfWeekName name; + + /** + * Creates an instance of DayOfWeek class. + */ + public DayOfWeek() { + } + + /** + * Get the name property: Name of the day of the week. + * + * @return the name value. + */ + public DayOfWeekName name() { + return this.name; + } + + /** + * Set the name property: Name of the day of the week. + * + * @param name the name value to set. + * @return the DayOfWeek object itself. + */ + public DayOfWeek withName(DayOfWeekName name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model DayOfWeek")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DayOfWeek.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeekName.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeekName.java new file mode 100644 index 000000000000..9bb650491c25 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeekName.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DayOfWeekName enum. + */ +public final class DayOfWeekName extends ExpandableStringEnum { + /** + * Static value Monday for DayOfWeekName. + */ + public static final DayOfWeekName MONDAY = fromString("Monday"); + + /** + * Static value Tuesday for DayOfWeekName. + */ + public static final DayOfWeekName TUESDAY = fromString("Tuesday"); + + /** + * Static value Wednesday for DayOfWeekName. + */ + public static final DayOfWeekName WEDNESDAY = fromString("Wednesday"); + + /** + * Static value Thursday for DayOfWeekName. + */ + public static final DayOfWeekName THURSDAY = fromString("Thursday"); + + /** + * Static value Friday for DayOfWeekName. + */ + public static final DayOfWeekName FRIDAY = fromString("Friday"); + + /** + * Static value Saturday for DayOfWeekName. + */ + public static final DayOfWeekName SATURDAY = fromString("Saturday"); + + /** + * Static value Sunday for DayOfWeekName. + */ + public static final DayOfWeekName SUNDAY = fromString("Sunday"); + + /** + * Creates a new instance of DayOfWeekName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DayOfWeekName() { + } + + /** + * Creates or finds a DayOfWeekName from its string representation. + * + * @param name a name to look for. + * @return the corresponding DayOfWeekName. + */ + @JsonCreator + public static DayOfWeekName fromString(String name) { + return fromString(name, DayOfWeekName.class); + } + + /** + * Gets known DayOfWeekName values. + * + * @return known DayOfWeekName values. + */ + public static Collection values() { + return values(DayOfWeekName.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeekUpdate.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeekUpdate.java new file mode 100644 index 000000000000..4ef9771e1cc0 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DayOfWeekUpdate.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DayOfWeek resource properties. + */ +@Fluent +public final class DayOfWeekUpdate { + /* + * Name of the day of the week. + */ + @JsonProperty(value = "name") + private DayOfWeekName name; + + /** + * Creates an instance of DayOfWeekUpdate class. + */ + public DayOfWeekUpdate() { + } + + /** + * Get the name property: Name of the day of the week. + * + * @return the name value. + */ + public DayOfWeekName name() { + return this.name; + } + + /** + * Set the name property: Name of the day of the week. + * + * @param name the name value to set. + * @return the DayOfWeekUpdate object itself. + */ + public DayOfWeekUpdate withName(DayOfWeekName name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbIormConfig.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbIormConfig.java new file mode 100644 index 000000000000..f1625fc25d59 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbIormConfig.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DbIormConfig for cloud vm cluster. + */ +@Fluent +public final class DbIormConfig { + /* + * The database name. For the default DbPlan, the dbName is default. + */ + @JsonProperty(value = "dbName") + private String dbName; + + /* + * The flash cache limit for this database. This value is internally configured based on the share value assigned to the database. + */ + @JsonProperty(value = "flashCacheLimit") + private String flashCacheLimit; + + /* + * The relative priority of this database. + */ + @JsonProperty(value = "share") + private Integer share; + + /** + * Creates an instance of DbIormConfig class. + */ + public DbIormConfig() { + } + + /** + * Get the dbName property: The database name. For the default DbPlan, the dbName is default. + * + * @return the dbName value. + */ + public String dbName() { + return this.dbName; + } + + /** + * Set the dbName property: The database name. For the default DbPlan, the dbName is default. + * + * @param dbName the dbName value to set. + * @return the DbIormConfig object itself. + */ + public DbIormConfig withDbName(String dbName) { + this.dbName = dbName; + return this; + } + + /** + * Get the flashCacheLimit property: The flash cache limit for this database. This value is internally configured + * based on the share value assigned to the database. + * + * @return the flashCacheLimit value. + */ + public String flashCacheLimit() { + return this.flashCacheLimit; + } + + /** + * Set the flashCacheLimit property: The flash cache limit for this database. This value is internally configured + * based on the share value assigned to the database. + * + * @param flashCacheLimit the flashCacheLimit value to set. + * @return the DbIormConfig object itself. + */ + public DbIormConfig withFlashCacheLimit(String flashCacheLimit) { + this.flashCacheLimit = flashCacheLimit; + return this; + } + + /** + * Get the share property: The relative priority of this database. + * + * @return the share value. + */ + public Integer share() { + return this.share; + } + + /** + * Set the share property: The relative priority of this database. + * + * @param share the share value to set. + * @return the DbIormConfig object itself. + */ + public DbIormConfig withShare(Integer share) { + this.share = share; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNode.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNode.java new file mode 100644 index 000000000000..4ff9c760992c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNode.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DbNodeInner; + +/** + * An immutable client-side representation of DbNode. + */ +public interface DbNode { + /** + * 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. + */ + DbNodeProperties 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.oracle.fluent.models.DbNodeInner object. + * + * @return the inner object. + */ + DbNodeInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeAction.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeAction.java new file mode 100644 index 000000000000..1ad36b182956 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeAction.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DbNode action object. + */ +@Fluent +public final class DbNodeAction { + /* + * Db action + */ + @JsonProperty(value = "action", required = true) + private DbNodeActionEnum action; + + /** + * Creates an instance of DbNodeAction class. + */ + public DbNodeAction() { + } + + /** + * Get the action property: Db action. + * + * @return the action value. + */ + public DbNodeActionEnum action() { + return this.action; + } + + /** + * Set the action property: Db action. + * + * @param action the action value to set. + * @return the DbNodeAction object itself. + */ + public DbNodeAction withAction(DbNodeActionEnum action) { + this.action = action; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (action() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property action in model DbNodeAction")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DbNodeAction.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeActionEnum.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeActionEnum.java new file mode 100644 index 000000000000..e336c688fcd6 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeActionEnum.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.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DbNode action enum. + */ +public final class DbNodeActionEnum extends ExpandableStringEnum { + /** + * Static value Start for DbNodeActionEnum. + */ + public static final DbNodeActionEnum START = fromString("Start"); + + /** + * Static value Stop for DbNodeActionEnum. + */ + public static final DbNodeActionEnum STOP = fromString("Stop"); + + /** + * Static value SoftReset for DbNodeActionEnum. + */ + public static final DbNodeActionEnum SOFT_RESET = fromString("SoftReset"); + + /** + * Static value Reset for DbNodeActionEnum. + */ + public static final DbNodeActionEnum RESET = fromString("Reset"); + + /** + * Creates a new instance of DbNodeActionEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DbNodeActionEnum() { + } + + /** + * Creates or finds a DbNodeActionEnum from its string representation. + * + * @param name a name to look for. + * @return the corresponding DbNodeActionEnum. + */ + @JsonCreator + public static DbNodeActionEnum fromString(String name) { + return fromString(name, DbNodeActionEnum.class); + } + + /** + * Gets known DbNodeActionEnum values. + * + * @return known DbNodeActionEnum values. + */ + public static Collection values() { + return values(DbNodeActionEnum.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeListResult.java new file mode 100644 index 000000000000..6772b6be2404 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.DbNodeInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DbNode list operation. + */ +@Fluent +public final class DbNodeListResult { + /* + * The DbNode items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DbNodeListResult class. + */ + public DbNodeListResult() { + } + + /** + * Get the value property: The DbNode items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DbNode items on this page. + * + * @param value the value value to set. + * @return the DbNodeListResult object itself. + */ + public DbNodeListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 DbNodeListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DbNodeListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeMaintenanceType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeMaintenanceType.java new file mode 100644 index 000000000000..55f5d2abc5c5 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeMaintenanceType.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The type of database node maintenance. + */ +public final class DbNodeMaintenanceType extends ExpandableStringEnum { + /** + * Static value VmdbRebootMigration for DbNodeMaintenanceType. + */ + public static final DbNodeMaintenanceType VMDB_REBOOT_MIGRATION = fromString("VmdbRebootMigration"); + + /** + * Creates a new instance of DbNodeMaintenanceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DbNodeMaintenanceType() { + } + + /** + * Creates or finds a DbNodeMaintenanceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DbNodeMaintenanceType. + */ + @JsonCreator + public static DbNodeMaintenanceType fromString(String name) { + return fromString(name, DbNodeMaintenanceType.class); + } + + /** + * Gets known DbNodeMaintenanceType values. + * + * @return known DbNodeMaintenanceType values. + */ + public static Collection values() { + return values(DbNodeMaintenanceType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeProperties.java new file mode 100644 index 000000000000..f68e95b6ce18 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeProperties.java @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * The properties of DbNodeResource. + */ +@Immutable +public final class DbNodeProperties { + /* + * DbNode OCID + */ + @JsonProperty(value = "ocid", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * Additional information about the planned maintenance. + */ + @JsonProperty(value = "additionalDetails", access = JsonProperty.Access.WRITE_ONLY) + private String additionalDetails; + + /* + * The OCID of the backup IP address associated with the database node. + */ + @JsonProperty(value = "backupIpId", access = JsonProperty.Access.WRITE_ONLY) + private String backupIpId; + + /* + * The OCID of the second backup VNIC. + */ + @JsonProperty(value = "backupVnic2Id", access = JsonProperty.Access.WRITE_ONLY) + private String backupVnic2Id; + + /* + * The OCID of the backup VNIC. + */ + @JsonProperty(value = "backupVnicId", access = JsonProperty.Access.WRITE_ONLY) + private String backupVnicId; + + /* + * The number of CPU cores enabled on the Db node. + */ + @JsonProperty(value = "cpuCoreCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer cpuCoreCount; + + /* + * The allocated local node storage in GBs on the Db node. + */ + @JsonProperty(value = "dbNodeStorageSizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer dbNodeStorageSizeInGbs; + + /* + * The OCID of the Exacc Db server associated with the database node. + */ + @JsonProperty(value = "dbServerId", access = JsonProperty.Access.WRITE_ONLY) + private String dbServerId; + + /* + * The OCID of the DB system. + */ + @JsonProperty(value = "dbSystemId", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String dbSystemId; + + /* + * The name of the Fault Domain the instance is contained in. + */ + @JsonProperty(value = "faultDomain", access = JsonProperty.Access.WRITE_ONLY) + private String faultDomain; + + /* + * The OCID of the host IP address associated with the database node. + */ + @JsonProperty(value = "hostIpId", access = JsonProperty.Access.WRITE_ONLY) + private String hostIpId; + + /* + * The host name for the database node. + */ + @JsonProperty(value = "hostname", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; + + /* + * The current state of the database node. + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private DbNodeProvisioningState lifecycleState; + + /* + * Lifecycle details of Db Node. + */ + @JsonProperty(value = "lifecycleDetails", access = JsonProperty.Access.WRITE_ONLY) + private String lifecycleDetails; + + /* + * The type of database node maintenance. + */ + @JsonProperty(value = "maintenanceType", access = JsonProperty.Access.WRITE_ONLY) + private DbNodeMaintenanceType maintenanceType; + + /* + * The allocated memory in GBs on the Db node. + */ + @JsonProperty(value = "memorySizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + 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. + */ + @JsonProperty(value = "softwareStorageSizeInGb", access = JsonProperty.Access.WRITE_ONLY) + private Integer softwareStorageSizeInGb; + + /* + * The date and time that the database node was created. + */ + @JsonProperty(value = "timeCreated", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeCreated; + + /* + * End date and time of maintenance window. + */ + @JsonProperty(value = "timeMaintenanceWindowEnd", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeMaintenanceWindowEnd; + + /* + * Start date and time of maintenance window. + */ + @JsonProperty(value = "timeMaintenanceWindowStart", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeMaintenanceWindowStart; + + /* + * The OCID of the second VNIC. + */ + @JsonProperty(value = "vnic2Id", access = JsonProperty.Access.WRITE_ONLY) + private String vnic2Id; + + /* + * The OCID of the VNIC. + */ + @JsonProperty(value = "vnicId", access = JsonProperty.Access.WRITE_ONLY) + private String vnicId; + + /* + * Azure resource provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * Creates an instance of DbNodeProperties class. + */ + public DbNodeProperties() { + } + + /** + * Get the ocid property: DbNode OCID. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the additionalDetails property: Additional information about the planned maintenance. + * + * @return the additionalDetails value. + */ + public String additionalDetails() { + return this.additionalDetails; + } + + /** + * Get the backupIpId property: The OCID of the backup IP address associated with the database node. + * + * @return the backupIpId value. + */ + public String backupIpId() { + return this.backupIpId; + } + + /** + * Get the backupVnic2Id property: The OCID of the second backup VNIC. + * + * @return the backupVnic2Id value. + */ + public String backupVnic2Id() { + return this.backupVnic2Id; + } + + /** + * Get the backupVnicId property: The OCID of the backup VNIC. + * + * @return the backupVnicId value. + */ + public String backupVnicId() { + return this.backupVnicId; + } + + /** + * Get the cpuCoreCount property: The number of CPU cores enabled on the Db node. + * + * @return the cpuCoreCount value. + */ + public Integer cpuCoreCount() { + return this.cpuCoreCount; + } + + /** + * Get the dbNodeStorageSizeInGbs property: The allocated local node storage in GBs on the Db node. + * + * @return the dbNodeStorageSizeInGbs value. + */ + public Integer dbNodeStorageSizeInGbs() { + return this.dbNodeStorageSizeInGbs; + } + + /** + * Get the dbServerId property: The OCID of the Exacc Db server associated with the database node. + * + * @return the dbServerId value. + */ + public String dbServerId() { + return this.dbServerId; + } + + /** + * Get the dbSystemId property: The OCID of the DB system. + * + * @return the dbSystemId value. + */ + public String dbSystemId() { + return this.dbSystemId; + } + + /** + * Get the faultDomain property: The name of the Fault Domain the instance is contained in. + * + * @return the faultDomain value. + */ + public String faultDomain() { + return this.faultDomain; + } + + /** + * Get the hostIpId property: The OCID of the host IP address associated with the database node. + * + * @return the hostIpId value. + */ + public String hostIpId() { + return this.hostIpId; + } + + /** + * Get the hostname property: The host name for the database node. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Get the lifecycleState property: The current state of the database node. + * + * @return the lifecycleState value. + */ + public DbNodeProvisioningState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the lifecycleDetails property: Lifecycle details of Db Node. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Get the maintenanceType property: The type of database node maintenance. + * + * @return the maintenanceType value. + */ + public DbNodeMaintenanceType maintenanceType() { + return this.maintenanceType; + } + + /** + * Get the memorySizeInGbs property: The allocated memory in GBs on the Db node. + * + * @return the memorySizeInGbs value. + */ + public Integer memorySizeInGbs() { + return this.memorySizeInGbs; + } + + /** + * Get the softwareStorageSizeInGb property: The size (in GB) of the block storage volume allocation for the DB + * system. This attribute applies only for virtual machine DB systems. + * + * @return the softwareStorageSizeInGb value. + */ + public Integer softwareStorageSizeInGb() { + return this.softwareStorageSizeInGb; + } + + /** + * Get the timeCreated property: The date and time that the database node was created. + * + * @return the timeCreated value. + */ + public OffsetDateTime timeCreated() { + return this.timeCreated; + } + + /** + * Get the timeMaintenanceWindowEnd property: End date and time of maintenance window. + * + * @return the timeMaintenanceWindowEnd value. + */ + public OffsetDateTime timeMaintenanceWindowEnd() { + return this.timeMaintenanceWindowEnd; + } + + /** + * Get the timeMaintenanceWindowStart property: Start date and time of maintenance window. + * + * @return the timeMaintenanceWindowStart value. + */ + public OffsetDateTime timeMaintenanceWindowStart() { + return this.timeMaintenanceWindowStart; + } + + /** + * Get the vnic2Id property: The OCID of the second VNIC. + * + * @return the vnic2Id value. + */ + public String vnic2Id() { + return this.vnic2Id; + } + + /** + * Get the vnicId property: The OCID of the VNIC. + * + * @return the vnicId value. + */ + public String vnicId() { + return this.vnicId; + } + + /** + * Get the provisioningState property: Azure resource provisioning state. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeProvisioningState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeProvisioningState.java new file mode 100644 index 000000000000..c6719b549614 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodeProvisioningState.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DnNode provisioning state enum. + */ +public final class DbNodeProvisioningState extends ExpandableStringEnum { + /** + * Static value Provisioning for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Available for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState AVAILABLE = fromString("Available"); + + /** + * Static value Updating for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Stopping for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState STOPPING = fromString("Stopping"); + + /** + * Static value Stopped for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState STOPPED = fromString("Stopped"); + + /** + * Static value Starting for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState STARTING = fromString("Starting"); + + /** + * Static value Terminating for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState TERMINATING = fromString("Terminating"); + + /** + * Static value Terminated for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState TERMINATED = fromString("Terminated"); + + /** + * Static value Failed for DbNodeProvisioningState. + */ + public static final DbNodeProvisioningState FAILED = fromString("Failed"); + + /** + * Creates a new instance of DbNodeProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DbNodeProvisioningState() { + } + + /** + * Creates or finds a DbNodeProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DbNodeProvisioningState. + */ + @JsonCreator + public static DbNodeProvisioningState fromString(String name) { + return fromString(name, DbNodeProvisioningState.class); + } + + /** + * Gets known DbNodeProvisioningState values. + * + * @return known DbNodeProvisioningState values. + */ + public static Collection values() { + return values(DbNodeProvisioningState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodes.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodes.java new file mode 100644 index 000000000000..efdfc055e80f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbNodes.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 DbNodes. + */ +public interface DbNodes { + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + + /** + * List DbNode resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbNode list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, Context context); + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String cloudvmclustername, String dbnodeocid, + Context context); + + /** + * Get a DbNode. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbNode. + */ + DbNode get(String resourceGroupName, String cloudvmclustername, String dbnodeocid); + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster. + */ + DbNode action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body); + + /** + * VM actions on DbNode of VM Cluster by the provided filter. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param dbnodeocid DbNode OCID. + * @param body The content of the action request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the DbNode resource belonging to vmCluster. + */ + DbNode action(String resourceGroupName, String cloudvmclustername, String dbnodeocid, DbNodeAction body, + Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServer.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServer.java new file mode 100644 index 000000000000..9c866e0411f4 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServer.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DbServerInner; + +/** + * An immutable client-side representation of DbServer. + */ +public interface DbServer { + /** + * 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. + */ + DbServerProperties 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.oracle.fluent.models.DbServerInner object. + * + * @return the inner object. + */ + DbServerInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerListResult.java new file mode 100644 index 000000000000..fd0c54393a39 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.DbServerInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DbServer list operation. + */ +@Fluent +public final class DbServerListResult { + /* + * The DbServer items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DbServerListResult class. + */ + public DbServerListResult() { + } + + /** + * Get the value property: The DbServer items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DbServer items on this page. + * + * @param value the value value to set. + * @return the DbServerListResult object itself. + */ + public DbServerListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 DbServerListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DbServerListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerPatchingDetails.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerPatchingDetails.java new file mode 100644 index 000000000000..8fae164a6d24 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerPatchingDetails.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * DbServer Patching Properties. + */ +@Immutable +public final class DbServerPatchingDetails { + /* + * Estimated Patch Duration + */ + @JsonProperty(value = "estimatedPatchDuration", access = JsonProperty.Access.WRITE_ONLY) + private Integer estimatedPatchDuration; + + /* + * Patching Status + */ + @JsonProperty(value = "patchingStatus", access = JsonProperty.Access.WRITE_ONLY) + private DbServerPatchingStatus patchingStatus; + + /* + * Time Patching Ended + */ + @JsonProperty(value = "timePatchingEnded", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timePatchingEnded; + + /* + * Time Patching Started + */ + @JsonProperty(value = "timePatchingStarted", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timePatchingStarted; + + /** + * Creates an instance of DbServerPatchingDetails class. + */ + public DbServerPatchingDetails() { + } + + /** + * Get the estimatedPatchDuration property: Estimated Patch Duration. + * + * @return the estimatedPatchDuration value. + */ + public Integer estimatedPatchDuration() { + return this.estimatedPatchDuration; + } + + /** + * Get the patchingStatus property: Patching Status. + * + * @return the patchingStatus value. + */ + public DbServerPatchingStatus patchingStatus() { + return this.patchingStatus; + } + + /** + * Get the timePatchingEnded property: Time Patching Ended. + * + * @return the timePatchingEnded value. + */ + public OffsetDateTime timePatchingEnded() { + return this.timePatchingEnded; + } + + /** + * Get the timePatchingStarted property: Time Patching Started. + * + * @return the timePatchingStarted value. + */ + public OffsetDateTime timePatchingStarted() { + return this.timePatchingStarted; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerPatchingStatus.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerPatchingStatus.java new file mode 100644 index 000000000000..cff2ba03b806 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerPatchingStatus.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.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Db Server patching status enum. + */ +public final class DbServerPatchingStatus extends ExpandableStringEnum { + /** + * Static value Scheduled for DbServerPatchingStatus. + */ + public static final DbServerPatchingStatus SCHEDULED = fromString("Scheduled"); + + /** + * Static value MaintenanceInProgress for DbServerPatchingStatus. + */ + public static final DbServerPatchingStatus MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); + + /** + * Static value Failed for DbServerPatchingStatus. + */ + public static final DbServerPatchingStatus FAILED = fromString("Failed"); + + /** + * Static value Complete for DbServerPatchingStatus. + */ + public static final DbServerPatchingStatus COMPLETE = fromString("Complete"); + + /** + * Creates a new instance of DbServerPatchingStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DbServerPatchingStatus() { + } + + /** + * Creates or finds a DbServerPatchingStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DbServerPatchingStatus. + */ + @JsonCreator + public static DbServerPatchingStatus fromString(String name) { + return fromString(name, DbServerPatchingStatus.class); + } + + /** + * Gets known DbServerPatchingStatus values. + * + * @return known DbServerPatchingStatus values. + */ + public static Collection values() { + return values(DbServerPatchingStatus.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerProperties.java new file mode 100644 index 000000000000..87381716b583 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerProperties.java @@ -0,0 +1,336 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * DbServer resource properties. + */ +@Immutable +public final class DbServerProperties { + /* + * Db server name. + */ + @JsonProperty(value = "ocid", access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * The name for the Db Server. + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /* + * The OCID of the compartment. + */ + @JsonProperty(value = "compartmentId", access = JsonProperty.Access.WRITE_ONLY) + private String compartmentId; + + /* + * The OCID of the Exadata infrastructure. + */ + @JsonProperty(value = "exadataInfrastructureId", access = JsonProperty.Access.WRITE_ONLY) + private String exadataInfrastructureId; + + /* + * The number of CPU cores enabled on the Db server. + */ + @JsonProperty(value = "cpuCoreCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer cpuCoreCount; + + /* + * dbServerPatching details of the Db server. + */ + @JsonProperty(value = "dbServerPatchingDetails", access = JsonProperty.Access.WRITE_ONLY) + private DbServerPatchingDetails dbServerPatchingDetails; + + /* + * The total memory available in GBs. + */ + @JsonProperty(value = "maxMemoryInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxMemoryInGbs; + + /* + * The allocated local node storage in GBs on the Db server. + */ + @JsonProperty(value = "dbNodeStorageSizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer dbNodeStorageSizeInGbs; + + /* + * The OCID of the VM Clusters associated with the Db server. + */ + @JsonProperty(value = "vmClusterIds", access = JsonProperty.Access.WRITE_ONLY) + private List vmClusterIds; + + /* + * The OCID of the Db nodes associated with the Db server. + */ + @JsonProperty(value = "dbNodeIds", access = JsonProperty.Access.WRITE_ONLY) + private List dbNodeIds; + + /* + * Lifecycle details of dbServer. + */ + @JsonProperty(value = "lifecycleDetails", access = JsonProperty.Access.WRITE_ONLY) + private String lifecycleDetails; + + /* + * DbServer provisioning state. + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private DbServerProvisioningState lifecycleState; + + /* + * The total number of CPU cores available. + */ + @JsonProperty(value = "maxCpuCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxCpuCount; + + /* + * The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + */ + @JsonProperty(value = "autonomousVmClusterIds", access = JsonProperty.Access.WRITE_ONLY) + private List autonomousVmClusterIds; + + /* + * The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + */ + @JsonProperty(value = "autonomousVirtualMachineIds", access = JsonProperty.Access.WRITE_ONLY) + private List autonomousVirtualMachineIds; + + /* + * The total max dbNode storage in GBs. + */ + @JsonProperty(value = "maxDbNodeStorageInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxDbNodeStorageInGbs; + + /* + * The total memory size in GBs. + */ + @JsonProperty(value = "memorySizeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer memorySizeInGbs; + + /* + * The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + */ + @JsonProperty(value = "shape", access = JsonProperty.Access.WRITE_ONLY) + private String shape; + + /* + * The date and time that the Db Server was created. + */ + @JsonProperty(value = "timeCreated", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeCreated; + + /* + * Azure resource provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * Creates an instance of DbServerProperties class. + */ + public DbServerProperties() { + } + + /** + * Get the ocid property: Db server name. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the displayName property: The name for the Db Server. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the compartmentId property: The OCID of the compartment. + * + * @return the compartmentId value. + */ + public String compartmentId() { + return this.compartmentId; + } + + /** + * Get the exadataInfrastructureId property: The OCID of the Exadata infrastructure. + * + * @return the exadataInfrastructureId value. + */ + public String exadataInfrastructureId() { + return this.exadataInfrastructureId; + } + + /** + * Get the cpuCoreCount property: The number of CPU cores enabled on the Db server. + * + * @return the cpuCoreCount value. + */ + public Integer cpuCoreCount() { + return this.cpuCoreCount; + } + + /** + * Get the dbServerPatchingDetails property: dbServerPatching details of the Db server. + * + * @return the dbServerPatchingDetails value. + */ + public DbServerPatchingDetails dbServerPatchingDetails() { + return this.dbServerPatchingDetails; + } + + /** + * Get the maxMemoryInGbs property: The total memory available in GBs. + * + * @return the maxMemoryInGbs value. + */ + public Integer maxMemoryInGbs() { + return this.maxMemoryInGbs; + } + + /** + * Get the dbNodeStorageSizeInGbs property: The allocated local node storage in GBs on the Db server. + * + * @return the dbNodeStorageSizeInGbs value. + */ + public Integer dbNodeStorageSizeInGbs() { + return this.dbNodeStorageSizeInGbs; + } + + /** + * Get the vmClusterIds property: The OCID of the VM Clusters associated with the Db server. + * + * @return the vmClusterIds value. + */ + public List vmClusterIds() { + return this.vmClusterIds; + } + + /** + * Get the dbNodeIds property: The OCID of the Db nodes associated with the Db server. + * + * @return the dbNodeIds value. + */ + public List dbNodeIds() { + return this.dbNodeIds; + } + + /** + * Get the lifecycleDetails property: Lifecycle details of dbServer. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Get the lifecycleState property: DbServer provisioning state. + * + * @return the lifecycleState value. + */ + public DbServerProvisioningState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the maxCpuCount property: The total number of CPU cores available. + * + * @return the maxCpuCount value. + */ + public Integer maxCpuCount() { + return this.maxCpuCount; + } + + /** + * Get the autonomousVmClusterIds property: The list of OCIDs of the Autonomous VM Clusters associated with the Db + * server. + * + * @return the autonomousVmClusterIds value. + */ + public List autonomousVmClusterIds() { + return this.autonomousVmClusterIds; + } + + /** + * Get the autonomousVirtualMachineIds property: The list of OCIDs of the Autonomous Virtual Machines associated + * with the Db server. + * + * @return the autonomousVirtualMachineIds value. + */ + public List autonomousVirtualMachineIds() { + return this.autonomousVirtualMachineIds; + } + + /** + * Get the maxDbNodeStorageInGbs property: The total max dbNode storage in GBs. + * + * @return the maxDbNodeStorageInGbs value. + */ + public Integer maxDbNodeStorageInGbs() { + return this.maxDbNodeStorageInGbs; + } + + /** + * Get the memorySizeInGbs property: The total memory size in GBs. + * + * @return the memorySizeInGbs value. + */ + public Integer memorySizeInGbs() { + return this.memorySizeInGbs; + } + + /** + * Get the shape property: The shape of the Db server. The shape determines the amount of CPU, storage, and memory + * resources available. + * + * @return the shape value. + */ + public String shape() { + return this.shape; + } + + /** + * Get the timeCreated property: The date and time that the Db Server was created. + * + * @return the timeCreated value. + */ + public OffsetDateTime timeCreated() { + return this.timeCreated; + } + + /** + * Get the provisioningState property: Azure resource provisioning state. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dbServerPatchingDetails() != null) { + dbServerPatchingDetails().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerProvisioningState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerProvisioningState.java new file mode 100644 index 000000000000..847d54b6403d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServerProvisioningState.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DbServerProvisioningState enum. + */ +public final class DbServerProvisioningState extends ExpandableStringEnum { + /** + * Static value Creating for DbServerProvisioningState. + */ + public static final DbServerProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Available for DbServerProvisioningState. + */ + public static final DbServerProvisioningState AVAILABLE = fromString("Available"); + + /** + * Static value Unavailable for DbServerProvisioningState. + */ + public static final DbServerProvisioningState UNAVAILABLE = fromString("Unavailable"); + + /** + * Static value Deleting for DbServerProvisioningState. + */ + public static final DbServerProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Deleted for DbServerProvisioningState. + */ + public static final DbServerProvisioningState DELETED = fromString("Deleted"); + + /** + * Static value MaintenanceInProgress for DbServerProvisioningState. + */ + public static final DbServerProvisioningState MAINTENANCE_IN_PROGRESS = fromString("MaintenanceInProgress"); + + /** + * Creates a new instance of DbServerProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DbServerProvisioningState() { + } + + /** + * Creates or finds a DbServerProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DbServerProvisioningState. + */ + @JsonCreator + public static DbServerProvisioningState fromString(String name) { + return fromString(name, DbServerProvisioningState.class); + } + + /** + * Gets known DbServerProvisioningState values. + * + * @return known DbServerProvisioningState values. + */ + public static Collection values() { + return values(DbServerProvisioningState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServers.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServers.java new file mode 100644 index 000000000000..8bcb7e88e644 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbServers.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 DbServers. + */ +public interface DbServers { + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename); + + /** + * List DbServer resources by CloudExadataInfrastructure. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DbServer list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCloudExadataInfrastructure(String resourceGroupName, + String cloudexadatainfrastructurename, Context context); + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String cloudexadatainfrastructurename, + String dbserverocid, Context context); + + /** + * Get a DbServer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudexadatainfrastructurename CloudExadataInfrastructure name. + * @param dbserverocid DbServer OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbServer. + */ + DbServer get(String resourceGroupName, String cloudexadatainfrastructurename, String dbserverocid); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShape.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShape.java new file mode 100644 index 000000000000..57c79723c58e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShape.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DbSystemShapeInner; + +/** + * An immutable client-side representation of DbSystemShape. + */ +public interface DbSystemShape { + /** + * 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. + */ + DbSystemShapeProperties 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.oracle.fluent.models.DbSystemShapeInner object. + * + * @return the inner object. + */ + DbSystemShapeInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapeListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapeListResult.java new file mode 100644 index 000000000000..32b8d4cbc780 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapeListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.DbSystemShapeInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DbSystemShape list operation. + */ +@Fluent +public final class DbSystemShapeListResult { + /* + * The DbSystemShape items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DbSystemShapeListResult class. + */ + public DbSystemShapeListResult() { + } + + /** + * Get the value property: The DbSystemShape items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DbSystemShape items on this page. + * + * @param value the value value to set. + * @return the DbSystemShapeListResult object itself. + */ + public DbSystemShapeListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 DbSystemShapeListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DbSystemShapeListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapeProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapeProperties.java new file mode 100644 index 000000000000..894c0b2e764f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapeProperties.java @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * DbSystemShape resource model. + */ +@Immutable +public final class DbSystemShapeProperties { + /* + * The family of the shape used for the DB system. + */ + @JsonProperty(value = "shapeFamily", access = JsonProperty.Access.WRITE_ONLY) + private String shapeFamily; + + /* + * The maximum number of CPU cores that can be enabled on the DB system for this shape. + */ + @JsonProperty(value = "availableCoreCount", required = true, access = JsonProperty.Access.WRITE_ONLY) + private int availableCoreCount; + + /* + * The minimum number of CPU cores that can be enabled on the DB system for this shape. + */ + @JsonProperty(value = "minimumCoreCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer minimumCoreCount; + + /* + * The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + */ + @JsonProperty(value = "runtimeMinimumCoreCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer runtimeMinimumCoreCount; + + /* + * The discrete number by which the CPU core count for this shape can be increased or decreased. + */ + @JsonProperty(value = "coreCountIncrement", access = JsonProperty.Access.WRITE_ONLY) + private Integer coreCountIncrement; + + /* + * The minimum number of Exadata storage servers available for the Exadata infrastructure. + */ + @JsonProperty(value = "minStorageCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer minStorageCount; + + /* + * The maximum number of Exadata storage servers available for the Exadata infrastructure. + */ + @JsonProperty(value = "maxStorageCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxStorageCount; + + /* + * The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + */ + @JsonProperty(value = "availableDataStoragePerServerInTbs", access = JsonProperty.Access.WRITE_ONLY) + private Double availableDataStoragePerServerInTbs; + + /* + * The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + */ + @JsonProperty(value = "availableMemoryPerNodeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer availableMemoryPerNodeInGbs; + + /* + * The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + */ + @JsonProperty(value = "availableDbNodePerNodeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer availableDbNodePerNodeInGbs; + + /* + * The minimum number of CPU cores that can be enabled per node for this shape. + */ + @JsonProperty(value = "minCoreCountPerNode", access = JsonProperty.Access.WRITE_ONLY) + private Integer minCoreCountPerNode; + + /* + * The maximum memory that can be enabled for this shape. + */ + @JsonProperty(value = "availableMemoryInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer availableMemoryInGbs; + + /* + * The minimum memory that need be allocated per node for this shape. + */ + @JsonProperty(value = "minMemoryPerNodeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer minMemoryPerNodeInGbs; + + /* + * The maximum Db Node storage that can be enabled for this shape. + */ + @JsonProperty(value = "availableDbNodeStorageInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer availableDbNodeStorageInGbs; + + /* + * The minimum Db Node storage that need be allocated per node for this shape. + */ + @JsonProperty(value = "minDbNodeStoragePerNodeInGbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer minDbNodeStoragePerNodeInGbs; + + /* + * The maximum DATA storage that can be enabled for this shape. + */ + @JsonProperty(value = "availableDataStorageInTbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer availableDataStorageInTbs; + + /* + * The minimum data storage that need be allocated for this shape. + */ + @JsonProperty(value = "minDataStorageInTbs", access = JsonProperty.Access.WRITE_ONLY) + private Integer minDataStorageInTbs; + + /* + * The minimum number of database nodes available for this shape. + */ + @JsonProperty(value = "minimumNodeCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer minimumNodeCount; + + /* + * The maximum number of database nodes available for this shape. + */ + @JsonProperty(value = "maximumNodeCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNodeCount; + + /* + * The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. + */ + @JsonProperty(value = "availableCoreCountPerNode", access = JsonProperty.Access.WRITE_ONLY) + private Integer availableCoreCountPerNode; + + /** + * Creates an instance of DbSystemShapeProperties class. + */ + public DbSystemShapeProperties() { + } + + /** + * Get the shapeFamily property: The family of the shape used for the DB system. + * + * @return the shapeFamily value. + */ + public String shapeFamily() { + return this.shapeFamily; + } + + /** + * Get the availableCoreCount property: The maximum number of CPU cores that can be enabled on the DB system for + * this shape. + * + * @return the availableCoreCount value. + */ + public int availableCoreCount() { + return this.availableCoreCount; + } + + /** + * Get the minimumCoreCount property: The minimum number of CPU cores that can be enabled on the DB system for this + * shape. + * + * @return the minimumCoreCount value. + */ + public Integer minimumCoreCount() { + return this.minimumCoreCount; + } + + /** + * Get the runtimeMinimumCoreCount property: The runtime minimum number of CPU cores that can be enabled on the DB + * system for this shape. + * + * @return the runtimeMinimumCoreCount value. + */ + public Integer runtimeMinimumCoreCount() { + return this.runtimeMinimumCoreCount; + } + + /** + * Get the coreCountIncrement property: The discrete number by which the CPU core count for this shape can be + * increased or decreased. + * + * @return the coreCountIncrement value. + */ + public Integer coreCountIncrement() { + return this.coreCountIncrement; + } + + /** + * Get the minStorageCount property: The minimum number of Exadata storage servers available for the Exadata + * infrastructure. + * + * @return the minStorageCount value. + */ + public Integer minStorageCount() { + return this.minStorageCount; + } + + /** + * Get the maxStorageCount property: The maximum number of Exadata storage servers available for the Exadata + * infrastructure. + * + * @return the maxStorageCount value. + */ + public Integer maxStorageCount() { + return this.maxStorageCount; + } + + /** + * Get the availableDataStoragePerServerInTbs property: The maximum data storage available per storage server for + * this shape. Only applicable to ExaCC Elastic shapes. + * + * @return the availableDataStoragePerServerInTbs value. + */ + public Double availableDataStoragePerServerInTbs() { + return this.availableDataStoragePerServerInTbs; + } + + /** + * Get the availableMemoryPerNodeInGbs property: The maximum memory available per database node for this shape. Only + * applicable to ExaCC Elastic shapes. + * + * @return the availableMemoryPerNodeInGbs value. + */ + public Integer availableMemoryPerNodeInGbs() { + return this.availableMemoryPerNodeInGbs; + } + + /** + * Get the availableDbNodePerNodeInGbs property: The maximum Db Node storage available per database node for this + * shape. Only applicable to ExaCC Elastic shapes. + * + * @return the availableDbNodePerNodeInGbs value. + */ + public Integer availableDbNodePerNodeInGbs() { + return this.availableDbNodePerNodeInGbs; + } + + /** + * Get the minCoreCountPerNode property: The minimum number of CPU cores that can be enabled per node for this + * shape. + * + * @return the minCoreCountPerNode value. + */ + public Integer minCoreCountPerNode() { + return this.minCoreCountPerNode; + } + + /** + * Get the availableMemoryInGbs property: The maximum memory that can be enabled for this shape. + * + * @return the availableMemoryInGbs value. + */ + public Integer availableMemoryInGbs() { + return this.availableMemoryInGbs; + } + + /** + * Get the minMemoryPerNodeInGbs property: The minimum memory that need be allocated per node for this shape. + * + * @return the minMemoryPerNodeInGbs value. + */ + public Integer minMemoryPerNodeInGbs() { + return this.minMemoryPerNodeInGbs; + } + + /** + * Get the availableDbNodeStorageInGbs property: The maximum Db Node storage that can be enabled for this shape. + * + * @return the availableDbNodeStorageInGbs value. + */ + public Integer availableDbNodeStorageInGbs() { + return this.availableDbNodeStorageInGbs; + } + + /** + * Get the minDbNodeStoragePerNodeInGbs property: The minimum Db Node storage that need be allocated per node for + * this shape. + * + * @return the minDbNodeStoragePerNodeInGbs value. + */ + public Integer minDbNodeStoragePerNodeInGbs() { + return this.minDbNodeStoragePerNodeInGbs; + } + + /** + * Get the availableDataStorageInTbs property: The maximum DATA storage that can be enabled for this shape. + * + * @return the availableDataStorageInTbs value. + */ + public Integer availableDataStorageInTbs() { + return this.availableDataStorageInTbs; + } + + /** + * Get the minDataStorageInTbs property: The minimum data storage that need be allocated for this shape. + * + * @return the minDataStorageInTbs value. + */ + public Integer minDataStorageInTbs() { + return this.minDataStorageInTbs; + } + + /** + * Get the minimumNodeCount property: The minimum number of database nodes available for this shape. + * + * @return the minimumNodeCount value. + */ + public Integer minimumNodeCount() { + return this.minimumNodeCount; + } + + /** + * Get the maximumNodeCount property: The maximum number of database nodes available for this shape. + * + * @return the maximumNodeCount value. + */ + public Integer maximumNodeCount() { + return this.maximumNodeCount; + } + + /** + * Get the availableCoreCountPerNode property: The maximum number of CPU cores per database node that can be enabled + * for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. + * + * @return the availableCoreCountPerNode value. + */ + public Integer availableCoreCountPerNode() { + return this.availableCoreCountPerNode; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapes.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapes.java new file mode 100644 index 000000000000..5e0385957cea --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DbSystemShapes.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 DbSystemShapes. + */ +public interface DbSystemShapes { + /** + * List DbSystemShape resources by Location. + * + * @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 DbSystemShape list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocation(String location); + + /** + * List DbSystemShape resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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); + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape along with {@link Response}. + */ + Response getWithResponse(String location, String dbsystemshapename, Context context); + + /** + * Get a DbSystemShape. + * + * @param location The name of the Azure region. + * @param dbsystemshapename DbSystemShape name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DbSystemShape. + */ + DbSystemShape get(String location, String dbsystemshapename); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DisasterRecoveryType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DisasterRecoveryType.java new file mode 100644 index 000000000000..6382ae33ec70 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DisasterRecoveryType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DisasterRecoveryType enum. + */ +public final class DisasterRecoveryType extends ExpandableStringEnum { + /** + * Static value Adg for DisasterRecoveryType. + */ + public static final DisasterRecoveryType ADG = fromString("Adg"); + + /** + * Static value BackupBased for DisasterRecoveryType. + */ + public static final DisasterRecoveryType BACKUP_BASED = fromString("BackupBased"); + + /** + * Creates a new instance of DisasterRecoveryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DisasterRecoveryType() { + } + + /** + * Creates or finds a DisasterRecoveryType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DisasterRecoveryType. + */ + @JsonCreator + public static DisasterRecoveryType fromString(String name) { + return fromString(name, DisasterRecoveryType.class); + } + + /** + * Gets known DisasterRecoveryType values. + * + * @return known DisasterRecoveryType values. + */ + public static Collection values() { + return values(DisasterRecoveryType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DiskRedundancy.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DiskRedundancy.java new file mode 100644 index 000000000000..5fef5de9c121 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DiskRedundancy.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DiskRedundancy enum. + */ +public final class DiskRedundancy extends ExpandableStringEnum { + /** + * Static value High for DiskRedundancy. + */ + public static final DiskRedundancy HIGH = fromString("High"); + + /** + * Static value Normal for DiskRedundancy. + */ + public static final DiskRedundancy NORMAL = fromString("Normal"); + + /** + * Creates a new instance of DiskRedundancy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DiskRedundancy() { + } + + /** + * Creates or finds a DiskRedundancy from its string representation. + * + * @param name a name to look for. + * @return the corresponding DiskRedundancy. + */ + @JsonCreator + public static DiskRedundancy fromString(String name) { + return fromString(name, DiskRedundancy.class); + } + + /** + * Gets known DiskRedundancy values. + * + * @return known DiskRedundancy values. + */ + public static Collection values() { + return values(DiskRedundancy.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateView.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateView.java new file mode 100644 index 000000000000..b8c85fcca735 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateView.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateViewInner; + +/** + * An immutable client-side representation of DnsPrivateView. + */ +public interface DnsPrivateView { + /** + * 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. + */ + DnsPrivateViewProperties 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.oracle.fluent.models.DnsPrivateViewInner object. + * + * @return the inner object. + */ + DnsPrivateViewInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewListResult.java new file mode 100644 index 000000000000..ccc3d8652acf --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateViewInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DnsPrivateView list operation. + */ +@Fluent +public final class DnsPrivateViewListResult { + /* + * The DnsPrivateView items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DnsPrivateViewListResult class. + */ + public DnsPrivateViewListResult() { + } + + /** + * Get the value property: The DnsPrivateView items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DnsPrivateView items on this page. + * + * @param value the value value to set. + * @return the DnsPrivateViewListResult object itself. + */ + public DnsPrivateViewListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 DnsPrivateViewListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DnsPrivateViewListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewProperties.java new file mode 100644 index 000000000000..5b51b56cf3d1 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Views resource model. + */ +@Immutable +public final class DnsPrivateViewProperties { + /* + * The OCID of the view + */ + @JsonProperty(value = "ocid", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * The display name of the view resource + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /* + * A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + */ + @JsonProperty(value = "isProtected", required = true, access = JsonProperty.Access.WRITE_ONLY) + private boolean isProtected; + + /* + * Views lifecycleState + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private DnsPrivateViewsLifecycleState lifecycleState; + + /* + * The canonical absolute URL of the resource. + */ + @JsonProperty(value = "self", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String self; + + /* + * views timeCreated + */ + @JsonProperty(value = "timeCreated", required = true, access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeCreated; + + /* + * views timeCreated + */ + @JsonProperty(value = "timeUpdated", required = true, access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeUpdated; + + /* + * Azure resource provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * Creates an instance of DnsPrivateViewProperties class. + */ + public DnsPrivateViewProperties() { + } + + /** + * Get the ocid property: The OCID of the view. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the displayName property: The display name of the view resource. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the isProtected property: A Boolean flag indicating whether or not parts of the resource are unable to be + * explicitly managed. + * + * @return the isProtected value. + */ + public boolean isProtected() { + return this.isProtected; + } + + /** + * Get the lifecycleState property: Views lifecycleState. + * + * @return the lifecycleState value. + */ + public DnsPrivateViewsLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the self property: The canonical absolute URL of the resource. + * + * @return the self value. + */ + public String self() { + return this.self; + } + + /** + * Get the timeCreated property: views timeCreated. + * + * @return the timeCreated value. + */ + public OffsetDateTime timeCreated() { + return this.timeCreated; + } + + /** + * Get the timeUpdated property: views timeCreated. + * + * @return the timeUpdated value. + */ + public OffsetDateTime timeUpdated() { + return this.timeUpdated; + } + + /** + * Get the provisioningState property: Azure resource provisioning state. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViews.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViews.java new file mode 100644 index 000000000000..72290360a2cf --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViews.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 DnsPrivateViews. + */ +public interface DnsPrivateViews { + /** + * List DnsPrivateView resources by Location. + * + * @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 DnsPrivateView list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocation(String location); + + /** + * List DnsPrivateView resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateView list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocation(String location, Context context); + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView along with {@link Response}. + */ + Response getWithResponse(String location, String dnsprivateviewocid, Context context); + + /** + * Get a DnsPrivateView. + * + * @param location The name of the Azure region. + * @param dnsprivateviewocid DnsPrivateView OCID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateView. + */ + DnsPrivateView get(String location, String dnsprivateviewocid); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewsLifecycleState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewsLifecycleState.java new file mode 100644 index 000000000000..b2e707877327 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateViewsLifecycleState.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.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DnsPrivateViews lifecycle state enum. + */ +public final class DnsPrivateViewsLifecycleState extends ExpandableStringEnum { + /** + * Static value Active for DnsPrivateViewsLifecycleState. + */ + public static final DnsPrivateViewsLifecycleState ACTIVE = fromString("Active"); + + /** + * Static value Deleted for DnsPrivateViewsLifecycleState. + */ + public static final DnsPrivateViewsLifecycleState DELETED = fromString("Deleted"); + + /** + * Static value Deleting for DnsPrivateViewsLifecycleState. + */ + public static final DnsPrivateViewsLifecycleState DELETING = fromString("Deleting"); + + /** + * Static value Updating for DnsPrivateViewsLifecycleState. + */ + public static final DnsPrivateViewsLifecycleState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of DnsPrivateViewsLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DnsPrivateViewsLifecycleState() { + } + + /** + * Creates or finds a DnsPrivateViewsLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DnsPrivateViewsLifecycleState. + */ + @JsonCreator + public static DnsPrivateViewsLifecycleState fromString(String name) { + return fromString(name, DnsPrivateViewsLifecycleState.class); + } + + /** + * Gets known DnsPrivateViewsLifecycleState values. + * + * @return known DnsPrivateViewsLifecycleState values. + */ + public static Collection values() { + return values(DnsPrivateViewsLifecycleState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZone.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZone.java new file mode 100644 index 000000000000..5fc83e33362d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZone.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateZoneInner; + +/** + * An immutable client-side representation of DnsPrivateZone. + */ +public interface DnsPrivateZone { + /** + * 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. + */ + DnsPrivateZoneProperties 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.oracle.fluent.models.DnsPrivateZoneInner object. + * + * @return the inner object. + */ + DnsPrivateZoneInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZoneListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZoneListResult.java new file mode 100644 index 000000000000..8e193f1659ed --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZoneListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.DnsPrivateZoneInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a DnsPrivateZone list operation. + */ +@Fluent +public final class DnsPrivateZoneListResult { + /* + * The DnsPrivateZone items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DnsPrivateZoneListResult class. + */ + public DnsPrivateZoneListResult() { + } + + /** + * Get the value property: The DnsPrivateZone items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The DnsPrivateZone items on this page. + * + * @param value the value value to set. + * @return the DnsPrivateZoneListResult object itself. + */ + public DnsPrivateZoneListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 DnsPrivateZoneListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DnsPrivateZoneListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZoneProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZoneProperties.java new file mode 100644 index 000000000000..a81abe3b5364 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZoneProperties.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Zones resource model. + */ +@Immutable +public final class DnsPrivateZoneProperties { + /* + * The OCID of the Zone + */ + @JsonProperty(value = "ocid", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + */ + @JsonProperty(value = "isProtected", required = true, access = JsonProperty.Access.WRITE_ONLY) + private boolean isProtected; + + /* + * Zones lifecycleState + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private DnsPrivateZonesLifecycleState lifecycleState; + + /* + * The canonical absolute URL of the resource. + */ + @JsonProperty(value = "self", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String self; + + /* + * The current serial of the zone. As seen in the zone's SOA record. + */ + @JsonProperty(value = "serial", required = true, access = JsonProperty.Access.WRITE_ONLY) + private int serial; + + /* + * Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. + */ + @JsonProperty(value = "version", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly resolvable and not part of a private view. + */ + @JsonProperty(value = "viewId", access = JsonProperty.Access.WRITE_ONLY) + private String viewId; + + /* + * The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + */ + @JsonProperty(value = "zoneType", required = true, access = JsonProperty.Access.WRITE_ONLY) + private ZoneType zoneType; + + /* + * Zones timeCreated + */ + @JsonProperty(value = "timeCreated", required = true, access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeCreated; + + /* + * Azure resource provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ResourceProvisioningState provisioningState; + + /** + * Creates an instance of DnsPrivateZoneProperties class. + */ + public DnsPrivateZoneProperties() { + } + + /** + * Get the ocid property: The OCID of the Zone. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the isProtected property: A Boolean flag indicating whether or not parts of the resource are unable to be + * explicitly managed. + * + * @return the isProtected value. + */ + public boolean isProtected() { + return this.isProtected; + } + + /** + * Get the lifecycleState property: Zones lifecycleState. + * + * @return the lifecycleState value. + */ + public DnsPrivateZonesLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the self property: The canonical absolute URL of the resource. + * + * @return the self value. + */ + public String self() { + return this.self; + } + + /** + * Get the serial property: The current serial of the zone. As seen in the zone's SOA record. + * + * @return the serial value. + */ + public int serial() { + return this.serial; + } + + /** + * Get the version property: Version is the never-repeating, totally-orderable, version of the zone, from which the + * serial field of the zone's SOA record is derived. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the viewId property: The OCID of the private view containing the zone. This value will be null for zones in + * the global DNS, which are publicly resolvable and not part of a private view. + * + * @return the viewId value. + */ + public String viewId() { + return this.viewId; + } + + /** + * Get the zoneType property: The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported + * for GLOBAL zones. + * + * @return the zoneType value. + */ + public ZoneType zoneType() { + return this.zoneType; + } + + /** + * Get the timeCreated property: Zones timeCreated. + * + * @return the timeCreated value. + */ + public OffsetDateTime timeCreated() { + return this.timeCreated; + } + + /** + * Get the provisioningState property: Azure resource provisioning state. + * + * @return the provisioningState value. + */ + public ResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZones.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZones.java new file mode 100644 index 000000000000..4487b4f57c0a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZones.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 DnsPrivateZones. + */ +public interface DnsPrivateZones { + /** + * List DnsPrivateZone resources by Location. + * + * @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 DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocation(String location); + + /** + * List DnsPrivateZone resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a DnsPrivateZone list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocation(String location, Context context); + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone along with {@link Response}. + */ + Response getWithResponse(String location, String dnsprivatezonename, Context context); + + /** + * Get a DnsPrivateZone. + * + * @param location The name of the Azure region. + * @param dnsprivatezonename DnsPrivateZone name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a DnsPrivateZone. + */ + DnsPrivateZone get(String location, String dnsprivatezonename); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZonesLifecycleState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZonesLifecycleState.java new file mode 100644 index 000000000000..5dff8ad6784d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/DnsPrivateZonesLifecycleState.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * DnsPrivateZones lifecycle state enum. + */ +public final class DnsPrivateZonesLifecycleState extends ExpandableStringEnum { + /** + * Static value Active for DnsPrivateZonesLifecycleState. + */ + public static final DnsPrivateZonesLifecycleState ACTIVE = fromString("Active"); + + /** + * Static value Creating for DnsPrivateZonesLifecycleState. + */ + public static final DnsPrivateZonesLifecycleState CREATING = fromString("Creating"); + + /** + * Static value Deleted for DnsPrivateZonesLifecycleState. + */ + public static final DnsPrivateZonesLifecycleState DELETED = fromString("Deleted"); + + /** + * Static value Deleting for DnsPrivateZonesLifecycleState. + */ + public static final DnsPrivateZonesLifecycleState DELETING = fromString("Deleting"); + + /** + * Static value Updating for DnsPrivateZonesLifecycleState. + */ + public static final DnsPrivateZonesLifecycleState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of DnsPrivateZonesLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DnsPrivateZonesLifecycleState() { + } + + /** + * Creates or finds a DnsPrivateZonesLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DnsPrivateZonesLifecycleState. + */ + @JsonCreator + public static DnsPrivateZonesLifecycleState fromString(String name) { + return fromString(name, DnsPrivateZonesLifecycleState.class); + } + + /** + * Gets known DnsPrivateZonesLifecycleState values. + * + * @return known DnsPrivateZonesLifecycleState values. + */ + public static Collection values() { + return values(DnsPrivateZonesLifecycleState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/EstimatedPatchingTime.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/EstimatedPatchingTime.java new file mode 100644 index 000000000000..7d40785ad1f7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/EstimatedPatchingTime.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The estimated total time required in minutes for all patching operations (database server, storage server, and + * network switch patching). + */ +@Immutable +public final class EstimatedPatchingTime { + /* + * The estimated time required in minutes for database server patching. + */ + @JsonProperty(value = "estimatedDbServerPatchingTime", access = JsonProperty.Access.WRITE_ONLY) + private Integer estimatedDbServerPatchingTime; + + /* + * The estimated time required in minutes for network switch patching. + */ + @JsonProperty(value = "estimatedNetworkSwitchesPatchingTime", access = JsonProperty.Access.WRITE_ONLY) + private Integer estimatedNetworkSwitchesPatchingTime; + + /* + * The estimated time required in minutes for storage server patching. + */ + @JsonProperty(value = "estimatedStorageServerPatchingTime", access = JsonProperty.Access.WRITE_ONLY) + private Integer estimatedStorageServerPatchingTime; + + /* + * The estimated total time required in minutes for all patching operations. + */ + @JsonProperty(value = "totalEstimatedPatchingTime", access = JsonProperty.Access.WRITE_ONLY) + private Integer totalEstimatedPatchingTime; + + /** + * Creates an instance of EstimatedPatchingTime class. + */ + public EstimatedPatchingTime() { + } + + /** + * Get the estimatedDbServerPatchingTime property: The estimated time required in minutes for database server + * patching. + * + * @return the estimatedDbServerPatchingTime value. + */ + public Integer estimatedDbServerPatchingTime() { + return this.estimatedDbServerPatchingTime; + } + + /** + * Get the estimatedNetworkSwitchesPatchingTime property: The estimated time required in minutes for network switch + * patching. + * + * @return the estimatedNetworkSwitchesPatchingTime value. + */ + public Integer estimatedNetworkSwitchesPatchingTime() { + return this.estimatedNetworkSwitchesPatchingTime; + } + + /** + * Get the estimatedStorageServerPatchingTime property: The estimated time required in minutes for storage server + * patching. + * + * @return the estimatedStorageServerPatchingTime value. + */ + public Integer estimatedStorageServerPatchingTime() { + return this.estimatedStorageServerPatchingTime; + } + + /** + * Get the totalEstimatedPatchingTime property: The estimated total time required in minutes for all patching + * operations. + * + * @return the totalEstimatedPatchingTime value. + */ + public Integer totalEstimatedPatchingTime() { + return this.totalEstimatedPatchingTime; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ExadataIormConfig.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ExadataIormConfig.java new file mode 100644 index 000000000000..9e975fb5d552 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ExadataIormConfig.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * ExadataIormConfig for cloud vm cluster. + */ +@Fluent +public final class ExadataIormConfig { + /* + * An array of IORM settings for all the database in the Exadata DB system. + */ + @JsonProperty(value = "dbPlans") + private List dbPlans; + + /* + * Additional information about the current lifecycleState. + */ + @JsonProperty(value = "lifecycleDetails") + private String lifecycleDetails; + + /* + * The current state of IORM configuration for the Exadata DB system. + */ + @JsonProperty(value = "lifecycleState") + private IormLifecycleState lifecycleState; + + /* + * The current value for the IORM objective. The default is AUTO. + */ + @JsonProperty(value = "objective") + private Objective objective; + + /** + * Creates an instance of ExadataIormConfig class. + */ + public ExadataIormConfig() { + } + + /** + * Get the dbPlans property: An array of IORM settings for all the database in the Exadata DB system. + * + * @return the dbPlans value. + */ + public List dbPlans() { + return this.dbPlans; + } + + /** + * Set the dbPlans property: An array of IORM settings for all the database in the Exadata DB system. + * + * @param dbPlans the dbPlans value to set. + * @return the ExadataIormConfig object itself. + */ + public ExadataIormConfig withDbPlans(List dbPlans) { + this.dbPlans = dbPlans; + return this; + } + + /** + * Get the lifecycleDetails property: Additional information about the current lifecycleState. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Set the lifecycleDetails property: Additional information about the current lifecycleState. + * + * @param lifecycleDetails the lifecycleDetails value to set. + * @return the ExadataIormConfig object itself. + */ + public ExadataIormConfig withLifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + return this; + } + + /** + * Get the lifecycleState property: The current state of IORM configuration for the Exadata DB system. + * + * @return the lifecycleState value. + */ + public IormLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Set the lifecycleState property: The current state of IORM configuration for the Exadata DB system. + * + * @param lifecycleState the lifecycleState value to set. + * @return the ExadataIormConfig object itself. + */ + public ExadataIormConfig withLifecycleState(IormLifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Get the objective property: The current value for the IORM objective. The default is AUTO. + * + * @return the objective value. + */ + public Objective objective() { + return this.objective; + } + + /** + * Set the objective property: The current value for the IORM objective. The default is AUTO. + * + * @param objective the objective value to set. + * @return the ExadataIormConfig object itself. + */ + public ExadataIormConfig withObjective(Objective objective) { + this.objective = objective; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dbPlans() != null) { + dbPlans().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GenerateAutonomousDatabaseWalletDetails.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GenerateAutonomousDatabaseWalletDetails.java new file mode 100644 index 000000000000..32f6586095b8 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GenerateAutonomousDatabaseWalletDetails.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Autonomous Database Generate Wallet resource model. + */ +@Fluent +public final class GenerateAutonomousDatabaseWalletDetails { + /* + * The type of wallet to generate. + */ + @JsonProperty(value = "generateType") + private GenerateType generateType; + + /* + * True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + */ + @JsonProperty(value = "isRegional") + private Boolean isRegional; + + /* + * The password to encrypt the keys inside the wallet + */ + @JsonProperty(value = "password", required = true) + private String password; + + /** + * Creates an instance of GenerateAutonomousDatabaseWalletDetails class. + */ + public GenerateAutonomousDatabaseWalletDetails() { + } + + /** + * Get the generateType property: The type of wallet to generate. + * + * @return the generateType value. + */ + public GenerateType generateType() { + return this.generateType; + } + + /** + * Set the generateType property: The type of wallet to generate. + * + * @param generateType the generateType value to set. + * @return the GenerateAutonomousDatabaseWalletDetails object itself. + */ + public GenerateAutonomousDatabaseWalletDetails withGenerateType(GenerateType generateType) { + this.generateType = generateType; + return this; + } + + /** + * Get the isRegional property: True when requesting regional connection strings in PDB connect info, applicable to + * cross-region DG only. + * + * @return the isRegional value. + */ + public Boolean isRegional() { + return this.isRegional; + } + + /** + * Set the isRegional property: True when requesting regional connection strings in PDB connect info, applicable to + * cross-region DG only. + * + * @param isRegional the isRegional value to set. + * @return the GenerateAutonomousDatabaseWalletDetails object itself. + */ + public GenerateAutonomousDatabaseWalletDetails withIsRegional(Boolean isRegional) { + this.isRegional = isRegional; + return this; + } + + /** + * Get the password property: The password to encrypt the keys inside the wallet. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password to encrypt the keys inside the wallet. + * + * @param password the password value to set. + * @return the GenerateAutonomousDatabaseWalletDetails object itself. + */ + public GenerateAutonomousDatabaseWalletDetails withPassword(String password) { + this.password = password; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (password() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property password in model GenerateAutonomousDatabaseWalletDetails")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GenerateAutonomousDatabaseWalletDetails.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GenerateType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GenerateType.java new file mode 100644 index 000000000000..a2103f71ca98 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GenerateType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * GenerateType enum. + */ +public final class GenerateType extends ExpandableStringEnum { + /** + * Static value Single for GenerateType. + */ + public static final GenerateType SINGLE = fromString("Single"); + + /** + * Static value All for GenerateType. + */ + public static final GenerateType ALL = fromString("All"); + + /** + * Creates a new instance of GenerateType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GenerateType() { + } + + /** + * Creates or finds a GenerateType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GenerateType. + */ + @JsonCreator + public static GenerateType fromString(String name) { + return fromString(name, GenerateType.class); + } + + /** + * Gets known GenerateType values. + * + * @return known GenerateType values. + */ + public static Collection values() { + return values(GenerateType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersion.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersion.java new file mode 100644 index 000000000000..820f4282c522 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersion.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.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.GiVersionInner; + +/** + * An immutable client-side representation of GiVersion. + */ +public interface GiVersion { + /** + * 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. + */ + GiVersionProperties 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.oracle.fluent.models.GiVersionInner object. + * + * @return the inner object. + */ + GiVersionInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersionListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersionListResult.java new file mode 100644 index 000000000000..e810ee5a6e29 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersionListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.GiVersionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a GiVersion list operation. + */ +@Fluent +public final class GiVersionListResult { + /* + * The GiVersion items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of GiVersionListResult class. + */ + public GiVersionListResult() { + } + + /** + * Get the value property: The GiVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The GiVersion items on this page. + * + * @param value the value value to set. + * @return the GiVersionListResult object itself. + */ + public GiVersionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 GiVersionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GiVersionListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersionProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersionProperties.java new file mode 100644 index 000000000000..b309a6134cf3 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersionProperties.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.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * GiVersion resource model. + */ +@Immutable +public final class GiVersionProperties { + /* + * A valid Oracle Grid Infrastructure (GI) software version. + */ + @JsonProperty(value = "version", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /** + * Creates an instance of GiVersionProperties class. + */ + public GiVersionProperties() { + } + + /** + * Get the version property: A valid Oracle Grid Infrastructure (GI) software version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersions.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersions.java new file mode 100644 index 000000000000..2bc808d334ab --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/GiVersions.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.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 GiVersions. + */ +public interface GiVersions { + /** + * List GiVersion resources by Location. + * + * @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 GiVersion list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByLocation(String location); + + /** + * List GiVersion resources by Location. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the 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); + + /** + * Get a GiVersion. + * + * @param location The name of the Azure region. + * @param giversionname GiVersion name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a GiVersion along with {@link Response}. + */ + Response getWithResponse(String location, String giversionname, Context context); + + /** + * Get a 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 a GiVersion. + */ + GiVersion get(String location, String giversionname); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/HostFormatType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/HostFormatType.java new file mode 100644 index 000000000000..edb6f3448e79 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/HostFormatType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * HostFormatType enum. + */ +public final class HostFormatType extends ExpandableStringEnum { + /** + * Static value Fqdn for HostFormatType. + */ + public static final HostFormatType FQDN = fromString("Fqdn"); + + /** + * Static value Ip for HostFormatType. + */ + public static final HostFormatType IP = fromString("Ip"); + + /** + * Creates a new instance of HostFormatType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostFormatType() { + } + + /** + * Creates or finds a HostFormatType from its string representation. + * + * @param name a name to look for. + * @return the corresponding HostFormatType. + */ + @JsonCreator + public static HostFormatType fromString(String name) { + return fromString(name, HostFormatType.class); + } + + /** + * Gets known HostFormatType values. + * + * @return known HostFormatType values. + */ + public static Collection values() { + return values(HostFormatType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Intent.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Intent.java new file mode 100644 index 000000000000..59c983c96d07 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Intent.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Intent enum. + */ +public final class Intent extends ExpandableStringEnum { + /** + * Static value Retain for Intent. + */ + public static final Intent RETAIN = fromString("Retain"); + + /** + * Static value Reset for Intent. + */ + public static final Intent RESET = fromString("Reset"); + + /** + * Creates a new instance of Intent value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Intent() { + } + + /** + * Creates or finds a Intent from its string representation. + * + * @param name a name to look for. + * @return the corresponding Intent. + */ + @JsonCreator + public static Intent fromString(String name) { + return fromString(name, Intent.class); + } + + /** + * Gets known Intent values. + * + * @return known Intent values. + */ + public static Collection values() { + return values(Intent.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/IormLifecycleState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/IormLifecycleState.java new file mode 100644 index 000000000000..68e475121057 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/IormLifecycleState.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * IORMLifecycleState enum. + */ +public final class IormLifecycleState extends ExpandableStringEnum { + /** + * Static value BootStrapping for IormLifecycleState. + */ + public static final IormLifecycleState BOOT_STRAPPING = fromString("BootStrapping"); + + /** + * Static value Enabled for IormLifecycleState. + */ + public static final IormLifecycleState ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for IormLifecycleState. + */ + public static final IormLifecycleState DISABLED = fromString("Disabled"); + + /** + * Static value Updating for IormLifecycleState. + */ + public static final IormLifecycleState UPDATING = fromString("Updating"); + + /** + * Static value Failed for IormLifecycleState. + */ + public static final IormLifecycleState FAILED = fromString("Failed"); + + /** + * Creates a new instance of IormLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IormLifecycleState() { + } + + /** + * Creates or finds a IormLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding IormLifecycleState. + */ + @JsonCreator + public static IormLifecycleState fromString(String name) { + return fromString(name, IormLifecycleState.class); + } + + /** + * Gets known IormLifecycleState values. + * + * @return known IormLifecycleState values. + */ + public static Collection values() { + return values(IormLifecycleState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/LicenseModel.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/LicenseModel.java new file mode 100644 index 000000000000..7edb4099cebe --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/LicenseModel.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * LicenseModel enum. + */ +public final class LicenseModel extends ExpandableStringEnum { + /** + * Static value LicenseIncluded for LicenseModel. + */ + public static final LicenseModel LICENSE_INCLUDED = fromString("LicenseIncluded"); + + /** + * Static value BringYourOwnLicense for LicenseModel. + */ + public static final LicenseModel BRING_YOUR_OWN_LICENSE = fromString("BringYourOwnLicense"); + + /** + * Creates a new instance of LicenseModel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseModel() { + } + + /** + * Creates or finds a LicenseModel from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseModel. + */ + @JsonCreator + public static LicenseModel fromString(String name) { + return fromString(name, LicenseModel.class); + } + + /** + * Gets known LicenseModel values. + * + * @return known LicenseModel values. + */ + public static Collection values() { + return values(LicenseModel.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/MaintenanceWindow.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/MaintenanceWindow.java new file mode 100644 index 000000000000..02029a8e3d6c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/MaintenanceWindow.java @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * MaintenanceWindow resource properties. + */ +@Fluent +public final class MaintenanceWindow { + /* + * The maintenance window scheduling preference. + */ + @JsonProperty(value = "preference") + private Preference preference; + + /* + * Months during the year when maintenance should be performed. + */ + @JsonProperty(value = "months") + private List months; + + /* + * Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + */ + @JsonProperty(value = "weeksOfMonth") + private List weeksOfMonth; + + /* + * Days during the week when maintenance should be performed. + */ + @JsonProperty(value = "daysOfWeek") + private List daysOfWeek; + + /* + * The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + */ + @JsonProperty(value = "hoursOfDay") + private List hoursOfDay; + + /* + * Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. + */ + @JsonProperty(value = "leadTimeInWeeks") + private Integer leadTimeInWeeks; + + /* + * Cloud Exadata infrastructure node patching method. + */ + @JsonProperty(value = "patchingMode") + private PatchingMode patchingMode; + + /* + * Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + */ + @JsonProperty(value = "customActionTimeoutInMins") + private Integer customActionTimeoutInMins; + + /* + * If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + */ + @JsonProperty(value = "isCustomActionTimeoutEnabled") + private Boolean isCustomActionTimeoutEnabled; + + /* + * is Monthly Patching Enabled + */ + @JsonProperty(value = "isMonthlyPatchingEnabled") + private Boolean isMonthlyPatchingEnabled; + + /** + * Creates an instance of MaintenanceWindow class. + */ + public MaintenanceWindow() { + } + + /** + * Get the preference property: The maintenance window scheduling preference. + * + * @return the preference value. + */ + public Preference preference() { + return this.preference; + } + + /** + * Set the preference property: The maintenance window scheduling preference. + * + * @param preference the preference value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withPreference(Preference preference) { + this.preference = preference; + return this; + } + + /** + * Get the months property: Months during the year when maintenance should be performed. + * + * @return the months value. + */ + public List months() { + return this.months; + } + + /** + * Set the months property: Months during the year when maintenance should be performed. + * + * @param months the months value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withMonths(List months) { + this.months = months; + return this; + } + + /** + * Get the weeksOfMonth property: Weeks during the month when maintenance should be performed. Weeks start on the + * 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar + * dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day + * to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that + * contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay + * parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + * + * @return the weeksOfMonth value. + */ + public List weeksOfMonth() { + return this.weeksOfMonth; + } + + /** + * Set the weeksOfMonth property: Weeks during the month when maintenance should be performed. Weeks start on the + * 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar + * dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day + * to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that + * contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay + * parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + * + * @param weeksOfMonth the weeksOfMonth value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withWeeksOfMonth(List weeksOfMonth) { + this.weeksOfMonth = weeksOfMonth; + return this; + } + + /** + * Get the daysOfWeek property: Days during the week when maintenance should be performed. + * + * @return the daysOfWeek value. + */ + public List daysOfWeek() { + return this.daysOfWeek; + } + + /** + * Set the daysOfWeek property: Days during the week when maintenance should be performed. + * + * @param daysOfWeek the daysOfWeek value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withDaysOfWeek(List daysOfWeek) { + this.daysOfWeek = daysOfWeek; + return this; + } + + /** + * Get the hoursOfDay property: The window of hours during the day when maintenance should be performed. The window + * is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - + * 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - + * represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC. + * + * @return the hoursOfDay value. + */ + public List hoursOfDay() { + return this.hoursOfDay; + } + + /** + * Set the hoursOfDay property: The window of hours during the day when maintenance should be performed. The window + * is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - + * 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - + * represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC. + * + * @param hoursOfDay the hoursOfDay value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withHoursOfDay(List hoursOfDay) { + this.hoursOfDay = hoursOfDay; + return this; + } + + /** + * Get the leadTimeInWeeks property: Lead time window allows user to set a lead time to prepare for a down time. The + * lead time is in weeks and valid value is between 1 to 4. + * + * @return the leadTimeInWeeks value. + */ + public Integer leadTimeInWeeks() { + return this.leadTimeInWeeks; + } + + /** + * Set the leadTimeInWeeks property: Lead time window allows user to set a lead time to prepare for a down time. The + * lead time is in weeks and valid value is between 1 to 4. + * + * @param leadTimeInWeeks the leadTimeInWeeks value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withLeadTimeInWeeks(Integer leadTimeInWeeks) { + this.leadTimeInWeeks = leadTimeInWeeks; + return this; + } + + /** + * Get the patchingMode property: Cloud Exadata infrastructure node patching method. + * + * @return the patchingMode value. + */ + public PatchingMode patchingMode() { + return this.patchingMode; + } + + /** + * Set the patchingMode property: Cloud Exadata infrastructure node patching method. + * + * @param patchingMode the patchingMode value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withPatchingMode(PatchingMode patchingMode) { + this.patchingMode = patchingMode; + return this; + } + + /** + * Get the customActionTimeoutInMins property: Determines the amount of time the system will wait before the start + * of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to + * 120 (inclusive). + * + * @return the customActionTimeoutInMins value. + */ + public Integer customActionTimeoutInMins() { + return this.customActionTimeoutInMins; + } + + /** + * Set the customActionTimeoutInMins property: Determines the amount of time the system will wait before the start + * of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to + * 120 (inclusive). + * + * @param customActionTimeoutInMins the customActionTimeoutInMins value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withCustomActionTimeoutInMins(Integer customActionTimeoutInMins) { + this.customActionTimeoutInMins = customActionTimeoutInMins; + return this; + } + + /** + * Get the isCustomActionTimeoutEnabled property: If true, enables the configuration of a custom action timeout + * (waiting period) between database server patching operations. + * + * @return the isCustomActionTimeoutEnabled value. + */ + public Boolean isCustomActionTimeoutEnabled() { + return this.isCustomActionTimeoutEnabled; + } + + /** + * Set the isCustomActionTimeoutEnabled property: If true, enables the configuration of a custom action timeout + * (waiting period) between database server patching operations. + * + * @param isCustomActionTimeoutEnabled the isCustomActionTimeoutEnabled value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withIsCustomActionTimeoutEnabled(Boolean isCustomActionTimeoutEnabled) { + this.isCustomActionTimeoutEnabled = isCustomActionTimeoutEnabled; + return this; + } + + /** + * Get the isMonthlyPatchingEnabled property: is Monthly Patching Enabled. + * + * @return the isMonthlyPatchingEnabled value. + */ + public Boolean isMonthlyPatchingEnabled() { + return this.isMonthlyPatchingEnabled; + } + + /** + * Set the isMonthlyPatchingEnabled property: is Monthly Patching Enabled. + * + * @param isMonthlyPatchingEnabled the isMonthlyPatchingEnabled value to set. + * @return the MaintenanceWindow object itself. + */ + public MaintenanceWindow withIsMonthlyPatchingEnabled(Boolean isMonthlyPatchingEnabled) { + this.isMonthlyPatchingEnabled = isMonthlyPatchingEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (months() != null) { + months().forEach(e -> e.validate()); + } + if (daysOfWeek() != null) { + daysOfWeek().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Month.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Month.java new file mode 100644 index 000000000000..7467f81ec15c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Month.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Month resource properties. + */ +@Fluent +public final class Month { + /* + * Name of the month of the year. + */ + @JsonProperty(value = "name", required = true) + private MonthName name; + + /** + * Creates an instance of Month class. + */ + public Month() { + } + + /** + * Get the name property: Name of the month of the year. + * + * @return the name value. + */ + public MonthName name() { + return this.name; + } + + /** + * Set the name property: Name of the month of the year. + * + * @param name the name value to set. + * @return the Month object itself. + */ + public Month withName(MonthName name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Month")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Month.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/MonthName.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/MonthName.java new file mode 100644 index 000000000000..64d479442297 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/MonthName.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * MonthName enum. + */ +public final class MonthName extends ExpandableStringEnum { + /** + * Static value January for MonthName. + */ + public static final MonthName JANUARY = fromString("January"); + + /** + * Static value February for MonthName. + */ + public static final MonthName FEBRUARY = fromString("February"); + + /** + * Static value March for MonthName. + */ + public static final MonthName MARCH = fromString("March"); + + /** + * Static value April for MonthName. + */ + public static final MonthName APRIL = fromString("April"); + + /** + * Static value May for MonthName. + */ + public static final MonthName MAY = fromString("May"); + + /** + * Static value June for MonthName. + */ + public static final MonthName JUNE = fromString("June"); + + /** + * Static value July for MonthName. + */ + public static final MonthName JULY = fromString("July"); + + /** + * Static value August for MonthName. + */ + public static final MonthName AUGUST = fromString("August"); + + /** + * Static value September for MonthName. + */ + public static final MonthName SEPTEMBER = fromString("September"); + + /** + * Static value October for MonthName. + */ + public static final MonthName OCTOBER = fromString("October"); + + /** + * Static value November for MonthName. + */ + public static final MonthName NOVEMBER = fromString("November"); + + /** + * Static value December for MonthName. + */ + public static final MonthName DECEMBER = fromString("December"); + + /** + * Creates a new instance of MonthName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonthName() { + } + + /** + * Creates or finds a MonthName from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonthName. + */ + @JsonCreator + public static MonthName fromString(String name) { + return fromString(name, MonthName.class); + } + + /** + * Gets known MonthName values. + * + * @return known MonthName values. + */ + public static Collection values() { + return values(MonthName.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/NsgCidr.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/NsgCidr.java new file mode 100644 index 000000000000..9346bacf2c04 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/NsgCidr.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.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * A rule for allowing inbound (INGRESS) IP packets. + */ +@Fluent +public final class NsgCidr { + /* + * Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + */ + @JsonProperty(value = "source", required = true) + private String source; + + /* + * Destination port range to specify particular destination ports for TCP rules. + */ + @JsonProperty(value = "destinationPortRange") + private PortRange destinationPortRange; + + /** + * Creates an instance of NsgCidr class. + */ + public NsgCidr() { + } + + /** + * Get the source property: Conceptually, this is the range of IP addresses that a packet coming into the instance + * can come from. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Conceptually, this is the range of IP addresses that a packet coming into the instance + * can come from. + * + * @param source the source value to set. + * @return the NsgCidr object itself. + */ + public NsgCidr withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the destinationPortRange property: Destination port range to specify particular destination ports for TCP + * rules. + * + * @return the destinationPortRange value. + */ + public PortRange destinationPortRange() { + return this.destinationPortRange; + } + + /** + * Set the destinationPortRange property: Destination port range to specify particular destination ports for TCP + * rules. + * + * @param destinationPortRange the destinationPortRange value to set. + * @return the NsgCidr object itself. + */ + public NsgCidr withDestinationPortRange(PortRange destinationPortRange) { + this.destinationPortRange = destinationPortRange; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (source() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property source in model NsgCidr")); + } + if (destinationPortRange() != null) { + destinationPortRange().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NsgCidr.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Objective.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Objective.java new file mode 100644 index 000000000000..86f1fe900abd --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Objective.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Objective enum. + */ +public final class Objective extends ExpandableStringEnum { + /** + * Static value LowLatency for Objective. + */ + public static final Objective LOW_LATENCY = fromString("LowLatency"); + + /** + * Static value HighThroughput for Objective. + */ + public static final Objective HIGH_THROUGHPUT = fromString("HighThroughput"); + + /** + * Static value Balanced for Objective. + */ + public static final Objective BALANCED = fromString("Balanced"); + + /** + * Static value Auto for Objective. + */ + public static final Objective AUTO = fromString("Auto"); + + /** + * Static value Basic for Objective. + */ + public static final Objective BASIC = fromString("Basic"); + + /** + * Creates a new instance of Objective value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Objective() { + } + + /** + * Creates or finds a Objective from its string representation. + * + * @param name a name to look for. + * @return the corresponding Objective. + */ + @JsonCreator + public static Objective fromString(String name) { + return fromString(name, Objective.class); + } + + /** + * Gets known Objective values. + * + * @return known Objective values. + */ + public static Collection values() { + return values(Objective.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OpenModeType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OpenModeType.java new file mode 100644 index 000000000000..7e9910c111c8 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OpenModeType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * OpenModeType enum. + */ +public final class OpenModeType extends ExpandableStringEnum { + /** + * Static value ReadOnly for OpenModeType. + */ + public static final OpenModeType READ_ONLY = fromString("ReadOnly"); + + /** + * Static value ReadWrite for OpenModeType. + */ + public static final OpenModeType READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of OpenModeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OpenModeType() { + } + + /** + * Creates or finds a OpenModeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OpenModeType. + */ + @JsonCreator + public static OpenModeType fromString(String name) { + return fromString(name, OpenModeType.class); + } + + /** + * Gets known OpenModeType values. + * + * @return known OpenModeType values. + */ + public static Collection values() { + return values(OpenModeType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Operation.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Operation.java new file mode 100644 index 000000000000..ac12408c9779 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Operation.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.resourcemanager.oracle.fluent.models.OperationInner; + +/** + * An immutable client-side representation of Operation. + */ +public interface Operation { + /** + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. + */ + OperationDisplay display(); + + /** + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. + */ + Origin origin(); + + /** + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. + */ + ActionType actionType(); + + /** + * Gets the inner com.azure.resourcemanager.oracle.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationDisplay.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationDisplay.java new file mode 100644 index 000000000000..02abddc6ca67 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationDisplay.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Localized display information for this particular operation. + */ +@Immutable +public final class OperationDisplay { + /* + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + */ + @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) + private String resource; + + /* + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + */ + @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Creates an instance of OperationDisplay class. + */ + public OperationDisplay() { + } + + /** + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationListResult.java new file mode 100644 index 000000000000..698983dfefd9 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationListResult.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.oracle.fluent.models.OperationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + * results. + */ +@Immutable +public final class OperationListResult { + /* + * List of operations supported by the resource provider + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of OperationListResult class. + */ + public OperationListResult() { + } + + /** + * Get the value property: List of operations supported by the resource provider. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Operations.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Operations.java new file mode 100644 index 000000000000..d90d474f36b7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Operations.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Operations. + */ +public interface Operations { + /** + * List the operations for the provider. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List the operations for the provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationsInsightsStatusType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationsInsightsStatusType.java new file mode 100644 index 000000000000..b986b07b3803 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OperationsInsightsStatusType.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * OperationsInsightsStatusType enum. + */ +public final class OperationsInsightsStatusType extends ExpandableStringEnum { + /** + * Static value Enabling for OperationsInsightsStatusType. + */ + public static final OperationsInsightsStatusType ENABLING = fromString("Enabling"); + + /** + * Static value Enabled for OperationsInsightsStatusType. + */ + public static final OperationsInsightsStatusType ENABLED = fromString("Enabled"); + + /** + * Static value Disabling for OperationsInsightsStatusType. + */ + public static final OperationsInsightsStatusType DISABLING = fromString("Disabling"); + + /** + * Static value NotEnabled for OperationsInsightsStatusType. + */ + public static final OperationsInsightsStatusType NOT_ENABLED = fromString("NotEnabled"); + + /** + * Static value FailedEnabling for OperationsInsightsStatusType. + */ + public static final OperationsInsightsStatusType FAILED_ENABLING = fromString("FailedEnabling"); + + /** + * Static value FailedDisabling for OperationsInsightsStatusType. + */ + public static final OperationsInsightsStatusType FAILED_DISABLING = fromString("FailedDisabling"); + + /** + * Creates a new instance of OperationsInsightsStatusType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OperationsInsightsStatusType() { + } + + /** + * Creates or finds a OperationsInsightsStatusType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperationsInsightsStatusType. + */ + @JsonCreator + public static OperationsInsightsStatusType fromString(String name) { + return fromString(name, OperationsInsightsStatusType.class); + } + + /** + * Gets known OperationsInsightsStatusType values. + * + * @return known OperationsInsightsStatusType values. + */ + public static Collection values() { + return values(OperationsInsightsStatusType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscription.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscription.java new file mode 100644 index 000000000000..3df744ba7784 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscription.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; + +/** + * An immutable client-side representation of OracleSubscription. + */ +public interface OracleSubscription { + /** + * 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. + */ + OracleSubscriptionProperties properties(); + + /** + * Gets the plan property: Details of the resource plan. + * + * @return the plan value. + */ + Plan plan(); + + /** + * 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.oracle.fluent.models.OracleSubscriptionInner object. + * + * @return the inner object. + */ + OracleSubscriptionInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionListResult.java new file mode 100644 index 000000000000..274974f98448 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a OracleSubscription list operation. + */ +@Fluent +public final class OracleSubscriptionListResult { + /* + * The OracleSubscription items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of OracleSubscriptionListResult class. + */ + public OracleSubscriptionListResult() { + } + + /** + * Get the value property: The OracleSubscription items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The OracleSubscription items on this page. + * + * @param value the value value to set. + * @return the OracleSubscriptionListResult object itself. + */ + public OracleSubscriptionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 OracleSubscriptionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OracleSubscriptionListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionProperties.java new file mode 100644 index 000000000000..d4aacf83af8b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionProperties.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.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Oracle Subscription resource model. + */ +@Fluent +public final class OracleSubscriptionProperties { + /* + * OracleSubscriptionProvisioningState provisioning state + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private OracleSubscriptionProvisioningState provisioningState; + + /* + * SAAS subscription ID generated by Marketplace + */ + @JsonProperty(value = "saasSubscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String saasSubscriptionId; + + /* + * Cloud Account Id + */ + @JsonProperty(value = "cloudAccountId", access = JsonProperty.Access.WRITE_ONLY) + private String cloudAccountId; + + /* + * Cloud Account provisioning state. + */ + @JsonProperty(value = "cloudAccountState", access = JsonProperty.Access.WRITE_ONLY) + private CloudAccountProvisioningState cloudAccountState; + + /* + * Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + */ + @JsonProperty(value = "termUnit") + private String termUnit; + + /* + * Product code for the term unit + */ + @JsonProperty(value = "productCode") + private String productCode; + + /* + * Intent for the update operation + */ + @JsonProperty(value = "intent") + private Intent intent; + + /** + * Creates an instance of OracleSubscriptionProperties class. + */ + public OracleSubscriptionProperties() { + } + + /** + * Get the provisioningState property: OracleSubscriptionProvisioningState provisioning state. + * + * @return the provisioningState value. + */ + public OracleSubscriptionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the saasSubscriptionId property: SAAS subscription ID generated by Marketplace. + * + * @return the saasSubscriptionId value. + */ + public String saasSubscriptionId() { + return this.saasSubscriptionId; + } + + /** + * Get the cloudAccountId property: Cloud Account Id. + * + * @return the cloudAccountId value. + */ + public String cloudAccountId() { + return this.cloudAccountId; + } + + /** + * Get the cloudAccountState property: Cloud Account provisioning state. + * + * @return the cloudAccountState value. + */ + public CloudAccountProvisioningState cloudAccountState() { + return this.cloudAccountState; + } + + /** + * Get the termUnit property: Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. + * + * @return the termUnit value. + */ + public String termUnit() { + return this.termUnit; + } + + /** + * Set the termUnit property: Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. + * + * @param termUnit the termUnit value to set. + * @return the OracleSubscriptionProperties object itself. + */ + public OracleSubscriptionProperties withTermUnit(String termUnit) { + this.termUnit = termUnit; + return this; + } + + /** + * Get the productCode property: Product code for the term unit. + * + * @return the productCode value. + */ + public String productCode() { + return this.productCode; + } + + /** + * Set the productCode property: Product code for the term unit. + * + * @param productCode the productCode value to set. + * @return the OracleSubscriptionProperties object itself. + */ + public OracleSubscriptionProperties withProductCode(String productCode) { + this.productCode = productCode; + return this; + } + + /** + * Get the intent property: Intent for the update operation. + * + * @return the intent value. + */ + public Intent intent() { + return this.intent; + } + + /** + * Set the intent property: Intent for the update operation. + * + * @param intent the intent value to set. + * @return the OracleSubscriptionProperties object itself. + */ + public OracleSubscriptionProperties withIntent(Intent intent) { + this.intent = intent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionProvisioningState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionProvisioningState.java new file mode 100644 index 000000000000..22c1f53fc6f0 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionProvisioningState.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * OracleSubscriptionProvisioningState enum. + */ +public final class OracleSubscriptionProvisioningState + extends ExpandableStringEnum { + /** + * Static value Succeeded for OracleSubscriptionProvisioningState. + */ + public static final OracleSubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for OracleSubscriptionProvisioningState. + */ + public static final OracleSubscriptionProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for OracleSubscriptionProvisioningState. + */ + public static final OracleSubscriptionProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of OracleSubscriptionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OracleSubscriptionProvisioningState() { + } + + /** + * Creates or finds a OracleSubscriptionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding OracleSubscriptionProvisioningState. + */ + @JsonCreator + public static OracleSubscriptionProvisioningState fromString(String name) { + return fromString(name, OracleSubscriptionProvisioningState.class); + } + + /** + * Gets known OracleSubscriptionProvisioningState values. + * + * @return known OracleSubscriptionProvisioningState values. + */ + public static Collection values() { + return values(OracleSubscriptionProvisioningState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionUpdate.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionUpdate.java new file mode 100644 index 000000000000..bd1ea3fd5ad7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionUpdate.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The type used for update operations of the OracleSubscription. + */ +@Fluent +public final class OracleSubscriptionUpdate { + /* + * Details of the resource plan. + */ + @JsonProperty(value = "plan") + private ResourcePlanTypeUpdate plan; + + /* + * The updatable properties of the OracleSubscription. + */ + @JsonProperty(value = "properties") + private OracleSubscriptionUpdateProperties properties; + + /** + * Creates an instance of OracleSubscriptionUpdate class. + */ + public OracleSubscriptionUpdate() { + } + + /** + * Get the plan property: Details of the resource plan. + * + * @return the plan value. + */ + public ResourcePlanTypeUpdate plan() { + return this.plan; + } + + /** + * Set the plan property: Details of the resource plan. + * + * @param plan the plan value to set. + * @return the OracleSubscriptionUpdate object itself. + */ + public OracleSubscriptionUpdate withPlan(ResourcePlanTypeUpdate plan) { + this.plan = plan; + return this; + } + + /** + * Get the properties property: The updatable properties of the OracleSubscription. + * + * @return the properties value. + */ + public OracleSubscriptionUpdateProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of the OracleSubscription. + * + * @param properties the properties value to set. + * @return the OracleSubscriptionUpdate object itself. + */ + public OracleSubscriptionUpdate withProperties(OracleSubscriptionUpdateProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plan() != null) { + plan().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionUpdateProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionUpdateProperties.java new file mode 100644 index 000000000000..1570f4ed6267 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptionUpdateProperties.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The updatable properties of the OracleSubscription. + */ +@Fluent +public final class OracleSubscriptionUpdateProperties { + /* + * Product code for the term unit + */ + @JsonProperty(value = "productCode") + private String productCode; + + /* + * Intent for the update operation + */ + @JsonProperty(value = "intent") + private Intent intent; + + /** + * Creates an instance of OracleSubscriptionUpdateProperties class. + */ + public OracleSubscriptionUpdateProperties() { + } + + /** + * Get the productCode property: Product code for the term unit. + * + * @return the productCode value. + */ + public String productCode() { + return this.productCode; + } + + /** + * Set the productCode property: Product code for the term unit. + * + * @param productCode the productCode value to set. + * @return the OracleSubscriptionUpdateProperties object itself. + */ + public OracleSubscriptionUpdateProperties withProductCode(String productCode) { + this.productCode = productCode; + return this; + } + + /** + * Get the intent property: Intent for the update operation. + * + * @return the intent value. + */ + public Intent intent() { + return this.intent; + } + + /** + * Set the intent property: Intent for the update operation. + * + * @param intent the intent value to set. + * @return the OracleSubscriptionUpdateProperties object itself. + */ + public OracleSubscriptionUpdateProperties withIntent(Intent intent) { + this.intent = intent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptions.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptions.java new file mode 100644 index 000000000000..1c1d476d9b36 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/OracleSubscriptions.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.oracle.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; + +/** + * Resource collection API of OracleSubscriptions. + */ +public interface OracleSubscriptions { + /** + * List OracleSubscription 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 OracleSubscription list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List OracleSubscription 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 OracleSubscription list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription along with {@link Response}. + */ + Response getWithResponse(Context context); + + /** + * Get a OracleSubscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a OracleSubscription. + */ + OracleSubscription get(); + + /** + * Create a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + OracleSubscription createOrUpdate(OracleSubscriptionInner resource); + + /** + * Create a OracleSubscription. + * + * @param resource Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition. + */ + OracleSubscription createOrUpdate(OracleSubscriptionInner resource, Context context); + + /** + * Update a OracleSubscription. + * + * @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 oracleSubscription resource definition. + */ + OracleSubscription update(OracleSubscriptionUpdate properties); + + /** + * Update a OracleSubscription. + * + * @param properties The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return oracleSubscription resource definition. + */ + OracleSubscription update(OracleSubscriptionUpdate properties, Context context); + + /** + * Delete a OracleSubscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(); + + /** + * Delete a OracleSubscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(Context context); + + /** + * List Activation Links. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model. + */ + ActivationLinks listActivationLinks(); + + /** + * List Activation Links. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return activation Links model. + */ + ActivationLinks listActivationLinks(Context context); + + /** + * List Cloud Account Details. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model. + */ + CloudAccountDetails listCloudAccountDetails(); + + /** + * List Cloud Account Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cloud Account Details model. + */ + CloudAccountDetails listCloudAccountDetails(Context context); + + /** + * List Saas Subscription Details. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model. + */ + SaasSubscriptionDetails listSaasSubscriptionDetails(); + + /** + * List Saas Subscription Details. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return saaS Subscription Details model. + */ + SaasSubscriptionDetails listSaasSubscriptionDetails(Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Origin.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Origin.java new file mode 100644 index 000000000000..ff060cde3e60 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Origin.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** + * Static value user for Origin. + */ + public static final Origin USER = fromString("user"); + + /** + * Static value system for Origin. + */ + public static final Origin SYSTEM = fromString("system"); + + /** + * Static value user,system for Origin. + */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PatchingMode.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PatchingMode.java new file mode 100644 index 000000000000..fba89208fb16 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PatchingMode.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * PatchingMode enum. + */ +public final class PatchingMode extends ExpandableStringEnum { + /** + * Static value Rolling for PatchingMode. + */ + public static final PatchingMode ROLLING = fromString("Rolling"); + + /** + * Static value NonRolling for PatchingMode. + */ + public static final PatchingMode NON_ROLLING = fromString("NonRolling"); + + /** + * Creates a new instance of PatchingMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchingMode() { + } + + /** + * Creates or finds a PatchingMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchingMode. + */ + @JsonCreator + public static PatchingMode fromString(String name) { + return fromString(name, PatchingMode.class); + } + + /** + * Gets known PatchingMode values. + * + * @return known PatchingMode values. + */ + public static Collection values() { + return values(PatchingMode.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PeerDbDetails.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PeerDbDetails.java new file mode 100644 index 000000000000..1084a80e2ec8 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PeerDbDetails.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.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * PeerDb Details. + */ +@Fluent +public final class PeerDbDetails { + /* + * The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + */ + @JsonProperty(value = "peerDbId") + private String peerDbId; + + /** + * Creates an instance of PeerDbDetails class. + */ + public PeerDbDetails() { + } + + /** + * Get the peerDbId property: The database OCID of the Disaster Recovery peer database, which is located in a + * different region from the current peer database. + * + * @return the peerDbId value. + */ + public String peerDbId() { + return this.peerDbId; + } + + /** + * Set the peerDbId property: The database OCID 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. + * @return the PeerDbDetails object itself. + */ + public PeerDbDetails withPeerDbId(String peerDbId) { + this.peerDbId = peerDbId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PermissionLevelType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PermissionLevelType.java new file mode 100644 index 000000000000..0a4d83392ced --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PermissionLevelType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * PermissionLevelType enum. + */ +public final class PermissionLevelType extends ExpandableStringEnum { + /** + * Static value Restricted for PermissionLevelType. + */ + public static final PermissionLevelType RESTRICTED = fromString("Restricted"); + + /** + * Static value Unrestricted for PermissionLevelType. + */ + public static final PermissionLevelType UNRESTRICTED = fromString("Unrestricted"); + + /** + * Creates a new instance of PermissionLevelType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PermissionLevelType() { + } + + /** + * Creates or finds a PermissionLevelType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PermissionLevelType. + */ + @JsonCreator + public static PermissionLevelType fromString(String name) { + return fromString(name, PermissionLevelType.class); + } + + /** + * Gets known PermissionLevelType values. + * + * @return known PermissionLevelType values. + */ + public static Collection values() { + return values(PermissionLevelType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Plan.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Plan.java new file mode 100644 index 000000000000..7b92f6dabca7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Plan.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Plan for the resource. + */ +@Fluent +public final class Plan { + /* + * A user defined name of the 3rd Party Artifact that is being procured. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + */ + @JsonProperty(value = "publisher", required = true) + private String publisher; + + /* + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. + */ + @JsonProperty(value = "product", required = true) + private String product; + + /* + * A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + */ + @JsonProperty(value = "promotionCode") + private String promotionCode; + + /* + * The version of the desired product/artifact. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Creates an instance of Plan class. + */ + public Plan() { + } + + /** + * Get the name property: A user defined name of the 3rd Party Artifact that is being procured. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: A user defined name of the 3rd Party Artifact that is being procured. + * + * @param name the name value to set. + * @return the Plan object itself. + */ + public Plan withName(String name) { + this.name = name; + return this; + } + + /** + * Get the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + * + * @param publisher the publisher value to set. + * @return the Plan object itself. + */ + public Plan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the + * OfferID specified for the artifact at the time of Data Market onboarding. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the + * OfferID specified for the artifact at the time of Data Market onboarding. + * + * @param product the product value to set. + * @return the Plan object itself. + */ + public Plan withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + * + * @return the promotionCode value. + */ + public String promotionCode() { + return this.promotionCode; + } + + /** + * Set the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + * + * @param promotionCode the promotionCode value to set. + * @return the Plan object itself. + */ + public Plan withPromotionCode(String promotionCode) { + this.promotionCode = promotionCode; + return this; + } + + /** + * Get the version property: The version of the desired product/artifact. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of the desired product/artifact. + * + * @param version the version value to set. + * @return the Plan object itself. + */ + public Plan withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Plan")); + } + if (publisher() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property publisher in model Plan")); + } + if (product() == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property product in model Plan")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Plan.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PortRange.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PortRange.java new file mode 100644 index 000000000000..7ab2c2a37d62 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PortRange.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Port Range to specify particular destination ports for TCP rules. + */ +@Fluent +public final class PortRange { + /* + * The minimum port number, which must not be greater than the maximum port number. + */ + @JsonProperty(value = "min", required = true) + private int min; + + /* + * The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value. + */ + @JsonProperty(value = "max", required = true) + private int max; + + /** + * Creates an instance of PortRange class. + */ + public PortRange() { + } + + /** + * Get the min property: The minimum port number, which must not be greater than the maximum port number. + * + * @return the min value. + */ + public int min() { + return this.min; + } + + /** + * Set the min property: The minimum port number, which must not be greater than the maximum port number. + * + * @param min the min value to set. + * @return the PortRange object itself. + */ + public PortRange withMin(int min) { + this.min = min; + return this; + } + + /** + * Get the max property: The maximum port number, which must not be less than the minimum port number. To specify a + * single port number, set both the min and max to the same value. + * + * @return the max value. + */ + public int max() { + return this.max; + } + + /** + * Set the max property: The maximum port number, which must not be less than the minimum port number. To specify a + * single port number, set both the min and max to the same value. + * + * @param max the max value to set. + * @return the PortRange object itself. + */ + public PortRange withMax(int max) { + this.max = max; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Preference.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Preference.java new file mode 100644 index 000000000000..bd22614211da --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/Preference.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Preference enum. + */ +public final class Preference extends ExpandableStringEnum { + /** + * Static value NoPreference for Preference. + */ + public static final Preference NO_PREFERENCE = fromString("NoPreference"); + + /** + * Static value CustomPreference for Preference. + */ + public static final Preference CUSTOM_PREFERENCE = fromString("CustomPreference"); + + /** + * Creates a new instance of Preference value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Preference() { + } + + /** + * Creates or finds a Preference from its string representation. + * + * @param name a name to look for. + * @return the corresponding Preference. + */ + @JsonCreator + public static Preference fromString(String name) { + return fromString(name, Preference.class); + } + + /** + * Gets known Preference values. + * + * @return known Preference values. + */ + public static Collection values() { + return values(Preference.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PrivateIpAddressProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PrivateIpAddressProperties.java new file mode 100644 index 000000000000..6889ce4ef11a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PrivateIpAddressProperties.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.resourcemanager.oracle.fluent.models.PrivateIpAddressPropertiesInner; + +/** + * An immutable client-side representation of PrivateIpAddressProperties. + */ +public interface PrivateIpAddressProperties { + /** + * Gets the displayName property: PrivateIpAddresses displayName. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the hostnameLabel property: PrivateIpAddresses hostnameLabel. + * + * @return the hostnameLabel value. + */ + String hostnameLabel(); + + /** + * Gets the ocid property: PrivateIpAddresses Id. + * + * @return the ocid value. + */ + String ocid(); + + /** + * Gets the ipAddress property: PrivateIpAddresses ipAddress. + * + * @return the ipAddress value. + */ + String ipAddress(); + + /** + * Gets the subnetId property: PrivateIpAddresses subnetId. + * + * @return the subnetId value. + */ + String subnetId(); + + /** + * Gets the inner com.azure.resourcemanager.oracle.fluent.models.PrivateIpAddressPropertiesInner object. + * + * @return the inner object. + */ + PrivateIpAddressPropertiesInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PrivateIpAddressesFilter.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PrivateIpAddressesFilter.java new file mode 100644 index 000000000000..04bba90cf71d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/PrivateIpAddressesFilter.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Private Ip Addresses filter. + */ +@Fluent +public final class PrivateIpAddressesFilter { + /* + * Subnet OCID + */ + @JsonProperty(value = "subnetId", required = true) + private String subnetId; + + /* + * VCN OCID + */ + @JsonProperty(value = "vnicId", required = true) + private String vnicId; + + /** + * Creates an instance of PrivateIpAddressesFilter class. + */ + public PrivateIpAddressesFilter() { + } + + /** + * Get the subnetId property: Subnet OCID. + * + * @return the subnetId value. + */ + public String subnetId() { + return this.subnetId; + } + + /** + * Set the subnetId property: Subnet OCID. + * + * @param subnetId the subnetId value to set. + * @return the PrivateIpAddressesFilter object itself. + */ + public PrivateIpAddressesFilter withSubnetId(String subnetId) { + this.subnetId = subnetId; + return this; + } + + /** + * Get the vnicId property: VCN OCID. + * + * @return the vnicId value. + */ + public String vnicId() { + return this.vnicId; + } + + /** + * Set the vnicId property: VCN OCID. + * + * @param vnicId the vnicId value to set. + * @return the PrivateIpAddressesFilter object itself. + */ + public PrivateIpAddressesFilter withVnicId(String vnicId) { + this.vnicId = vnicId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnetId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property subnetId in model PrivateIpAddressesFilter")); + } + if (vnicId() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property vnicId in model PrivateIpAddressesFilter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateIpAddressesFilter.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ProfileType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ProfileType.java new file mode 100644 index 000000000000..de742175d6e6 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ProfileType.java @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The connection string profile to allow clients to group, filter and select connection string values based on + * structured metadata. + */ +@Fluent +public final class ProfileType { + /* + * Consumer group used by the connection. + */ + @JsonProperty(value = "consumerGroup") + private ConsumerGroup consumerGroup; + + /* + * A user-friendly name for the connection. + */ + @JsonProperty(value = "displayName", required = true) + private String displayName; + + /* + * Host format used in connection string. + */ + @JsonProperty(value = "hostFormat", required = true) + private HostFormatType hostFormat; + + /* + * True for a regional connection string, applicable to cross-region DG only. + */ + @JsonProperty(value = "isRegional") + private Boolean isRegional; + + /* + * Protocol used by the connection. + */ + @JsonProperty(value = "protocol", required = true) + private ProtocolType protocol; + + /* + * Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + */ + @JsonProperty(value = "sessionMode", required = true) + private SessionModeType sessionMode; + + /* + * Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. + */ + @JsonProperty(value = "syntaxFormat", required = true) + private SyntaxFormatType syntaxFormat; + + /* + * Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + */ + @JsonProperty(value = "tlsAuthentication") + private TlsAuthenticationType tlsAuthentication; + + /* + * Connection string value. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * Creates an instance of ProfileType class. + */ + public ProfileType() { + } + + /** + * Get the consumerGroup property: Consumer group used by the connection. + * + * @return the consumerGroup value. + */ + public ConsumerGroup consumerGroup() { + return this.consumerGroup; + } + + /** + * Set the consumerGroup property: Consumer group used by the connection. + * + * @param consumerGroup the consumerGroup value to set. + * @return the ProfileType object itself. + */ + public ProfileType withConsumerGroup(ConsumerGroup consumerGroup) { + this.consumerGroup = consumerGroup; + return this; + } + + /** + * Get the displayName property: A user-friendly name for the connection. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: A user-friendly name for the connection. + * + * @param displayName the displayName value to set. + * @return the ProfileType object itself. + */ + public ProfileType withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the hostFormat property: Host format used in connection string. + * + * @return the hostFormat value. + */ + public HostFormatType hostFormat() { + return this.hostFormat; + } + + /** + * Set the hostFormat property: Host format used in connection string. + * + * @param hostFormat the hostFormat value to set. + * @return the ProfileType object itself. + */ + public ProfileType withHostFormat(HostFormatType hostFormat) { + this.hostFormat = hostFormat; + return this; + } + + /** + * Get the isRegional property: True for a regional connection string, applicable to cross-region DG only. + * + * @return the isRegional value. + */ + public Boolean isRegional() { + return this.isRegional; + } + + /** + * Set the isRegional property: True for a regional connection string, applicable to cross-region DG only. + * + * @param isRegional the isRegional value to set. + * @return the ProfileType object itself. + */ + public ProfileType withIsRegional(Boolean isRegional) { + this.isRegional = isRegional; + return this; + } + + /** + * Get the protocol property: Protocol used by the connection. + * + * @return the protocol value. + */ + public ProtocolType protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Protocol used by the connection. + * + * @param protocol the protocol value to set. + * @return the ProfileType object itself. + */ + public ProfileType withProtocol(ProtocolType protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the sessionMode property: Specifies whether the listener performs a direct hand-off of the session, or + * redirects the session. + * + * @return the sessionMode value. + */ + public SessionModeType sessionMode() { + return this.sessionMode; + } + + /** + * Set the sessionMode property: Specifies whether the listener performs a direct hand-off of the session, or + * redirects the session. + * + * @param sessionMode the sessionMode value to set. + * @return the ProfileType object itself. + */ + public ProfileType withSessionMode(SessionModeType sessionMode) { + this.sessionMode = sessionMode; + return this; + } + + /** + * Get the syntaxFormat property: Specifies whether the connection string is using the long (LONG), Easy Connect + * (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. + * + * @return the syntaxFormat value. + */ + public SyntaxFormatType syntaxFormat() { + return this.syntaxFormat; + } + + /** + * Set the syntaxFormat property: Specifies whether the connection string is using the long (LONG), Easy Connect + * (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. + * + * @param syntaxFormat the syntaxFormat value to set. + * @return the ProfileType object itself. + */ + public ProfileType withSyntaxFormat(SyntaxFormatType syntaxFormat) { + this.syntaxFormat = syntaxFormat; + return this; + } + + /** + * Get the tlsAuthentication property: Specifies whether the TLS handshake is using one-way (SERVER) or mutual + * (MUTUAL) authentication. + * + * @return the tlsAuthentication value. + */ + public TlsAuthenticationType tlsAuthentication() { + return this.tlsAuthentication; + } + + /** + * Set the tlsAuthentication property: Specifies whether the TLS handshake is using one-way (SERVER) or mutual + * (MUTUAL) authentication. + * + * @param tlsAuthentication the tlsAuthentication value to set. + * @return the ProfileType object itself. + */ + public ProfileType withTlsAuthentication(TlsAuthenticationType tlsAuthentication) { + this.tlsAuthentication = tlsAuthentication; + return this; + } + + /** + * Get the value property: Connection string value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Connection string value. + * + * @param value the value value to set. + * @return the ProfileType object itself. + */ + public ProfileType withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @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 ProfileType")); + } + if (hostFormat() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property hostFormat in model ProfileType")); + } + if (protocol() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property protocol in model ProfileType")); + } + if (sessionMode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property sessionMode in model ProfileType")); + } + if (syntaxFormat() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property syntaxFormat in model ProfileType")); + } + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ProfileType")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ProfileType.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ProtocolType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ProtocolType.java new file mode 100644 index 000000000000..fa1f1c391cb7 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ProtocolType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * ProtocolType enum. + */ +public final class ProtocolType extends ExpandableStringEnum { + /** + * Static value TCP for ProtocolType. + */ + public static final ProtocolType TCP = fromString("TCP"); + + /** + * Static value TCPS for ProtocolType. + */ + public static final ProtocolType TCPS = fromString("TCPS"); + + /** + * Creates a new instance of ProtocolType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProtocolType() { + } + + /** + * Creates or finds a ProtocolType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProtocolType. + */ + @JsonCreator + public static ProtocolType fromString(String name) { + return fromString(name, ProtocolType.class); + } + + /** + * Gets known ProtocolType values. + * + * @return known ProtocolType values. + */ + public static Collection values() { + return values(ProtocolType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RefreshableModelType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RefreshableModelType.java new file mode 100644 index 000000000000..5d8c1c1e060d --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RefreshableModelType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * RefreshableModelType enum. + */ +public final class RefreshableModelType extends ExpandableStringEnum { + /** + * Static value Automatic for RefreshableModelType. + */ + public static final RefreshableModelType AUTOMATIC = fromString("Automatic"); + + /** + * Static value Manual for RefreshableModelType. + */ + public static final RefreshableModelType MANUAL = fromString("Manual"); + + /** + * Creates a new instance of RefreshableModelType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RefreshableModelType() { + } + + /** + * Creates or finds a RefreshableModelType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RefreshableModelType. + */ + @JsonCreator + public static RefreshableModelType fromString(String name) { + return fromString(name, RefreshableModelType.class); + } + + /** + * Gets known RefreshableModelType values. + * + * @return known RefreshableModelType values. + */ + public static Collection values() { + return values(RefreshableModelType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RefreshableStatusType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RefreshableStatusType.java new file mode 100644 index 000000000000..79c8e339bec6 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RefreshableStatusType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * RefreshableStatusType enum. + */ +public final class RefreshableStatusType extends ExpandableStringEnum { + /** + * Static value Refreshing for RefreshableStatusType. + */ + public static final RefreshableStatusType REFRESHING = fromString("Refreshing"); + + /** + * Static value NotRefreshing for RefreshableStatusType. + */ + public static final RefreshableStatusType NOT_REFRESHING = fromString("NotRefreshing"); + + /** + * Creates a new instance of RefreshableStatusType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RefreshableStatusType() { + } + + /** + * Creates or finds a RefreshableStatusType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RefreshableStatusType. + */ + @JsonCreator + public static RefreshableStatusType fromString(String name) { + return fromString(name, RefreshableStatusType.class); + } + + /** + * Gets known RefreshableStatusType values. + * + * @return known RefreshableStatusType values. + */ + public static Collection values() { + return values(RefreshableStatusType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ResourcePlanTypeUpdate.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ResourcePlanTypeUpdate.java new file mode 100644 index 000000000000..e5adb80e22fb --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ResourcePlanTypeUpdate.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * ResourcePlanTypeUpdate model definition. + */ +@Fluent +public final class ResourcePlanTypeUpdate { + /* + * A user defined name of the 3rd Party Artifact that is being procured. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + */ + @JsonProperty(value = "publisher") + private String publisher; + + /* + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. + */ + @JsonProperty(value = "product") + private String product; + + /* + * A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + */ + @JsonProperty(value = "promotionCode") + private String promotionCode; + + /* + * The version of the desired product/artifact. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Creates an instance of ResourcePlanTypeUpdate class. + */ + public ResourcePlanTypeUpdate() { + } + + /** + * Get the name property: A user defined name of the 3rd Party Artifact that is being procured. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: A user defined name of the 3rd Party Artifact that is being procured. + * + * @param name the name value to set. + * @return the ResourcePlanTypeUpdate object itself. + */ + public ResourcePlanTypeUpdate withName(String name) { + this.name = name; + return this; + } + + /** + * Get the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + * + * @param publisher the publisher value to set. + * @return the ResourcePlanTypeUpdate object itself. + */ + public ResourcePlanTypeUpdate withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the + * OfferID specified for the artifact at the time of Data Market onboarding. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the + * OfferID specified for the artifact at the time of Data Market onboarding. + * + * @param product the product value to set. + * @return the ResourcePlanTypeUpdate object itself. + */ + public ResourcePlanTypeUpdate withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + * + * @return the promotionCode value. + */ + public String promotionCode() { + return this.promotionCode; + } + + /** + * Set the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + * + * @param promotionCode the promotionCode value to set. + * @return the ResourcePlanTypeUpdate object itself. + */ + public ResourcePlanTypeUpdate withPromotionCode(String promotionCode) { + this.promotionCode = promotionCode; + return this; + } + + /** + * Get the version property: The version of the desired product/artifact. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of the desired product/artifact. + * + * @param version the version value to set. + * @return the ResourcePlanTypeUpdate object itself. + */ + public ResourcePlanTypeUpdate withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ResourceProvisioningState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ResourceProvisioningState.java new file mode 100644 index 000000000000..0ffcc156d97b --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ResourceProvisioningState.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The provisioning state of a resource type. + */ +public final class ResourceProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ResourceProvisioningState. + */ + public static final ResourceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ResourceProvisioningState. + */ + public static final ResourceProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ResourceProvisioningState. + */ + public static final ResourceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ResourceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceProvisioningState() { + } + + /** + * Creates or finds a ResourceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceProvisioningState. + */ + @JsonCreator + public static ResourceProvisioningState fromString(String name) { + return fromString(name, ResourceProvisioningState.class); + } + + /** + * Gets known ResourceProvisioningState values. + * + * @return known ResourceProvisioningState values. + */ + public static Collection values() { + return values(ResourceProvisioningState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RoleType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RoleType.java new file mode 100644 index 000000000000..258e8dc9dfe9 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/RoleType.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * RoleType enum. + */ +public final class RoleType extends ExpandableStringEnum { + /** + * Static value Primary for RoleType. + */ + public static final RoleType PRIMARY = fromString("Primary"); + + /** + * Static value Standby for RoleType. + */ + public static final RoleType STANDBY = fromString("Standby"); + + /** + * Static value DisabledStandby for RoleType. + */ + public static final RoleType DISABLED_STANDBY = fromString("DisabledStandby"); + + /** + * Static value BackupCopy for RoleType. + */ + public static final RoleType BACKUP_COPY = fromString("BackupCopy"); + + /** + * Static value SnapshotStandby for RoleType. + */ + public static final RoleType SNAPSHOT_STANDBY = fromString("SnapshotStandby"); + + /** + * Creates a new instance of RoleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RoleType() { + } + + /** + * Creates or finds a RoleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RoleType. + */ + @JsonCreator + public static RoleType fromString(String name) { + return fromString(name, RoleType.class); + } + + /** + * Gets known RoleType values. + * + * @return known RoleType values. + */ + public static Collection values() { + return values(RoleType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SaasSubscriptionDetails.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SaasSubscriptionDetails.java new file mode 100644 index 000000000000..8243be592e09 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SaasSubscriptionDetails.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.resourcemanager.oracle.fluent.models.SaasSubscriptionDetailsInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of SaasSubscriptionDetails. + */ +public interface SaasSubscriptionDetails { + /** + * Gets the id property: Purchased SaaS subscription ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the subscriptionName property: SaaS subscription name. + * + * @return the subscriptionName value. + */ + String subscriptionName(); + + /** + * Gets the timeCreated property: Creation Date and Time. + * + * @return the timeCreated value. + */ + OffsetDateTime timeCreated(); + + /** + * Gets the offerId property: Purchased offer ID. + * + * @return the offerId value. + */ + String offerId(); + + /** + * Gets the planId property: Purchased offer's plan ID. + * + * @return the planId value. + */ + String planId(); + + /** + * Gets the saasSubscriptionStatus property: Indicates the status of the Subscription. + * + * @return the saasSubscriptionStatus value. + */ + String saasSubscriptionStatus(); + + /** + * Gets the publisherId property: Publisher ID. + * + * @return the publisherId value. + */ + String publisherId(); + + /** + * Gets the purchaserEmailId property: Purchaser Email ID. + * + * @return the purchaserEmailId value. + */ + String purchaserEmailId(); + + /** + * Gets the purchaserTenantId property: Purchaser Tenant ID. + * + * @return the purchaserTenantId value. + */ + String purchaserTenantId(); + + /** + * Gets the termUnit property: Purchase Term Unit. + * + * @return the termUnit value. + */ + String termUnit(); + + /** + * Gets the isAutoRenew property: AutoRenew flag. + * + * @return the isAutoRenew value. + */ + Boolean isAutoRenew(); + + /** + * Gets the isFreeTrial property: FreeTrial flag. + * + * @return the isFreeTrial value. + */ + Boolean isFreeTrial(); + + /** + * Gets the inner com.azure.resourcemanager.oracle.fluent.models.SaasSubscriptionDetailsInner object. + * + * @return the inner object. + */ + SaasSubscriptionDetailsInner innerModel(); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ScheduledOperationsType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ScheduledOperationsType.java new file mode 100644 index 000000000000..2e8ac2bbf6af --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ScheduledOperationsType.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of scheduled operations. + */ +@Fluent +public final class ScheduledOperationsType { + /* + * Day of week + */ + @JsonProperty(value = "dayOfWeek", required = true) + private DayOfWeek dayOfWeek; + + /* + * auto start time. value must be of ISO-8601 format HH:mm + */ + @JsonProperty(value = "scheduledStartTime") + private String scheduledStartTime; + + /* + * auto stop time. value must be of ISO-8601 format HH:mm + */ + @JsonProperty(value = "scheduledStopTime") + private String scheduledStopTime; + + /** + * Creates an instance of ScheduledOperationsType class. + */ + public ScheduledOperationsType() { + } + + /** + * Get the dayOfWeek property: Day of week. + * + * @return the dayOfWeek value. + */ + public DayOfWeek dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Day of week. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the ScheduledOperationsType object itself. + */ + public ScheduledOperationsType withDayOfWeek(DayOfWeek dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Get the scheduledStartTime property: auto start time. value must be of ISO-8601 format HH:mm. + * + * @return the scheduledStartTime value. + */ + public String scheduledStartTime() { + return this.scheduledStartTime; + } + + /** + * Set the scheduledStartTime property: auto start time. value must be of ISO-8601 format HH:mm. + * + * @param scheduledStartTime the scheduledStartTime value to set. + * @return the ScheduledOperationsType object itself. + */ + public ScheduledOperationsType withScheduledStartTime(String scheduledStartTime) { + this.scheduledStartTime = scheduledStartTime; + return this; + } + + /** + * Get the scheduledStopTime property: auto stop time. value must be of ISO-8601 format HH:mm. + * + * @return the scheduledStopTime value. + */ + public String scheduledStopTime() { + return this.scheduledStopTime; + } + + /** + * Set the scheduledStopTime property: auto stop time. value must be of ISO-8601 format HH:mm. + * + * @param scheduledStopTime the scheduledStopTime value to set. + * @return the ScheduledOperationsType object itself. + */ + public ScheduledOperationsType withScheduledStopTime(String scheduledStopTime) { + this.scheduledStopTime = scheduledStopTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dayOfWeek() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property dayOfWeek in model ScheduledOperationsType")); + } else { + dayOfWeek().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScheduledOperationsType.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ScheduledOperationsTypeUpdate.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ScheduledOperationsTypeUpdate.java new file mode 100644 index 000000000000..b3ea59fd7195 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ScheduledOperationsTypeUpdate.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The list of scheduled operations. + */ +@Fluent +public final class ScheduledOperationsTypeUpdate { + /* + * Day of week + */ + @JsonProperty(value = "dayOfWeek") + private DayOfWeekUpdate dayOfWeek; + + /* + * auto start time. value must be of ISO-8601 format HH:mm + */ + @JsonProperty(value = "scheduledStartTime") + private String scheduledStartTime; + + /* + * auto stop time. value must be of ISO-8601 format HH:mm + */ + @JsonProperty(value = "scheduledStopTime") + private String scheduledStopTime; + + /** + * Creates an instance of ScheduledOperationsTypeUpdate class. + */ + public ScheduledOperationsTypeUpdate() { + } + + /** + * Get the dayOfWeek property: Day of week. + * + * @return the dayOfWeek value. + */ + public DayOfWeekUpdate dayOfWeek() { + return this.dayOfWeek; + } + + /** + * Set the dayOfWeek property: Day of week. + * + * @param dayOfWeek the dayOfWeek value to set. + * @return the ScheduledOperationsTypeUpdate object itself. + */ + public ScheduledOperationsTypeUpdate withDayOfWeek(DayOfWeekUpdate dayOfWeek) { + this.dayOfWeek = dayOfWeek; + return this; + } + + /** + * Get the scheduledStartTime property: auto start time. value must be of ISO-8601 format HH:mm. + * + * @return the scheduledStartTime value. + */ + public String scheduledStartTime() { + return this.scheduledStartTime; + } + + /** + * Set the scheduledStartTime property: auto start time. value must be of ISO-8601 format HH:mm. + * + * @param scheduledStartTime the scheduledStartTime value to set. + * @return the ScheduledOperationsTypeUpdate object itself. + */ + public ScheduledOperationsTypeUpdate withScheduledStartTime(String scheduledStartTime) { + this.scheduledStartTime = scheduledStartTime; + return this; + } + + /** + * Get the scheduledStopTime property: auto stop time. value must be of ISO-8601 format HH:mm. + * + * @return the scheduledStopTime value. + */ + public String scheduledStopTime() { + return this.scheduledStopTime; + } + + /** + * Set the scheduledStopTime property: auto stop time. value must be of ISO-8601 format HH:mm. + * + * @param scheduledStopTime the scheduledStopTime value to set. + * @return the ScheduledOperationsTypeUpdate object itself. + */ + public ScheduledOperationsTypeUpdate withScheduledStopTime(String scheduledStopTime) { + this.scheduledStopTime = scheduledStopTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dayOfWeek() != null) { + dayOfWeek().validate(); + } + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SessionModeType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SessionModeType.java new file mode 100644 index 000000000000..2524596b1005 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SessionModeType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * SessionModeType enum. + */ +public final class SessionModeType extends ExpandableStringEnum { + /** + * Static value Direct for SessionModeType. + */ + public static final SessionModeType DIRECT = fromString("Direct"); + + /** + * Static value Redirect for SessionModeType. + */ + public static final SessionModeType REDIRECT = fromString("Redirect"); + + /** + * Creates a new instance of SessionModeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SessionModeType() { + } + + /** + * Creates or finds a SessionModeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SessionModeType. + */ + @JsonCreator + public static SessionModeType fromString(String name) { + return fromString(name, SessionModeType.class); + } + + /** + * Gets known SessionModeType values. + * + * @return known SessionModeType values. + */ + public static Collection values() { + return values(SessionModeType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SourceType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SourceType.java new file mode 100644 index 000000000000..932f12f00b27 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SourceType.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * SourceType enum. + */ +public final class SourceType extends ExpandableStringEnum { + /** + * Static value None for SourceType. + */ + public static final SourceType NONE = fromString("None"); + + /** + * Static value Database for SourceType. + */ + public static final SourceType DATABASE = fromString("Database"); + + /** + * Static value BackupFromId for SourceType. + */ + public static final SourceType BACKUP_FROM_ID = fromString("BackupFromId"); + + /** + * Static value BackupFromTimestamp for SourceType. + */ + public static final SourceType BACKUP_FROM_TIMESTAMP = fromString("BackupFromTimestamp"); + + /** + * Static value CloneToRefreshable for SourceType. + */ + public static final SourceType CLONE_TO_REFRESHABLE = fromString("CloneToRefreshable"); + + /** + * Static value CrossRegionDataguard for SourceType. + */ + public static final SourceType CROSS_REGION_DATAGUARD = fromString("CrossRegionDataguard"); + + /** + * Static value CrossRegionDisasterRecovery for SourceType. + */ + public static final SourceType CROSS_REGION_DISASTER_RECOVERY = fromString("CrossRegionDisasterRecovery"); + + /** + * Creates a new instance of SourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceType() { + } + + /** + * Creates or finds a SourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SourceType. + */ + @JsonCreator + public static SourceType fromString(String name) { + return fromString(name, SourceType.class); + } + + /** + * Gets known SourceType values. + * + * @return known SourceType values. + */ + public static Collection values() { + return values(SourceType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SyntaxFormatType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SyntaxFormatType.java new file mode 100644 index 000000000000..0041d3039852 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/SyntaxFormatType.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * SyntaxFormatType enum. + */ +public final class SyntaxFormatType extends ExpandableStringEnum { + /** + * Static value Long for SyntaxFormatType. + */ + public static final SyntaxFormatType LONG = fromString("Long"); + + /** + * Static value Ezconnect for SyntaxFormatType. + */ + public static final SyntaxFormatType EZCONNECT = fromString("Ezconnect"); + + /** + * Static value Ezconnectplus for SyntaxFormatType. + */ + public static final SyntaxFormatType EZCONNECTPLUS = fromString("Ezconnectplus"); + + /** + * Creates a new instance of SyntaxFormatType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SyntaxFormatType() { + } + + /** + * Creates or finds a SyntaxFormatType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SyntaxFormatType. + */ + @JsonCreator + public static SyntaxFormatType fromString(String name) { + return fromString(name, SyntaxFormatType.class); + } + + /** + * Gets known SyntaxFormatType values. + * + * @return known SyntaxFormatType values. + */ + public static Collection values() { + return values(SyntaxFormatType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/TlsAuthenticationType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/TlsAuthenticationType.java new file mode 100644 index 000000000000..e59dc1ed7dea --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/TlsAuthenticationType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * TlsAuthenticationType enum. + */ +public final class TlsAuthenticationType extends ExpandableStringEnum { + /** + * Static value Server for TlsAuthenticationType. + */ + public static final TlsAuthenticationType SERVER = fromString("Server"); + + /** + * Static value Mutual for TlsAuthenticationType. + */ + public static final TlsAuthenticationType MUTUAL = fromString("Mutual"); + + /** + * Creates a new instance of TlsAuthenticationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TlsAuthenticationType() { + } + + /** + * Creates or finds a TlsAuthenticationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TlsAuthenticationType. + */ + @JsonCreator + public static TlsAuthenticationType fromString(String name) { + return fromString(name, TlsAuthenticationType.class); + } + + /** + * Gets known TlsAuthenticationType values. + * + * @return known TlsAuthenticationType values. + */ + public static Collection values() { + return values(TlsAuthenticationType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddress.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddress.java new file mode 100644 index 000000000000..040fe4b07660 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddress.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.oracle.fluent.models.VirtualNetworkAddressInner; + +/** + * An immutable client-side representation of VirtualNetworkAddress. + */ +public interface VirtualNetworkAddress { + /** + * 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. + */ + VirtualNetworkAddressProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.oracle.fluent.models.VirtualNetworkAddressInner object. + * + * @return the inner object. + */ + VirtualNetworkAddressInner innerModel(); + + /** + * The entirety of the VirtualNetworkAddress definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The VirtualNetworkAddress definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the VirtualNetworkAddress definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the VirtualNetworkAddress definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, cloudvmclustername. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @return the next definition stage. + */ + WithCreate withExistingCloudVmCluster(String resourceGroupName, String cloudvmclustername); + } + + /** + * The stage of the VirtualNetworkAddress 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.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + VirtualNetworkAddress create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VirtualNetworkAddress create(Context context); + } + + /** + * The stage of the VirtualNetworkAddress 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(VirtualNetworkAddressProperties properties); + } + } + + /** + * Begins update for the VirtualNetworkAddress resource. + * + * @return the stage of resource update. + */ + VirtualNetworkAddress.Update update(); + + /** + * The template for VirtualNetworkAddress update. + */ + interface Update { + /** + * Executes the update request. + * + * @return the updated resource. + */ + VirtualNetworkAddress apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + VirtualNetworkAddress apply(Context context); + } + + /** + * The VirtualNetworkAddress update stages. + */ + interface UpdateStages { + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + VirtualNetworkAddress refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + VirtualNetworkAddress refresh(Context context); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressLifecycleState.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressLifecycleState.java new file mode 100644 index 000000000000..edcc420dffa8 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressLifecycleState.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * VirtualNetworkAddressLifecycleState enum. + */ +public final class VirtualNetworkAddressLifecycleState + extends ExpandableStringEnum { + /** + * Static value Provisioning for VirtualNetworkAddressLifecycleState. + */ + public static final VirtualNetworkAddressLifecycleState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Available for VirtualNetworkAddressLifecycleState. + */ + public static final VirtualNetworkAddressLifecycleState AVAILABLE = fromString("Available"); + + /** + * Static value Terminating for VirtualNetworkAddressLifecycleState. + */ + public static final VirtualNetworkAddressLifecycleState TERMINATING = fromString("Terminating"); + + /** + * Static value Terminated for VirtualNetworkAddressLifecycleState. + */ + public static final VirtualNetworkAddressLifecycleState TERMINATED = fromString("Terminated"); + + /** + * Static value Failed for VirtualNetworkAddressLifecycleState. + */ + public static final VirtualNetworkAddressLifecycleState FAILED = fromString("Failed"); + + /** + * Creates a new instance of VirtualNetworkAddressLifecycleState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VirtualNetworkAddressLifecycleState() { + } + + /** + * Creates or finds a VirtualNetworkAddressLifecycleState from its string representation. + * + * @param name a name to look for. + * @return the corresponding VirtualNetworkAddressLifecycleState. + */ + @JsonCreator + public static VirtualNetworkAddressLifecycleState fromString(String name) { + return fromString(name, VirtualNetworkAddressLifecycleState.class); + } + + /** + * Gets known VirtualNetworkAddressLifecycleState values. + * + * @return known VirtualNetworkAddressLifecycleState values. + */ + public static Collection values() { + return values(VirtualNetworkAddressLifecycleState.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressListResult.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressListResult.java new file mode 100644 index 000000000000..1522d1ad92ab --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressListResult.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.oracle.fluent.models.VirtualNetworkAddressInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a VirtualNetworkAddress list operation. + */ +@Fluent +public final class VirtualNetworkAddressListResult { + /* + * The VirtualNetworkAddress items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of VirtualNetworkAddressListResult class. + */ + public VirtualNetworkAddressListResult() { + } + + /** + * Get the value property: The VirtualNetworkAddress items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The VirtualNetworkAddress items on this page. + * + * @param value the value value to set. + * @return the VirtualNetworkAddressListResult object itself. + */ + public VirtualNetworkAddressListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * 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 VirtualNetworkAddressListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkAddressListResult.class); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressProperties.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressProperties.java new file mode 100644 index 000000000000..2ed46d5d7a0f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddressProperties.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * virtualNetworkAddress resource properties. + */ +@Fluent +public final class VirtualNetworkAddressProperties { + /* + * Virtual network Address address. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /* + * Virtual Machine OCID. + */ + @JsonProperty(value = "vmOcid") + private String vmOcid; + + /* + * Application VIP OCID. + */ + @JsonProperty(value = "ocid", access = JsonProperty.Access.WRITE_ONLY) + private String ocid; + + /* + * Virtual network address fully qualified domain name. + */ + @JsonProperty(value = "domain", access = JsonProperty.Access.WRITE_ONLY) + private String domain; + + /* + * Additional information about the current lifecycle state of the application virtual IP (VIP) address. + */ + @JsonProperty(value = "lifecycleDetails", access = JsonProperty.Access.WRITE_ONLY) + private String lifecycleDetails; + + /* + * Azure resource provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AzureResourceProvisioningState provisioningState; + + /* + * virtual network address lifecycle state. + */ + @JsonProperty(value = "lifecycleState", access = JsonProperty.Access.WRITE_ONLY) + private VirtualNetworkAddressLifecycleState lifecycleState; + + /* + * The date and time when the create operation for the application virtual IP (VIP) address completed. + */ + @JsonProperty(value = "timeAssigned", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timeAssigned; + + /** + * Creates an instance of VirtualNetworkAddressProperties class. + */ + public VirtualNetworkAddressProperties() { + } + + /** + * Get the ipAddress property: Virtual network Address address. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: Virtual network Address address. + * + * @param ipAddress the ipAddress value to set. + * @return the VirtualNetworkAddressProperties object itself. + */ + public VirtualNetworkAddressProperties withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the vmOcid property: Virtual Machine OCID. + * + * @return the vmOcid value. + */ + public String vmOcid() { + return this.vmOcid; + } + + /** + * Set the vmOcid property: Virtual Machine OCID. + * + * @param vmOcid the vmOcid value to set. + * @return the VirtualNetworkAddressProperties object itself. + */ + public VirtualNetworkAddressProperties withVmOcid(String vmOcid) { + this.vmOcid = vmOcid; + return this; + } + + /** + * Get the ocid property: Application VIP OCID. + * + * @return the ocid value. + */ + public String ocid() { + return this.ocid; + } + + /** + * Get the domain property: Virtual network address fully qualified domain name. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Get the lifecycleDetails property: Additional information about the current lifecycle state of the application + * virtual IP (VIP) address. + * + * @return the lifecycleDetails value. + */ + public String lifecycleDetails() { + return this.lifecycleDetails; + } + + /** + * Get the provisioningState property: Azure resource provisioning state. + * + * @return the provisioningState value. + */ + public AzureResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the lifecycleState property: virtual network address lifecycle state. + * + * @return the lifecycleState value. + */ + public VirtualNetworkAddressLifecycleState lifecycleState() { + return this.lifecycleState; + } + + /** + * Get the timeAssigned property: The date and time when the create operation for the application virtual IP (VIP) + * address completed. + * + * @return the timeAssigned value. + */ + public OffsetDateTime timeAssigned() { + return this.timeAssigned; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddresses.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddresses.java new file mode 100644 index 000000000000..454a192901e4 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/VirtualNetworkAddresses.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.oracle.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 VirtualNetworkAddresses. + */ +public interface VirtualNetworkAddresses { + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername); + + /** + * List VirtualNetworkAddress resources by CloudVmCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a VirtualNetworkAddress list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByCloudVmCluster(String resourceGroupName, String cloudvmclustername, + Context context); + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String cloudvmclustername, + String virtualnetworkaddressname, Context context); + + /** + * Get a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a VirtualNetworkAddress. + */ + VirtualNetworkAddress get(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname); + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 cloudvmclustername, String virtualnetworkaddressname); + + /** + * Delete a VirtualNetworkAddress. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param cloudvmclustername CloudVmCluster name. + * @param virtualnetworkaddressname Virtual IP address hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String cloudvmclustername, String virtualnetworkaddressname, Context context); + + /** + * Get a VirtualNetworkAddress. + * + * @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 VirtualNetworkAddress along with {@link Response}. + */ + VirtualNetworkAddress getById(String id); + + /** + * Get a VirtualNetworkAddress. + * + * @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 VirtualNetworkAddress along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a VirtualNetworkAddress. + * + * @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 VirtualNetworkAddress. + * + * @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 VirtualNetworkAddress resource. + * + * @param name resource name. + * @return the first stage of the new VirtualNetworkAddress definition. + */ + VirtualNetworkAddress.DefinitionStages.Blank define(String name); +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/WorkloadType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/WorkloadType.java new file mode 100644 index 000000000000..cf5da6dd7be5 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/WorkloadType.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.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * WorkloadType enum. + */ +public final class WorkloadType extends ExpandableStringEnum { + /** + * Static value OLTP for WorkloadType. + */ + public static final WorkloadType OLTP = fromString("OLTP"); + + /** + * Static value DW for WorkloadType. + */ + public static final WorkloadType DW = fromString("DW"); + + /** + * Static value AJD for WorkloadType. + */ + public static final WorkloadType AJD = fromString("AJD"); + + /** + * Static value APEX for WorkloadType. + */ + public static final WorkloadType APEX = fromString("APEX"); + + /** + * Creates a new instance of WorkloadType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkloadType() { + } + + /** + * Creates or finds a WorkloadType from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkloadType. + */ + @JsonCreator + public static WorkloadType fromString(String name) { + return fromString(name, WorkloadType.class); + } + + /** + * Gets known WorkloadType values. + * + * @return known WorkloadType values. + */ + public static Collection values() { + return values(WorkloadType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ZoneType.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ZoneType.java new file mode 100644 index 000000000000..2dad96f67f47 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/ZoneType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * ZoneType enum. + */ +public final class ZoneType extends ExpandableStringEnum { + /** + * Static value Primary for ZoneType. + */ + public static final ZoneType PRIMARY = fromString("Primary"); + + /** + * Static value Secondary for ZoneType. + */ + public static final ZoneType SECONDARY = fromString("Secondary"); + + /** + * Creates a new instance of ZoneType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ZoneType() { + } + + /** + * Creates or finds a ZoneType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ZoneType. + */ + @JsonCreator + public static ZoneType fromString(String name) { + return fromString(name, ZoneType.class); + } + + /** + * Gets known ZoneType values. + * + * @return known ZoneType values. + */ + public static Collection values() { + return values(ZoneType.class); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/package-info.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/package-info.java new file mode 100644 index 000000000000..60fd4e078b0c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the data models for OracleDatabaseResourceManager. + * null. + */ +package com.azure.resourcemanager.oracle.models; diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/package-info.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/package-info.java new file mode 100644 index 000000000000..e87431bd9287 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/com/azure/resourcemanager/oracle/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * Package containing the classes for OracleDatabaseResourceManager. + * null. + */ +package com.azure.resourcemanager.oracle; diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/java/module-info.java b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/module-info.java new file mode 100644 index 000000000000..1422cd1ab047 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/java/module-info.java @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.oracle { + requires transitive com.azure.core.management; + exports com.azure.resourcemanager.oracle; + exports com.azure.resourcemanager.oracle.fluent; + exports com.azure.resourcemanager.oracle.fluent.models; + exports com.azure.resourcemanager.oracle.models; + opens com.azure.resourcemanager.oracle.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.oracle.models to com.azure.core, com.fasterxml.jackson.databind; +} \ No newline at end of file diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracle/proxy-config.json b/sdk/oracle/azure-resourcemanager-oracle/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracle/proxy-config.json new file mode 100644 index 000000000000..4dae4fc81f66 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracle/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.oracle.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.oracle.implementation.AutonomousDatabasesClientImpl$AutonomousDatabasesService" ], [ "com.azure.resourcemanager.oracle.implementation.CloudExadataInfrastructuresClientImpl$CloudExadataInfrastructuresService" ], [ "com.azure.resourcemanager.oracle.implementation.CloudVmClustersClientImpl$CloudVmClustersService" ], [ "com.azure.resourcemanager.oracle.implementation.AutonomousDatabaseCharacterSetsClientImpl$AutonomousDatabaseCharacterSetsService" ], [ "com.azure.resourcemanager.oracle.implementation.AutonomousDatabaseNationalCharacterSetsClientImpl$AutonomousDatabaseNationalCharacterSetsService" ], [ "com.azure.resourcemanager.oracle.implementation.AutonomousDatabaseVersionsClientImpl$AutonomousDatabaseVersionsService" ], [ "com.azure.resourcemanager.oracle.implementation.DbSystemShapesClientImpl$DbSystemShapesService" ], [ "com.azure.resourcemanager.oracle.implementation.DnsPrivateViewsClientImpl$DnsPrivateViewsService" ], [ "com.azure.resourcemanager.oracle.implementation.DnsPrivateZonesClientImpl$DnsPrivateZonesService" ], [ "com.azure.resourcemanager.oracle.implementation.GiVersionsClientImpl$GiVersionsService" ], [ "com.azure.resourcemanager.oracle.implementation.OracleSubscriptionsClientImpl$OracleSubscriptionsService" ], [ "com.azure.resourcemanager.oracle.implementation.AutonomousDatabaseBackupsClientImpl$AutonomousDatabaseBackupsService" ], [ "com.azure.resourcemanager.oracle.implementation.DbServersClientImpl$DbServersService" ], [ "com.azure.resourcemanager.oracle.implementation.DbNodesClientImpl$DbNodesService" ], [ "com.azure.resourcemanager.oracle.implementation.VirtualNetworkAddressesClientImpl$VirtualNetworkAddressesService" ] ] \ No newline at end of file diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracle/reflect-config.json b/sdk/oracle/azure-resourcemanager-oracle/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracle/reflect-config.json new file mode 100644 index 000000000000..5233d0def513 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-oracle/reflect-config.json @@ -0,0 +1,716 @@ +[ { + "name" : "com.azure.resourcemanager.oracle.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseBaseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CustomerContact", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseStandbySummary", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ScheduledOperationsType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DayOfWeek", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ApexDetailsType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ConnectionStringType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AllConnectionStringType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ProfileType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ConnectionUrlType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.CloudExadataInfrastructureInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.MaintenanceWindow", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.Month", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.EstimatedPatchingTime", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudVmClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.CloudVmClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudVmClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.NsgCidr", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.PortRange", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DataCollectionOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ExadataIormConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbIormConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSetListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseCharacterSetInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseCharacterSetProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSetListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseNationalCharacterSetInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseNationalCharacterSetProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDbVersionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.AutonomousDbVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDbVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbSystemShapeListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.DbSystemShapeInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbSystemShapeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DnsPrivateViewListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.DnsPrivateViewInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DnsPrivateViewProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DnsPrivateZoneListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.DnsPrivateZoneInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DnsPrivateZoneProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.GiVersionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.GiVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.GiVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.OracleSubscriptionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.OracleSubscriptionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.Plan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.OracleSubscriptionUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ResourcePlanTypeUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.OracleSubscriptionUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.ActivationLinksInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.CloudAccountDetailsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.SaasSubscriptionDetailsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ScheduledOperationsTypeUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DayOfWeekUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseBackupInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.PeerDbDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.GenerateAutonomousDatabaseWalletDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.AutonomousDatabaseWalletFileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbServerListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.DbServerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbServerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbServerPatchingDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudVmClusterUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudVmClusterUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AddRemoveDbNode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbNodeListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.DbNodeInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbNodeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbNodeAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.PrivateIpAddressesFilter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.PrivateIpAddressPropertiesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.VirtualNetworkAddressListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.fluent.models.VirtualNetworkAddressInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.VirtualNetworkAddressProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseCloneProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DataBaseType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousMaintenanceScheduleType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ComputeModel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.WorkloadType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DisasterRecoveryType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseLifecycleState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.LicenseModel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AzureResourceProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DayOfWeekName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ConsumerGroup", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.HostFormatType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ProtocolType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.SessionModeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.SyntaxFormatType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.TlsAuthenticationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DataSafeStatusType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DatabaseEditionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.OpenModeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.OperationsInsightsStatusType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.PermissionLevelType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.RoleType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.Preference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.MonthName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.PatchingMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureLifecycleState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DiskRedundancy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudVmClusterLifecycleState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.IormLifecycleState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.Objective", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DnsPrivateViewsLifecycleState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ResourceProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DnsPrivateZonesLifecycleState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.ZoneType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.OracleSubscriptionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloudAccountProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.Intent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupLifecycleState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.GenerateType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbServerPatchingStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbServerProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbNodeProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbNodeMaintenanceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.DbNodeActionEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.VirtualNetworkAddressLifecycleState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.SourceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.CloneType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.RefreshableModelType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.oracle.models.RefreshableStatusType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsCreateOrUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e3a31a221a31 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsCreateOrUpdateSamples.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.oracle.generated; + +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackupProperties; + +/** + * Samples for AutonomousDatabaseBackups CreateOrUpdate. + */ +public final class AutonomousDatabaseBackupsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_create.json + */ + /** + * Sample code: Create Autonomous Database Backup. + * + * @param manager Entry point to OracleManager. + */ + public static void createAutonomousDatabaseBackup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseBackups() + .define("1711644130") + .withExistingAutonomousDatabase("rg000", "databasedb1") + .withProperties(new AutonomousDatabaseBackupProperties().withDisplayName("Nightly Backup") + .withRetentionPeriodInDays(365)) + .create(); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsDeleteSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsDeleteSamples.java new file mode 100644 index 000000000000..397e64003782 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabaseBackups Delete. + */ +public final class AutonomousDatabaseBackupsDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_delete.json + */ + /** + * Sample code: Delete Autonomous Database Backup. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteAutonomousDatabaseBackup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseBackups() + .delete("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsGetSamples.java new file mode 100644 index 000000000000..00c6d350a901 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabaseBackups Get. + */ +public final class AutonomousDatabaseBackupsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_get.json + */ + /** + * Sample code: Get Autonomous Database Backup. + * + * @param manager Entry point to OracleManager. + */ + public static void getAutonomousDatabaseBackup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseBackups() + .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.java new file mode 100644 index 000000000000..5fd11ae4f7af --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsListByAutonomousDatabaseSamples.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.oracle.generated; + +/** + * Samples for AutonomousDatabaseBackups ListByAutonomousDatabase. + */ +public final class AutonomousDatabaseBackupsListByAutonomousDatabaseSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_listByParent.json + */ + /** + * Sample code: List Autonomous Database Backups by Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void + listAutonomousDatabaseBackupsByAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseBackups() + .listByAutonomousDatabase("rg000", "databasedb1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsUpdateSamples.java new file mode 100644 index 000000000000..549150e06e4a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseBackupsUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseBackup; + +/** + * Samples for AutonomousDatabaseBackups Update. + */ +public final class AutonomousDatabaseBackupsUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseBackup_patch.json + */ + /** + * Sample code: Patch Autonomous Database Backup. + * + * @param manager Entry point to OracleManager. + */ + public static void patchAutonomousDatabaseBackup(com.azure.resourcemanager.oracle.OracleManager manager) { + AutonomousDatabaseBackup resource = manager.autonomousDatabaseBackups() + .getWithResponse("rg000", "databasedb1", "1711644130", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseCharacterSetsGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseCharacterSetsGetSamples.java new file mode 100644 index 000000000000..bbcab15e2051 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseCharacterSetsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabaseCharacterSets Get. + */ +public final class AutonomousDatabaseCharacterSetsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_get.json + */ + /** + * Sample code: Get autonomous db character set. + * + * @param manager Entry point to OracleManager. + */ + public static void getAutonomousDbCharacterSet(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseCharacterSets() + .getWithResponse("eastus", "DATABASE", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseCharacterSetsListByLocationSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseCharacterSetsListByLocationSamples.java new file mode 100644 index 000000000000..e1ac339112a6 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseCharacterSetsListByLocationSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabaseCharacterSets ListByLocation. + */ +public final class AutonomousDatabaseCharacterSetsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseCharacterSet_listByLocation.json + */ + /** + * Sample code: List autonomous db character sets by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listAutonomousDbCharacterSetsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseNationalCharacterSetsGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseNationalCharacterSetsGetSamples.java new file mode 100644 index 000000000000..262ce5143862 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseNationalCharacterSetsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabaseNationalCharacterSets Get. + */ +public final class AutonomousDatabaseNationalCharacterSetsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_get.json + */ + /** + * Sample code: Get autonomous db national character set. + * + * @param manager Entry point to OracleManager. + */ + public static void getAutonomousDbNationalCharacterSet(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseNationalCharacterSets() + .getWithResponse("eastus", "NATIONAL", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseNationalCharacterSetsListByLocationSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseNationalCharacterSetsListByLocationSamples.java new file mode 100644 index 000000000000..11ab9d3f15cb --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseNationalCharacterSetsListByLocationSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabaseNationalCharacterSets ListByLocation. + */ +public final class AutonomousDatabaseNationalCharacterSetsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json + */ + /** + * Sample code: List autonomous db national character sets by location. + * + * @param manager Entry point to OracleManager. + */ + public static void + listAutonomousDbNationalCharacterSetsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseNationalCharacterSets().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseVersionsGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseVersionsGetSamples.java new file mode 100644 index 000000000000..000a087d9bc3 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseVersionsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabaseVersions Get. + */ +public final class AutonomousDatabaseVersionsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_get.json + */ + /** + * Sample code: Get an autonomous version. + * + * @param manager Entry point to OracleManager. + */ + public static void getAnAutonomousVersion(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseVersions().getWithResponse("eastus", "18.4.0.0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseVersionsListByLocationSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseVersionsListByLocationSamples.java new file mode 100644 index 000000000000..4cbb99361451 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabaseVersionsListByLocationSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabaseVersions ListByLocation. + */ +public final class AutonomousDatabaseVersionsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseVersion_listByLocation.json + */ + /** + * Sample code: List an autonomous versions by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listAnAutonomousVersionsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabaseVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesCreateOrUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..588bb310bcfc --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesCreateOrUpdateSamples.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseCloneProperties; +import com.azure.resourcemanager.oracle.models.AutonomousDatabaseProperties; +import com.azure.resourcemanager.oracle.models.CloneType; +import com.azure.resourcemanager.oracle.models.ComputeModel; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for AutonomousDatabases CreateOrUpdate. + */ +public final class AutonomousDatabasesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_create.json + */ + /** + * Sample code: Create Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void createAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new AutonomousDatabaseProperties().withAdminPassword("fakeTokenPlaceholder") + .withCharacterSet("AL32UTF8") + .withComputeCount(2.0F) + .withComputeModel(ComputeModel.ECPU) + .withDataStorageSizeInTbs(1) + .withDbVersion("18.4.0.0") + .withDisplayName("example_autonomous_databasedb1") + .withNcharacterSet("AL16UTF16") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1")) + .create(); + } + + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabaseClone_create.json + */ + /** + * Sample code: Create clone Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void createCloneAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .define("databasedb1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new AutonomousDatabaseCloneProperties().withAdminPassword("fakeTokenPlaceholder") + .withCharacterSet("AL32UTF8") + .withComputeCount(2.0F) + .withComputeModel(ComputeModel.ECPU) + .withDataStorageSizeInTbs(1) + .withDisplayName("example_autonomous_databasedb1_clone") + .withNcharacterSet("AL16UTF16") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withSourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1") + .withCloneType(CloneType.FULL)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesDeleteSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesDeleteSamples.java new file mode 100644 index 000000000000..1d4f0bbcc998 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabases Delete. + */ +public final class AutonomousDatabasesDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_delete.json + */ + /** + * Sample code: Delete Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases().delete("rg000", "databasedb1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesFailoverSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesFailoverSamples.java new file mode 100644 index 000000000000..b928baefba27 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesFailoverSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.PeerDbDetails; + +/** + * Samples for AutonomousDatabases Failover. + */ +public final class AutonomousDatabasesFailoverSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_failover.json + */ + /** + * Sample code: Perform failover action on Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void + performFailoverActionOnAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .failover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesGenerateWalletSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesGenerateWalletSamples.java new file mode 100644 index 000000000000..9049f38ced83 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesGenerateWalletSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.GenerateAutonomousDatabaseWalletDetails; +import com.azure.resourcemanager.oracle.models.GenerateType; + +/** + * Samples for AutonomousDatabases GenerateWallet. + */ +public final class AutonomousDatabasesGenerateWalletSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_generateWallet.json + */ + /** + * Sample code: Generate wallet action on Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void + generateWalletActionOnAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .generateWalletWithResponse("rg000", "databasedb1", + new GenerateAutonomousDatabaseWalletDetails().withGenerateType(GenerateType.SINGLE) + .withIsRegional(false) + .withPassword("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesGetByResourceGroupSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesGetByResourceGroupSamples.java new file mode 100644 index 000000000000..90aa766233bb --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabases GetByResourceGroup. + */ +public final class AutonomousDatabasesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_get.json + */ + /** + * Sample code: Get Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void getAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesListByResourceGroupSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesListByResourceGroupSamples.java new file mode 100644 index 000000000000..50dd62eaaa10 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabases ListByResourceGroup. + */ +public final class AutonomousDatabasesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listByResourceGroup.json + */ + /** + * Sample code: List Autonomous Database by resource group. + * + * @param manager Entry point to OracleManager. + */ + public static void listAutonomousDatabaseByResourceGroup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesListSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesListSamples.java new file mode 100644 index 000000000000..de6360db32ba --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for AutonomousDatabases List. + */ +public final class AutonomousDatabasesListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_listBySubscription.json + */ + /** + * Sample code: List Autonomous Database by subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void listAutonomousDatabaseBySubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesSwitchoverSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesSwitchoverSamples.java new file mode 100644 index 000000000000..2281b7e7204c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesSwitchoverSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.PeerDbDetails; + +/** + * Samples for AutonomousDatabases Switchover. + */ +public final class AutonomousDatabasesSwitchoverSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_switchover.json + */ + /** + * Sample code: Perform switchover action on Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void + performSwitchoverActionOnAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.autonomousDatabases() + .switchover("rg000", "databasedb1", new PeerDbDetails().withPeerDbId("peerDbId"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesUpdateSamples.java new file mode 100644 index 000000000000..d2b61ec73540 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/AutonomousDatabasesUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.AutonomousDatabase; + +/** + * Samples for AutonomousDatabases Update. + */ +public final class AutonomousDatabasesUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/autonomousDatabase_patch.json + */ + /** + * Sample code: Patch Autonomous Database. + * + * @param manager Entry point to OracleManager. + */ + public static void patchAutonomousDatabase(com.azure.resourcemanager.oracle.OracleManager manager) { + AutonomousDatabase resource = manager.autonomousDatabases() + .getByResourceGroupWithResponse("rg000", "databasedb1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresAddStorageCapacitySamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresAddStorageCapacitySamples.java new file mode 100644 index 000000000000..b9f0df214a3e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresAddStorageCapacitySamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudExadataInfrastructures AddStorageCapacity. + */ +public final class CloudExadataInfrastructuresAddStorageCapacitySamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_addStorageCapacity.json + */ + /** + * Sample code: Perform add storage capacity on exadata infra. + * + * @param manager Entry point to OracleManager. + */ + public static void performAddStorageCapacityOnExadataInfra(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures().addStorageCapacity("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresCreateOrUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresCreateOrUpdateSamples.java new file mode 100644 index 000000000000..67e74c6b204c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresCreateOrUpdateSamples.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.oracle.generated; + +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructureProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CloudExadataInfrastructures CreateOrUpdate. + */ +public final class CloudExadataInfrastructuresCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_create.json + */ + /** + * Sample code: Create Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void createExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures() + .define("infra1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withZones(Arrays.asList("1")) + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new CloudExadataInfrastructureProperties().withComputeCount(100) + .withStorageCount(10) + .withShape("EXADATA.X9M") + .withDisplayName("infra 1")) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresDeleteSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresDeleteSamples.java new file mode 100644 index 000000000000..43ae52633056 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudExadataInfrastructures Delete. + */ +public final class CloudExadataInfrastructuresDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_delete.json + */ + /** + * Sample code: Delete Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures().delete("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresGetByResourceGroupSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresGetByResourceGroupSamples.java new file mode 100644 index 000000000000..6855626f81ae --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudExadataInfrastructures GetByResourceGroup. + */ +public final class CloudExadataInfrastructuresGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_get.json + */ + /** + * Sample code: Get Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void getExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresListByResourceGroupSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresListByResourceGroupSamples.java new file mode 100644 index 000000000000..ef358c304637 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresListByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudExadataInfrastructures ListByResourceGroup. + */ +public final class CloudExadataInfrastructuresListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listByResourceGroup.json + */ + /** + * Sample code: List Exadata Infrastructure by resource group. + * + * @param manager Entry point to OracleManager. + */ + public static void + listExadataInfrastructureByResourceGroup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresListSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresListSamples.java new file mode 100644 index 000000000000..289034d92579 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudExadataInfrastructures List. + */ +public final class CloudExadataInfrastructuresListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_listBySubscription.json + */ + /** + * Sample code: List Exadata Infrastructure by subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void listExadataInfrastructureBySubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudExadataInfrastructures().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresUpdateSamples.java new file mode 100644 index 000000000000..06bae9023bfc --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudExadataInfrastructuresUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.CloudExadataInfrastructure; + +/** + * Samples for CloudExadataInfrastructures Update. + */ +public final class CloudExadataInfrastructuresUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/exaInfra_patch.json + */ + /** + * Sample code: Patch Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void patchExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + CloudExadataInfrastructure resource = manager.cloudExadataInfrastructures() + .getByResourceGroupWithResponse("rg000", "infra1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersAddVmsSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersAddVmsSamples.java new file mode 100644 index 000000000000..d102bc6b074c --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersAddVmsSamples.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.oracle.generated; + +import com.azure.resourcemanager.oracle.models.AddRemoveDbNode; +import java.util.Arrays; + +/** + * Samples for CloudVmClusters AddVms. + */ +public final class CloudVmClustersAddVmsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_addVms.json + */ + /** + * Sample code: Add VMs to VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void addVMsToVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters() + .addVms("rg000", "cluster1", + new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa", "ocid1..aaaaaa")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersCreateOrUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..73f8b71bfce1 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersCreateOrUpdateSamples.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.CloudVmClusterProperties; +import com.azure.resourcemanager.oracle.models.DataCollectionOptions; +import com.azure.resourcemanager.oracle.models.LicenseModel; +import com.azure.resourcemanager.oracle.models.NsgCidr; +import com.azure.resourcemanager.oracle.models.PortRange; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CloudVmClusters CreateOrUpdate. + */ +public final class CloudVmClustersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_create.json + */ + /** + * Sample code: Create VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void createVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters() + .define("cluster1") + .withRegion("eastus") + .withExistingResourceGroup("rg000") + .withTags(mapOf("tagK1", "tagV1")) + .withProperties(new CloudVmClusterProperties().withDataStorageSizeInTbs(1000.0D) + .withDbNodeStorageSizeInGbs(1000) + .withMemorySizeInGbs(1000) + .withTimeZone("UTC") + .withHostname("hostname1") + .withDomain("domain1") + .withCpuCoreCount(2) + .withOcpuCount(3.0F) + .withClusterName("cluster1") + .withDataStoragePercentage(100) + .withIsLocalBackupEnabled(false) + .withCloudExadataInfrastructureId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/cloudExadataInfrastructures/infra1") + .withIsSparseDiskgroupEnabled(false) + .withSshPublicKeys(Arrays.asList("ssh-key 1")) + .withLicenseModel(LicenseModel.LICENSE_INCLUDED) + .withScanListenerPortTcp(1050) + .withScanListenerPortTcpSsl(1025) + .withVnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1") + .withGiVersion("19.0.0.0") + .withSubnetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withBackupSubnetCidr("172.17.5.0/24") + .withNsgCidrs(Arrays.asList( + new NsgCidr().withSource("10.0.0.0/16") + .withDestinationPortRange(new PortRange().withMin(1520).withMax(1522)), + new NsgCidr().withSource("10.10.0.0/24"))) + .withDataCollectionOptions(new DataCollectionOptions().withIsDiagnosticsEventsEnabled(false) + .withIsHealthMonitoringEnabled(false) + .withIsIncidentLogsEnabled(false)) + .withDisplayName("cluster 1") + .withDbServers(Arrays.asList("ocid1..aaaa"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersDeleteSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersDeleteSamples.java new file mode 100644 index 000000000000..4cfa62a26de0 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudVmClusters Delete. + */ +public final class CloudVmClustersDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_delete.json + */ + /** + * Sample code: Delete VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters().delete("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersGetByResourceGroupSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersGetByResourceGroupSamples.java new file mode 100644 index 000000000000..2160e91c1266 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudVmClusters GetByResourceGroup. + */ +public final class CloudVmClustersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_get.json + */ + /** + * Sample code: Get VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void getVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters().getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListByResourceGroupSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListByResourceGroupSamples.java new file mode 100644 index 000000000000..55e09ee09053 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudVmClusters ListByResourceGroup. + */ +public final class CloudVmClustersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listByResourceGroup.json + */ + /** + * Sample code: List VM Clusters by resource group. + * + * @param manager Entry point to OracleManager. + */ + public static void listVMClustersByResourceGroup(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters().listByResourceGroup("rg000", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListPrivateIpAddressesSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListPrivateIpAddressesSamples.java new file mode 100644 index 000000000000..81cb5e20abba --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListPrivateIpAddressesSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.PrivateIpAddressesFilter; + +/** + * Samples for CloudVmClusters ListPrivateIpAddresses. + */ +public final class CloudVmClustersListPrivateIpAddressesSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listPrivateIpAddresses.json + */ + /** + * Sample code: List Private IP Addresses for VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void listPrivateIPAddressesForVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters() + .listPrivateIpAddressesWithResponse("rg000", "cluster1", + new PrivateIpAddressesFilter().withSubnetId("ocid1..aaaaaa").withVnicId("ocid1..aaaaa"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListSamples.java new file mode 100644 index 000000000000..f2c299e53dc8 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for CloudVmClusters List. + */ +public final class CloudVmClustersListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_listBySubscription.json + */ + /** + * Sample code: List VM Clusters by subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void listVMClustersBySubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersRemoveVmsSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersRemoveVmsSamples.java new file mode 100644 index 000000000000..2f48a724fe09 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersRemoveVmsSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.AddRemoveDbNode; +import java.util.Arrays; + +/** + * Samples for CloudVmClusters RemoveVms. + */ +public final class CloudVmClustersRemoveVmsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_removeVms.json + */ + /** + * Sample code: Remove VMs from VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void removeVMsFromVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.cloudVmClusters() + .removeVms("rg000", "cluster1", new AddRemoveDbNode().withDbServers(Arrays.asList("ocid1..aaaa")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersUpdateSamples.java new file mode 100644 index 000000000000..330a7e8e28cb --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/CloudVmClustersUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.CloudVmCluster; + +/** + * Samples for CloudVmClusters Update. + */ +public final class CloudVmClustersUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/vmClusters_patch.json + */ + /** + * Sample code: Patch VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void patchVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + CloudVmCluster resource = manager.cloudVmClusters() + .getByResourceGroupWithResponse("rg000", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesActionSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesActionSamples.java new file mode 100644 index 000000000000..96e5acd1e3b5 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesActionSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +import com.azure.resourcemanager.oracle.models.DbNodeAction; +import com.azure.resourcemanager.oracle.models.DbNodeActionEnum; + +/** + * Samples for DbNodes Action. + */ +public final class DbNodesActionSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_action.json + */ + /** + * Sample code: VM actions on DbNodes of VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void vmActionsOnDbNodesOfVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbNodes() + .action("rg000", "cluster1", "ocid1....aaaaaa", new DbNodeAction().withAction(DbNodeActionEnum.START), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesGetSamples.java new file mode 100644 index 000000000000..f47363e56712 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DbNodes Get. + */ +public final class DbNodesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_get.json + */ + /** + * Sample code: Get DbNode. + * + * @param manager Entry point to OracleManager. + */ + public static void getDbNode(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbNodes().getWithResponse("rg000", "cluster1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesListByCloudVmClusterSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesListByCloudVmClusterSamples.java new file mode 100644 index 000000000000..09b9f79ed3b1 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbNodesListByCloudVmClusterSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DbNodes ListByCloudVmCluster. + */ +public final class DbNodesListByCloudVmClusterSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbNodes_listByParent.json + */ + /** + * Sample code: List DbNodes by VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void listDbNodesByVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbNodes().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbServersGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbServersGetSamples.java new file mode 100644 index 000000000000..7c50bf27b5af --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbServersGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DbServers Get. + */ +public final class DbServersGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbServers_get.json + */ + /** + * Sample code: Get DbServer by parent. + * + * @param manager Entry point to OracleManager. + */ + public static void getDbServerByParent(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbServers().getWithResponse("rg000", "infra1", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbServersListByCloudExadataInfrastructureSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbServersListByCloudExadataInfrastructureSamples.java new file mode 100644 index 000000000000..f3ce81c9a494 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbServersListByCloudExadataInfrastructureSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DbServers ListByCloudExadataInfrastructure. + */ +public final class DbServersListByCloudExadataInfrastructureSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbServers_listByParent.json + */ + /** + * Sample code: List DbServers by Exadata Infrastructure. + * + * @param manager Entry point to OracleManager. + */ + public static void listDbServersByExadataInfrastructure(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbServers().listByCloudExadataInfrastructure("rg000", "infra1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbSystemShapesGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbSystemShapesGetSamples.java new file mode 100644 index 000000000000..c84935e8cd91 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbSystemShapesGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DbSystemShapes Get. + */ +public final class DbSystemShapesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbSystemShapes_get.json + */ + /** + * Sample code: Get a DbSystemShape by name. + * + * @param manager Entry point to OracleManager. + */ + public static void getADbSystemShapeByName(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbSystemShapes().getWithResponse("eastus", "EXADATA.X9M", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbSystemShapesListByLocationSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbSystemShapesListByLocationSamples.java new file mode 100644 index 000000000000..f49b051526da --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DbSystemShapesListByLocationSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DbSystemShapes ListByLocation. + */ +public final class DbSystemShapesListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dbSystemShapes_listByLocation.json + */ + /** + * Sample code: List DbSystemShapes by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listDbSystemShapesByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dbSystemShapes().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateViewsGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateViewsGetSamples.java new file mode 100644 index 000000000000..80d8a639ef09 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateViewsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DnsPrivateViews Get. + */ +public final class DnsPrivateViewsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateViews_get.json + */ + /** + * Sample code: Get a DnsPrivateView by name. + * + * @param manager Entry point to OracleManager. + */ + public static void getADnsPrivateViewByName(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dnsPrivateViews().getWithResponse("eastus", "ocid1....aaaaaa", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateViewsListByLocationSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateViewsListByLocationSamples.java new file mode 100644 index 000000000000..6cd8c17487ee --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateViewsListByLocationSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DnsPrivateViews ListByLocation. + */ +public final class DnsPrivateViewsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateViews_listByLocation.json + */ + /** + * Sample code: List DnsPrivateViews by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listDnsPrivateViewsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dnsPrivateViews().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateZonesGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateZonesGetSamples.java new file mode 100644 index 000000000000..ca20f0cc8b8e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateZonesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DnsPrivateZones Get. + */ +public final class DnsPrivateZonesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateZones_get.json + */ + /** + * Sample code: Get a DnsPrivateZone by name. + * + * @param manager Entry point to OracleManager. + */ + public static void getADnsPrivateZoneByName(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dnsPrivateZones() + .getWithResponse("eastus", "example-dns-private-zone", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateZonesListByLocationSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateZonesListByLocationSamples.java new file mode 100644 index 000000000000..ebda882132af --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/DnsPrivateZonesListByLocationSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for DnsPrivateZones ListByLocation. + */ +public final class DnsPrivateZonesListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/dnsPrivateZones_listByLocation.json + */ + /** + * Sample code: List DnsPrivateZones by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listDnsPrivateZonesByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.dnsPrivateZones().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/GiVersionsGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/GiVersionsGetSamples.java new file mode 100644 index 000000000000..71ca08e617da --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/GiVersionsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for GiVersions Get. + */ +public final class GiVersionsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/giVersions_get.json + */ + /** + * Sample code: Get a GiVersion by name. + * + * @param manager Entry point to OracleManager. + */ + public static void getAGiVersionByName(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.giVersions().getWithResponse("eastus", "19.0.0.0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/GiVersionsListByLocationSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/GiVersionsListByLocationSamples.java new file mode 100644 index 000000000000..091280d53080 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/GiVersionsListByLocationSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for GiVersions ListByLocation. + */ +public final class GiVersionsListByLocationSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/giVersions_listByLocation.json + */ + /** + * Sample code: List GiVersions by location. + * + * @param manager Entry point to OracleManager. + */ + public static void listGiVersionsByLocation(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.giVersions().listByLocation("eastus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OperationsListSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OperationsListSamples.java new file mode 100644 index 000000000000..14853f94c4d4 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/operations_list.json + */ + /** + * Sample code: List Operations. + * + * @param manager Entry point to OracleManager. + */ + public static void listOperations(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsCreateOrUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..f1327cff0ff3 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsCreateOrUpdateSamples.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.oracle.generated; + +import com.azure.resourcemanager.oracle.fluent.models.OracleSubscriptionInner; +import com.azure.resourcemanager.oracle.models.OracleSubscriptionProperties; +import com.azure.resourcemanager.oracle.models.Plan; + +/** + * Samples for OracleSubscriptions CreateOrUpdate. + */ +public final class OracleSubscriptionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_create.json + */ + /** + * Sample code: Create or Update Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void createOrUpdateOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions() + .createOrUpdate(new OracleSubscriptionInner().withProperties(new OracleSubscriptionProperties()) + .withPlan(new Plan().withName("plan1") + .withPublisher("publisher1") + .withProduct("product1") + .withPromotionCode("fakeTokenPlaceholder") + .withVersion("alpha")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsDeleteSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsDeleteSamples.java new file mode 100644 index 000000000000..615d12585292 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for OracleSubscriptions Delete. + */ +public final class OracleSubscriptionsDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_delete.json + */ + /** + * Sample code: Delete Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().delete(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsGetSamples.java new file mode 100644 index 000000000000..f2a2e3803bb5 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for OracleSubscriptions Get. + */ +public final class OracleSubscriptionsGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_get.json + */ + /** + * Sample code: Get Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void getOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().getWithResponse(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListActivationLinksSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListActivationLinksSamples.java new file mode 100644 index 000000000000..0122ff777840 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListActivationLinksSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for OracleSubscriptions ListActivationLinks. + */ +public final class OracleSubscriptionsListActivationLinksSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listActivationLinks.json + */ + /** + * Sample code: List Activation Links for the Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void + listActivationLinksForTheOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().listActivationLinks(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListCloudAccountDetailsSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListCloudAccountDetailsSamples.java new file mode 100644 index 000000000000..a38ce51b094e --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListCloudAccountDetailsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for OracleSubscriptions ListCloudAccountDetails. + */ +public final class OracleSubscriptionsListCloudAccountDetailsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listCloudAccountDetails.json + */ + /** + * Sample code: List Cloud Account details for the Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void + listCloudAccountDetailsForTheOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().listCloudAccountDetails(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListSaasSubscriptionDetailsSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListSaasSubscriptionDetailsSamples.java new file mode 100644 index 000000000000..e4ec81c2894f --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListSaasSubscriptionDetailsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for OracleSubscriptions ListSaasSubscriptionDetails. + */ +public final class OracleSubscriptionsListSaasSubscriptionDetailsSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listSaasSubscriptionDetails.json + */ + /** + * Sample code: List Saas Subscription details for the Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void + listSaasSubscriptionDetailsForTheOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().listSaasSubscriptionDetails(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListSamples.java new file mode 100644 index 000000000000..f78296113290 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for OracleSubscriptions List. + */ +public final class OracleSubscriptionsListSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_listBySubscription.json + */ + /** + * Sample code: List Oracle Subscriptions by subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void listOracleSubscriptionsBySubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsUpdateSamples.java new file mode 100644 index 000000000000..2704373cf095 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/OracleSubscriptionsUpdateSamples.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.oracle.generated; + +import com.azure.resourcemanager.oracle.models.OracleSubscriptionUpdate; + +/** + * Samples for OracleSubscriptions Update. + */ +public final class OracleSubscriptionsUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/oracleSubscriptions_patch.json + */ + /** + * Sample code: Patch Oracle Subscription. + * + * @param manager Entry point to OracleManager. + */ + public static void patchOracleSubscription(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.oracleSubscriptions().update(new OracleSubscriptionUpdate(), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesCreateOrUpdateSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..77d17138306a --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesCreateOrUpdateSamples.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.oracle.generated; + +import com.azure.resourcemanager.oracle.models.VirtualNetworkAddressProperties; + +/** + * Samples for VirtualNetworkAddresses CreateOrUpdate. + */ +public final class VirtualNetworkAddressesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_create.json + */ + /** + * Sample code: Create Virtual Network Address. + * + * @param manager Entry point to OracleManager. + */ + public static void createVirtualNetworkAddress(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.virtualNetworkAddresses() + .define("hostname1") + .withExistingCloudVmCluster("rg000", "cluster1") + .withProperties( + new VirtualNetworkAddressProperties().withIpAddress("192.168.0.1").withVmOcid("ocid1..aaaa")) + .create(); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesDeleteSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesDeleteSamples.java new file mode 100644 index 000000000000..e3eea3e4ddf2 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesDeleteSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for VirtualNetworkAddresses Delete. + */ +public final class VirtualNetworkAddressesDeleteSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_delete.json + */ + /** + * Sample code: Delete Virtual Network Address. + * + * @param manager Entry point to OracleManager. + */ + public static void deleteVirtualNetworkAddress(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.virtualNetworkAddresses().delete("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesGetSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesGetSamples.java new file mode 100644 index 000000000000..59071b0455bd --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for VirtualNetworkAddresses Get. + */ +public final class VirtualNetworkAddressesGetSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_get.json + */ + /** + * Sample code: Get Virtual Network Address. + * + * @param manager Entry point to OracleManager. + */ + public static void getVirtualNetworkAddress(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.virtualNetworkAddresses() + .getWithResponse("rg000", "cluster1", "hostname1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java new file mode 100644 index 000000000000..1a02974f7540 --- /dev/null +++ b/sdk/oracle/azure-resourcemanager-oracle/src/samples/java/com/azure/resourcemanager/oracle/generated/VirtualNetworkAddressesListByCloudVmClusterSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.oracle.generated; + +/** + * Samples for VirtualNetworkAddresses ListByCloudVmCluster. + */ +public final class VirtualNetworkAddressesListByCloudVmClusterSamples { + /* + * x-ms-original-file: specification/oracle/resource-manager/Oracle.Database/preview/2023-09-01-preview/examples/virtualNetworkAddresses_listByParent.json + */ + /** + * Sample code: List Virtual Network Addresses by VM Cluster. + * + * @param manager Entry point to OracleManager. + */ + public static void listVirtualNetworkAddressesByVMCluster(com.azure.resourcemanager.oracle.OracleManager manager) { + manager.virtualNetworkAddresses().listByCloudVmCluster("rg000", "cluster1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/oracle/ci.yml b/sdk/oracle/ci.yml new file mode 100644 index 000000000000..25a6df130798 --- /dev/null +++ b/sdk/oracle/ci.yml @@ -0,0 +1,47 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/oracle/ci.yml + - sdk/oracle/azure-resourcemanager-oracle/ + exclude: + - sdk/oracle/pom.xml + - sdk/oracle/azure-resourcemanager-oracle/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/oracle/ci.yml + - sdk/oracle/azure-resourcemanager-oracle/ + exclude: + - sdk/oracle/pom.xml + - sdk/oracle/azure-resourcemanager-oracle/pom.xml + +parameters: + - name: release_azureresourcemanageroracle + displayName: azure-resourcemanager-oracle + type: boolean + default: false + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: oracle + EnableBatchRelease: true + Artifacts: + - name: azure-resourcemanager-oracle + groupId: com.azure.resourcemanager + safeName: azureresourcemanageroracle + releaseInBatch: ${{ parameters.release_azureresourcemanageroracle }} diff --git a/sdk/oracle/pom.xml b/sdk/oracle/pom.xml new file mode 100644 index 000000000000..4f4a5475d831 --- /dev/null +++ b/sdk/oracle/pom.xml @@ -0,0 +1,15 @@ + + + 4.0.0 + com.azure + azure-oracle-service + pom + 1.0.0 + + + azure-resourcemanager-oracle + +